3 AC_CONFIG_SRCDIR(configure.ac)
8 AM_INIT_AUTOMAKE(1.6 dist-bzip2)
9 AM_CONFIG_HEADER(config.h)
11 dnl make aclocal work in maintainer mode
12 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
22 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
25 dnl Test if --enable-debug given
27 AC_HELP_STRING([--enable-debug], [enable debugging mode]),
28 enable_debug="$enableval",
31 if test "x$enable_debug" = "xyes" ; then
32 AC_DEFINE(GMYTH_USE_DEBUG, 1, [Debug enabled!])
33 CFLAGS="$CFLAGS -Wall -O0 -g -DGMYTH_USE_DEBUG"
35 CFLAGS="$CFLAGS -Wall -O2"
38 AM_CONDITIONAL(GMYTH_USE_DEBUG, test "x$enable_debug" = "xyes")
41 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
42 # Give error and exit if we don't have pkgconfig
43 if test "x$HAVE_PKGCONFIG" = "xno"; then
44 AC_MSG_ERROR(you need to have pkgconfig installed !)
48 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
50 # Give error and exit if we don't have glib
51 if test "x$HAVE_GLIB" = "xno"; then
52 AC_MSG_ERROR(you need glib-2.0 installed)
55 # make GLIB_CFLAGS and GLIB_LIBS available
59 # Check for GObject2.0
60 PKG_CHECK_MODULES(GOBJECT,
62 HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
64 # Give error and exit if we don't have gobject
65 if test "x$HAVE_GOBJECT" = "xno"; then
66 AC_MSG_ERROR(you need gobject-2.0 installed)
69 # make GOBJECT_CFLAGS and GOBJECT_LIBS available
70 AC_SUBST(GOBJECT_CFLAGS)
71 AC_SUBST(GOBJECT_LIBS)
74 PKG_CHECK_MODULES(GTHREAD, gthread-2.0, HAVE_GTHREAD=yes,HAVE_GTHREAD=no)
76 # Give error and exit if we don't have glib
77 if test "x$HAVE_GTHREAD" = "xno"; then
78 AC_MSG_ERROR(you need gthread+-2.0 installed)
81 # make GTHREAD_CFLAGS and GTHREAD_LIBS available
82 AC_SUBST(GTHREAD_CFLAGS)
83 AC_SUBST(GTHREAD_LIBS)
85 # Check for libxml-2.0
86 PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
88 # Give error and exit if we don't have libxml
89 if test "x$HAVE_LIBXML" = "xno"; then
90 AC_MSG_ERROR(you need libxml-2.0 installed)
93 # make LIBXML_CFLAGS and LIBXML_LIBS available
94 AC_SUBST(LIBXML_CFLAGS)
98 PKG_CHECK_MODULES(LIBCURL, libcurl, HAVE_LIBCRUL=yes, HAVE_LIBCURL=no)
100 # Give error and exit if we don't have libcurl
101 if test "x$HAVE_LIBCURL" = "xno"; then
102 AC_MSG_ERROR(you need libcurl installed)
105 # make LIBCURL_CFLAGS and LIBCURL_LIBS available
106 AC_SUBST(LIBCURL_CFLAGS)
107 AC_SUBST(LIBCURL_LIBS)
110 AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`)
111 if test -z "$MYSQL_CFLAGS"; then
112 AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
114 AC_SUBST(MYSQL_CFLAGS)
116 AC_CHECK_PROG(MYSQL_LIBS,mysql_config,`mysql_config --libs`)
117 if test -z "$MYSQL_LIBS"; then
118 AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
130 if test "x$enable_debug" != "xno"; then
131 AC_MSG_NOTICE([Debug: Enabled])
133 AC_MSG_NOTICE([Debug: Disabled])