From: Kay Sievers Date: Fri, 23 Dec 2011 12:38:46 +0000 (+0100) Subject: autogen.sh: moce CFLAGS from to configure.ac; print common ./configure options X-Git-Tag: 176~41 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f71a55810f09fc010b44689aa00823a745ff83c6;p=systemd autogen.sh: moce CFLAGS from to configure.ac; print common ./configure options --- diff --git a/Makefile.am b/Makefile.am index 3fa7aed3..47ed3ccc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,7 @@ AM_CPPFLAGS = \ -DLIBEXECDIR=\""$(libexecdir)"\" AM_CFLAGS = \ + ${my_CFLAGS} \ -fvisibility=hidden \ -ffunction-sections \ -fdata-sections @@ -207,11 +208,13 @@ udev_common_sources = \ udev/udev-builtin-kmod.c udev_common_CFLAGS = \ - $(BLKID_CFLAGS) + $(BLKID_CFLAGS) \ + $(KMOD_CFLAGS) udev_common_LDADD = \ libudev/libudev-private.la \ - $(BLKID_LIBS) + $(BLKID_LIBS) \ + $(BLKID_KMOD) udev_udevd_SOURCES = \ $(udev_common_sources) \ diff --git a/autogen.sh b/autogen.sh index e7bd9c2a..50923f0a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,21 +3,6 @@ gtkdocize autoreconf --install --symlink -MYCFLAGS="-g -Wall \ --Wmissing-declarations -Wmissing-prototypes \ --Wnested-externs -Wpointer-arith \ --Wpointer-arith -Wsign-compare -Wchar-subscripts \ --Wstrict-prototypes -Wshadow \ --Wformat-security -Wtype-limits" - -case "$CFLAGS" in - *-O[0-9]*) - ;; - *) - MYCFLAGS="$MYCFLAGS -O2" - ;; -esac - libdir() { echo $(cd $1/$(gcc -print-multi-os-directory); pwd) } @@ -28,8 +13,14 @@ args="--prefix=/usr \ --libdir=$(libdir /usr/lib) \ --with-rootlibdir=$(libdir /lib) \ --libexecdir=/lib/udev \ ---with-systemdsystemunitdir=/lib/systemd/system +--with-systemdsystemunitdir=/lib/systemd/system \ --with-selinux \ --enable-gtk-doc" -./configure $args CFLAGS="${CFLAGS} ${MYCFLAGS}" $@ +echo +echo "---------------------------------------------------------------------" +echo "Initialized udev build system. For a common configuration please run:" +echo "---------------------------------------------------------------------" +echo +echo "# ./configure $args" +echo diff --git a/configure.ac b/configure.ac index abfcb361..b8595664 100644 --- a/configure.ac +++ b/configure.ac @@ -201,6 +201,14 @@ AC_ARG_ENABLE([edd], [], [enable_edd=no]) AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = "xyes"]) +my_CFLAGS="-Wall \ +-Wmissing-declarations -Wmissing-prototypes \ +-Wnested-externs -Wpointer-arith \ +-Wpointer-arith -Wsign-compare -Wchar-subscripts \ +-Wstrict-prototypes -Wshadow \ +-Wformat-security -Wtype-limits" +AC_SUBST([my_CFLAGS]) + AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ Makefile