summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2010-09-08 17:51:59 +0200
committerVincent Untz <vuntz@gnome.org>2010-09-08 17:51:59 +0200
commit0770dc126c528aace2b7471eebed61e346986444 (patch)
tree481e5f06bb17a3bfb5194059ed38deba510ce8b1 /configure.ac
parent16bf494848cb4dd63abd66f556f39aa702f40bd3 (diff)
Rename configure.in to configure.ac
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac109
1 files changed, 109 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..948666f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,109 @@
+AC_INIT([desktop-file-utils], [0.17],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=desktop-file-utils])
+AC_CONFIG_SRCDIR(src/validate.h)
+
+AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AC_CONFIG_MACRO_DIR([m4])
+AM_CONFIG_HEADER(config.h)
+
+# Honor aclocal flags
+AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
+
+AM_MAINTAINER_MODE
+
+AC_PROG_CC
+AC_ISC_POSIX
+AC_HEADER_STDC
+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
+
+PKG_CHECK_MODULES(DESKTOP_FILE_UTILS, glib-2.0 >= 2.8.0)
+
+AM_PATH_LISPDIR
+
+AC_CONFIG_FILES([
+Makefile
+src/Makefile
+misc/Makefile
+])
+
+AC_OUTPUT