configure.in 3.67 KB
Newer Older
1 2 3 4 5 6 7
dnl ==========================================================================
dnl
dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!
dnl
dnl ==========================================================================

8
AC_PREREQ(2.65)
9
AC_INIT(gdl)
10
AC_CONFIG_MACRO_DIR([m4])
11
AC_CONFIG_HEADERS([config.h])
12

13
GDL_MAJOR_VERSION=3
14
GDL_MINOR_VERSION=22
15
GDL_MICRO_VERSION=0
16 17

dnl increment if the interface has additions, changes, removals.
18
GDL_CURRENT=5
19 20 21 22

dnl increment if any interfaces have been added; set to 0
dnl  if any interfaces have been changed or removed. removal has
dnl  precedence over adding, so set to 0 if both happened.
23
GDL_AGE=0
24

25 26 27 28
dnl increment any time the source changes; set to
dnl  0 if you increment CURRENT
GDL_REVISION=9

29 30 31 32
AC_SUBST(GDL_CURRENT)
AC_SUBST(GDL_REVISION)
AC_SUBST(GDL_AGE)

33 34 35
PACKAGE=gdl
GDL_VERSION=$GDL_MAJOR_VERSION.$GDL_MINOR_VERSION.$GDL_MICRO_VERSION

36
AM_INIT_AUTOMAKE($PACKAGE, $GDL_VERSION, [1.10 dist-xz no-dist-gzip])
37

38 39 40 41 42 43
dnl with higher autotools, we can set ACLOCAL_AMFLAGS instead, which is
dnl the better solution; this does the trick for automake-1.4
dnl gnome-autogen.sh sets ACLOCAL_FLAGS, which points to the cvs gnome
dnl autoconf macros
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

44 45 46 47
AC_SUBST(GDL_MAJOR_VERSION)
AC_SUBST(GDL_MINOR_VERSION)
AC_SUBST(GDL_MICRO_VERSION)
AC_SUBST(GDL_VERSION)
Dave Camp's avatar
Dave Camp committed
48

49
SNAPSHOT=0_`date +%Y%m%d_%H%M%S`_git
50 51
AC_SUBST(SNAPSHOT)

52
GTK_REQUIRED=3.0.0
53 54 55 56
XML_REQUIRED=2.2.8

AC_SUBST(GTK_REQUIRED)
AC_SUBST(XML_REQUIRED)
57

58
AM_MAINTAINER_MODE([enable])
59
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
Dave Camp's avatar
Dave Camp committed
60

61 62 63
AC_ISC_POSIX
AC_PROG_CC

64 65 66
AC_CHECK_HEADERS([libintl.h])
AC_TYPE_SIGNAL

Dave Camp's avatar
Dave Camp committed
67 68
AC_PROG_CXX
AC_STDC_HEADERS
69
AM_SANITY_CHECK
Johannes Schmid's avatar
Johannes Schmid committed
70 71 72 73

AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
74

75 76

dnl ***************
77
dnl GTK Libraries 
78
dnl ***************
79

Johannes Schmid's avatar
Johannes Schmid committed
80 81 82 83
PKG_CHECK_MODULES(XML, libxml-2.0 >= $XML_REQUIRED)
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)

Johannes Schmid's avatar
Johannes Schmid committed
84
PKG_CHECK_MODULES(GDL_DEPENDENCIES, 
85
	gtk+-3.0 >= $GTK_REQUIRED)
Johannes Schmid's avatar
Johannes Schmid committed
86 87
AC_SUBST(GDL_DEPENDENCIES_CFLAGS)
AC_SUBST(GDL_DEPENDENCIES_LIBS)
Johannes Schmid's avatar
Johannes Schmid committed
88

89 90 91 92
dnl if test x$MAINT = x; then
dnl 	DEPRECATED_FLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED"
dnl	AC_SUBST(DEPRECATED_FLAGS)
dnl fi
Johannes Schmid's avatar
Johannes Schmid committed
93 94 95 96 97 98 99 100 101 102 103 104 105 106

AC_MSG_CHECKING([for native Win32])
case "$host" in
  *-*-mingw*)
    native_win32=yes
    ;;
  *)
    native_win32=no
    ;;
esac
AC_MSG_RESULT([$native_win32])
AM_CONDITIONAL(OS_WIN32, test "x$native_win32" = "xyes")

EXTRA_CPPFLAGS=
107
EXTRA_LDFLAGS="-no-undefined"
Johannes Schmid's avatar
Johannes Schmid committed
108 109
if test "x$native_win32" = "xyes"; then
  EXTRA_CPPFLAGS="-mms-bitfields"
110
  EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--kill-at -Wl,--export-all-symbols"
Johannes Schmid's avatar
Johannes Schmid committed
111 112 113
fi
AC_SUBST(EXTRA_CPPFLAGS)
AC_SUBST(EXTRA_LDFLAGS)
Johannes Schmid's avatar
Johannes Schmid committed
114

115 116 117 118 119
# marshal and enum generators
GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
AC_SUBST(GLIB_GENMARSHAL)
GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
AC_SUBST(GLIB_MKENUMS)
Dave Camp's avatar
Dave Camp committed
120

121
# i18n stuff
122
IT_PROG_INTLTOOL([0.40.4])
123

124
GETTEXT_PACKAGE=gdl-3
125
AC_SUBST(GETTEXT_PACKAGE)
126
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
127

Dave Camp's avatar
Dave Camp committed
128

129 130 131 132 133 134 135 136 137 138 139
dnl Set PREFIX
if test "x${prefix}" = "xNONE"; then
  packageprefix=${ac_default_prefix}
else
  packageprefix=${prefix}
fi

# images directory
gdl_images_dir="${packageprefix}/share/gdl/images"
AC_SUBST(gdl_images_dir)

140
# check for gtk-doc
141
GTK_DOC_CHECK(1.4)
142

143 144 145 146 147 148
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
GTK_PREFIX="`$PKG_CONFIG --variable=prefix gtk+-3.0`"

AC_SUBST(GLIB_PREFIX)
AC_SUBST(GTK_PREFIX)

149 150
GOBJECT_INTROSPECTION_CHECK([0.6.7])

Dave Camp's avatar
Dave Camp committed
151 152 153 154
AC_OUTPUT([
Makefile
gdl/Makefile
po/Makefile.in 
155 156
docs/Makefile
docs/reference/Makefile
157
docs/reference/version.xml
158
gdl.spec
159
gdl-3.0.pc
160
])