AC_INIT(src/desktop_file.h) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(desktop-file-utils, 0.5) # Honor aclocal flags ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" AM_MAINTAINER_MODE AC_ARG_ENABLE(tests, [ --enable-tests enable unit test code],enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE) AM_CONDITIONAL(DFU_BUILD_TESTS, test x$enable_tests = xyes) if test x$enable_tests = xyes; then AC_DEFINE(DFU_BUILD_TESTS,1,[Build test code]) fi AC_PROG_CC AC_ISC_POSIX AC_HEADER_STDC AC_ARG_PROGRAM AM_PROG_LIBTOOL if test "x$GCC" = "xyes"; then changequote(,)dnl case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac case " $CFLAGS " in *[\ \ ]-Wchar-subscripts[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wchar-subscripts" ;; esac case " $CFLAGS " in *[\ \ ]-Wmissing-declarations[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; esac case " $CFLAGS " in *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; esac case " $CFLAGS " in *[\ \ ]-Wnested-externs[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wnested-externs" ;; esac case " $CFLAGS " in *[\ \ ]-Wpointer-arith[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wpointer-arith" ;; esac case " $CFLAGS " in *[\ \ ]-Wcast-align[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wcast-align" ;; esac case " $CFLAGS " in *[\ \ ]-Wsign-compare[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wsign-compare" ;; esac if test "x$enable_ansi" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) CFLAGS="$CFLAGS -pedantic" ;; esac fi if test x$enable_gcov = xyes; then case " $CFLAGS " in *[\ \ ]-fprofile-arcs[\ \ ]*) ;; *) CFLAGS="$CFLAGS -fprofile-arcs" ;; esac case " $CFLAGS " in *[\ \ ]-ftest-coverage[\ \ ]*) ;; *) CFLAGS="$CFLAGS -ftest-coverage" ;; esac ## remove optimization CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'` fi changequote([,])dnl else if test x$enable_gcov = xyes; then AC_MSG_ERROR([--enable-gcov can only be used with gcc]) fi fi changequote(,)dnl # compress spaces in flags CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'` CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'` changequote([,])dnl AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build libgnome. You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])) PKG_CHECK_MODULES(DESKTOP_FILE_UTILS, glib-2.0 >= 2.2.0) AC_SUBST(DESKTOP_FILE_UTILS_CFLAGS) AC_SUBST(DESKTOP_FILE_UTILS_LIBS) GNOME_VFS_REQUIRED=2.2.0 PKG_CHECK_MODULES(VFS, gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED gnome-vfs-module-2.0 >= $GNOME_VFS_REQUIRED, have_gnome_vfs=yes, have_gnome_vfs=no) AC_SUBST(VFS_CFLAGS) AC_SUBST(VFS_LIBS) AM_CONDITIONAL(HAVE_GNOME_VFS, test x$have_gnome_vfs = xyes) AC_OUTPUT([ Makefile src/Makefile test/Makefile ])