chiark / gitweb /
autogen.sh: moce CFLAGS from to configure.ac; print common ./configure options
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 23 Dec 2011 12:38:46 +0000 (13:38 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Fri, 23 Dec 2011 12:38:46 +0000 (13:38 +0100)
Makefile.am
autogen.sh
configure.ac

index 3fa7aed30aef9dbc1a33255c198a17a9d8882949..47ed3ccc48c99b2bdee5da4e2b7b21eb6f7fbcd8 100644 (file)
@@ -16,6 +16,7 @@ AM_CPPFLAGS = \
        -DLIBEXECDIR=\""$(libexecdir)"\"
 
 AM_CFLAGS = \
        -DLIBEXECDIR=\""$(libexecdir)"\"
 
 AM_CFLAGS = \
+       ${my_CFLAGS} \
        -fvisibility=hidden \
        -ffunction-sections \
        -fdata-sections
        -fvisibility=hidden \
        -ffunction-sections \
        -fdata-sections
@@ -207,11 +208,13 @@ udev_common_sources = \
        udev/udev-builtin-kmod.c
 
 udev_common_CFLAGS = \
        udev/udev-builtin-kmod.c
 
 udev_common_CFLAGS = \
-       $(BLKID_CFLAGS)
+       $(BLKID_CFLAGS) \
+       $(KMOD_CFLAGS)
 
 udev_common_LDADD = \
        libudev/libudev-private.la \
 
 udev_common_LDADD = \
        libudev/libudev-private.la \
-       $(BLKID_LIBS)
+       $(BLKID_LIBS) \
+       $(BLKID_KMOD)
 
 udev_udevd_SOURCES = \
        $(udev_common_sources) \
 
 udev_udevd_SOURCES = \
        $(udev_common_sources) \
index e7bd9c2a1c0c5d23dd6c42b890ad98d1f529d810..50923f0ab3a8215bd1bb3ead61db320573a176f7 100755 (executable)
@@ -3,21 +3,6 @@
 gtkdocize
 autoreconf --install --symlink
 
 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)
 }
 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 \
 --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"
 
 --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
index abfcb361dd18ae865b99e7ddf2600900720a62ea..b8595664b62039489bcd2d4093d38c5909ac223f 100644 (file)
@@ -201,6 +201,14 @@ AC_ARG_ENABLE([edd],
        [], [enable_edd=no])
 AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = "xyes"])
 
        [], [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
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([
        Makefile