dnl Process this file with autoconf to produce a configure script. AC_INIT([lingoteach],[0.3.9], [http://sourceforge.net/tracker/?func=add&group_id=1637]) AC_PREREQ(2.50) dnl AC_CONFIG_SRCDIR([src/ui/gtk/lingoteach.c]) AC_CANONICAL_SYSTEM INT_VERSION=Gregor AC_SUBST(INT_VERSION) dnl automake AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION) AM_MAINTAINER_MODE dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET AC_DISABLE_STATIC AC_PROG_LIBTOOL dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(intl.h, locale.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Checks for library functions. AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_CHECK_FUNCS(setlocale strchr strstr strncmp strcmp sprintf strcpy strncpy) dnl other stuff, which should be checked for AC_ISC_POSIX dnl i18n ALL_LINGUAS="de da eo fr hu id pt_BR sv" AM_GNU_GETTEXT dnl xml and liblingoteach stuff AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "$PKG_CONFIG" = "no"; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." AC_MSG_ERROR([pkg-config could not be found.]) fi PKG_CHECK_MODULES(LING, liblingoteach >= 0.1.0) AC_SUBST(LING_CFLAGS) AC_SUBST(LING_LIBS) dnl arguments for gtk2 gui GSUBDIRS='gtk' AC_ARG_WITH([gtk_gui],AC_HELP_STRING([--without-gtk-gui], [do not build the gtk2 based gui for lingoteach [[default=no]]])) if test "$with_gtk_gui" = "no"; then AC_MSG_RESULT([I will not build the GTK2 gui...]) GSUBDIRS='' else with_gtk_gui=yes AC_MSG_RESULT([I will build the GTK2 gui...]) PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.1 gobject-2.0 >= 2.0.1 gthread-2.0 >= 2.0.1) PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.1) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) fi AC_SUBST(GSUBDIRS) dnl arguments for debugging AC_ARG_ENABLE([debug],AC_HELP_STRING([--enable-debug], [enable additional debugging messages for lingoteach [[default=no]]]),, enable_debug=no) if test "$enable_debug" = "yes"; then AC_MSG_RESULT([Enabling additional debugging features...]) AC_DEFINE(DEBUG,1,[additional debugging features]) DFLAGS="-W -Wall -Wmissing-declarations -Wmissing-prototypes -Wpointer-arith" AC_SUBST(DFLAGS) fi dnl arguments for plugins PSUBDIRS='ui' AC_ARG_WITH([plugins],AC_HELP_STRING([--with-plugins], [build and install the plugins for lingoteach [[default=no]]])) if test "$with_plugins" = "yes"; then AC_MSG_RESULT([I will build the plugins...]) PSUBDIRS='ui plugins' fi AM_CONDITIONAL(GTK_PLUGINS, [test "$with_plugins" = "yes" && test "$with_gtk_gui" = "yes"]) AC_SUBST(PSUBDIRS) dnl debugging and additional warnings dnl output AC_OUTPUT([Makefile src/Makefile src/ui/Makefile src/ui/gtk/Makefile src/plugins/Makefile po/Makefile.in data/Makefile doc/Makefile doc/img/Makefile intl/Makefile lingoteach.spec]) echo " Configuration: Source code location: ${srcdir} Installation prefix : ${prefix} Compiler : ${CC} Debugging : ${enable_debug} Plugins : ${with_plugins} GTK2 user interface : ${with_gtk_gui} "