1
AC_INIT([desktop-file-utils], [0.16],
2
[https://bugs.freedesktop.org/enter_bug.cgi?product=desktop-file-utils])
3
AC_CONFIG_SRCDIR(src/validate.h)
5
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
6
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
7
AC_CONFIG_MACRO_DIR([m4])
8
AM_CONFIG_HEADER(config.h)
11
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
20
if test "x$GCC" = "xyes"; then
23
*[\ \ ]-Wall[\ \ ]*) ;;
24
*) CFLAGS="$CFLAGS -Wall" ;;
28
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
29
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
33
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
34
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
38
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
39
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
43
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
44
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
48
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
49
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
53
*[\ \ ]-Wcast-align[\ \ ]*) ;;
54
*) CFLAGS="$CFLAGS -Wcast-align" ;;
58
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
59
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
62
if test "x$enable_ansi" = "xyes"; then
64
*[\ \ ]-ansi[\ \ ]*) ;;
65
*) CFLAGS="$CFLAGS -ansi" ;;
69
*[\ \ ]-pedantic[\ \ ]*) ;;
70
*) CFLAGS="$CFLAGS -pedantic" ;;
73
if test x$enable_gcov = xyes; then
75
*[\ \ ]-fprofile-arcs[\ \ ]*) ;;
76
*) CFLAGS="$CFLAGS -fprofile-arcs" ;;
79
*[\ \ ]-ftest-coverage[\ \ ]*) ;;
80
*) CFLAGS="$CFLAGS -ftest-coverage" ;;
83
## remove optimization
84
CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
88
if test x$enable_gcov = xyes; then
89
AC_MSG_ERROR([--enable-gcov can only be used with gcc])
94
# compress spaces in flags
95
CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
96
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
99
PKG_CHECK_MODULES(DESKTOP_FILE_UTILS, glib-2.0 >= 2.8.0)