configure.in 2.87 KB
Newer Older
1 2 3 4 5 6 7 8
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 ==========================================================================


9
AC_PREREQ(2.53)
10
AC_INIT(gdl)
11
AM_CONFIG_HEADER(config.h)
12

13
GDL_MAJOR_VERSION=0
Naba Kumar's avatar
Naba Kumar committed
14
GDL_MINOR_VERSION=6
Johannes Schmid's avatar
Johannes Schmid committed
15
GDL_MICRO_VERSION=1
16 17 18 19
PACKAGE=gdl
GDL_VERSION=$GDL_MAJOR_VERSION.$GDL_MINOR_VERSION.$GDL_MICRO_VERSION

AM_INIT_AUTOMAKE($PACKAGE, $GDL_VERSION)
20

21 22 23 24 25 26
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"

27
AC_PROG_INTLTOOL
28

29 30 31 32
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
33

34 35 36
SNAPSHOT=0_`date +%Y%m%d_%H%M%S`_cvs
AC_SUBST(SNAPSHOT)

Johannes Schmid's avatar
Johannes Schmid committed
37 38
GTK_REQUIRED=2.3.0
GNOME_REQUIRED=2.5.0
39
BONOBOUI_REQUIRED=2.2.0
40
XML_REQUIRED=2.2.8
41
LIBGLADE_REQUIRED=2.0.0
42 43 44

AC_SUBST(GTK_REQUIRED)
AC_SUBST(GNOME_REQUIRED)
45
AC_SUBST(BONOBOUI_REQUIRED)
46
AC_SUBST(XML_REQUIRED)
47
AC_SUBST(LIBGLADE_REQUIRED)
Dave Camp's avatar
Dave Camp committed
48

Dave Camp's avatar
Dave Camp committed
49 50
AM_MAINTAINER_MODE

51 52 53
AC_ISC_POSIX
AC_PROG_CC

54 55 56
AC_CHECK_HEADERS([libintl.h])
AC_TYPE_SIGNAL

Dave Camp's avatar
Dave Camp committed
57 58 59
AC_PROG_CXX
AC_STDC_HEADERS
AM_PROG_LIBTOOL
60
AM_SANITY_CHECK
Dave Camp's avatar
Dave Camp committed
61

62 63 64 65 66 67 68 69 70
if test x$MAINT = x; then
    GNOME_COMPILE_WARNINGS(error)
    DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED"
else
    GNOME_COMPILE_WARNINGS(maximum)
    DEPRECATED_FLAGS=""
fi
AC_SUBST(DEPRECATED_FLAGS)

Dave Camp's avatar
Dave Camp committed
71 72

dnl ***************
Johannes Schmid's avatar
Johannes Schmid committed
73
dnl GNOME Libraries 
Dave Camp's avatar
Dave Camp committed
74
dnl ***************
75

Johannes Schmid's avatar
Johannes Schmid committed
76 77 78 79
PKG_CHECK_MODULES(XML, libxml-2.0 >= $XML_REQUIRED)
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)

Johannes Schmid's avatar
Johannes Schmid committed
80 81 82 83 84 85 86
PKG_CHECK_MODULES(GDL_DEPENDENCIES, 
	gtk+-2.0 >= $GTK_REQUIRED 
	libgnomeui-2.0 >= $GNOME_REQUIRED
	libbonoboui-2.0 >= $BONOBOUI_REQUIRED
	libglade-2.0 >= $LIBGLADE_REQUIRED)
AC_SUBST(GDL_DEPENDENCIES_CFLAGS)
AC_SUBST(GDL_DEPENDENCIES_LIBS)
Johannes Schmid's avatar
Johannes Schmid committed
87

88 89 90 91 92
# 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
93

94
ALL_LINGUAS="am az ca cs da de el en_CA en_GB es fi fr ga hr it ja mk ml nb ne nl pa pl pt pt_BR ru rw sk sq sr sr@Latn sv vi zh_CN"
95
GETTEXT_PACKAGE=gdl-1
96
AC_SUBST(GETTEXT_PACKAGE)
97
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
98 99

AM_GLIB_GNU_GETTEXT
100
AM_GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR)
Dave Camp's avatar
Dave Camp committed
101

102 103 104 105 106 107 108 109 110 111 112
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)

Dave Camp's avatar
Dave Camp committed
113 114 115 116
AC_OUTPUT([
Makefile
gdl/Makefile
po/Makefile.in 
117
gdl.spec
118 119
gdl-1.0.pc
])