############################################################################### ## ## Modified from giFT's original configure.ac. See authorship information ## there. ## ## This program is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by the ## Free Software Foundation; either version 2, or (at your option) any ## later version. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ############################################################################### dnl ########################################################################### dnl Initialize autoconf... dnl ########################################################################### AC_PREREQ(2.52) AC_INIT(giftui, 0.4.1) AC_CONFIG_SRCDIR([src/main.h]) dnl ########################################################################### dnl Initialize automake... dnl ########################################################################### AM_INIT_AUTOMAKE([dist-bzip2]) AM_CONFIG_HEADER(src/config.h) #AM_MAINTAINER_MODE dnl ########################################################################### dnl Initialize autoheader... dnl ########################################################################### AH_VERBATIM([BUILD_DATE], [#undef BUILD_DATE]) dnl ########################################################################### dnl Check for the necessary build tools. dnl ########################################################################### AC_ISC_POSIX AM_PROG_CC_STDC AC_PROG_INSTALL AC_PROG_MAKE_SET dnl ########################################################################### dnl Checks for header files. dnl ########################################################################### AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([errno.h getopt.h sys/stat.h sys/types.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T dnl ########################################################################### dnl Checks for library functions. dnl ########################################################################### AC_CHECK_FUNCS([execlp getopt getopt_long strcasecmp strdup strstr]) dnl ########################################################################### dnl Checks for libgift, GTK+ and GConf. dnl ########################################################################### PKG_CHECK_MODULES(LIBGIFT, libgift >= 0.10.0) AC_SUBST(LIBGIFT_CFLAGS) AC_SUBST(LIBGIFT_LIBS) PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.2.0) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.0) AC_SUBST(GCONF_CFLAGS) AC_SUBST(GCONG_LIBS) AC_PATH_PROG(GCONFTOOL, gconftool-2) AM_GCONF_SOURCE_2 dnl ########################################################################### dnl NLS dnl ########################################################################### ALL_LINGUAS="fr ru" #AM_GNU_GETTEXT([Plop]) GETTEXT_PACKAGE=giftui AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name]) AM_GLIB_GNU_GETTEXT dnl ########################################################################### dnl Handle the configure switches... dnl ########################################################################### AC_ARG_ENABLE(debug, [ --enable-debug Compile giftui with debug support (optional, using -g option with gcc)], debug=$enableval, debug=no) dnl ########################################################################### dnl GCC debug options dnl ########################################################################### CFLAGS="-Wall" if test x"$debug" = xyes; then AC_DEFINE(HAVE_DEBUG, 1, HAVE_DEBUG) CFLAGS="-g $CFLAGS" fi if test x$USE_MAINTAINER_MODE = xyes; then CFLAGS="$CFLAGS -g3 -O0" fi dnl ########################################################################### dnl Build information... dnl ########################################################################### BUILD_DATE="`date`" AC_DEFINE_UNQUOTED(BUILD_DATE, "$BUILD_DATE") if test x$prefix = xNONE; then prefix="/usr/local" AC_SUBST(prefix) fi giftuidatadir="${prefix}/share/giftui" giftuiicondir="${prefix}/share/pixmaps" AC_SUBST(giftuidatadir) AC_SUBST(giftuiicondir) AC_SUBST(top_builddir) localedir="${prefix}/share/locale" AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/share/locale", [Where locales are installed]) AC_DEFINE_UNQUOTED(DATADIR, "${giftuidatadir}", [Data directory]) AC_DEFINE_UNQUOTED(ICONFILE, "${giftuiicondir}/giftui.png", [Icon file]) dnl ########################################################################### dnl Finish generation of the build environment dnl ########################################################################### AC_CONFIG_FILES([ Makefile data/Makefile data/icons/Makefile po/Makefile.in src/Makefile ]) AC_OUTPUT dnl ########################################################################### dnl Print summary to the user... dnl ########################################################################### echo "" echo "giftui configuration summary:" echo "==================================" echo "" echo "PREFIX = $prefix" echo "GIFTUIDIR = $giftuidatadir" echo "LOCALEDIR = $localedir" echo "" echo "CFLAGS = $CFLAGS $LIBGIFT_CFLAGS $GTK_CFLAGS" echo "LIBS = $LIBS $LIBGIFT_LIBS $GTK_LIBS" echo ""