chiark / gitweb /
tabs are as useful as a hole in the head
[elogind.git] / autogen.sh
index d35e9459eca651dcff725a118793edc7c850d374..697ed919d2ef50c41534de11bba4c14343d2dfb6 100755 (executable)
@@ -1,35 +1,34 @@
 #!/bin/sh -e
 
+if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
+        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
+        chmod +x .git/hooks/pre-commit && \
+        echo "Activated pre-commit hook."
+fi
+
 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=2 -Wtype-limits"
-
-case "$CFLAGS" in
-       *-O[0-9]*)
-               ;;
-       *)
-               MYCFLAGS="$MYCFLAGS -O2"
-               ;;
-esac
-
 libdir() {
-       echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
+        echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
 }
 
-args="--prefix=/usr \
+args="\
+--prefix=/usr \
+--with-rootprefix= \
 --sysconfdir=/etc \
---sbindir=/sbin \
+--bindir=/sbin \
 --libdir=$(libdir /usr/lib) \
 --with-rootlibdir=$(libdir /lib) \
---libexecdir=/lib/udev \
+--libexecdir=/lib \
+--with-systemdsystemunitdir=/lib/systemd/system \
 --with-selinux \
 --enable-gtk-doc"
 
-export CFLAGS="$CFLAGS $MYCFLAGS"
-./configure $args $@
+echo
+echo "----------------------------------------------------------------"
+echo "Initialized build system. For a common configuration please run:"
+echo "----------------------------------------------------------------"
+echo
+echo "./configure CFLAGS='-g -O0' $args"
+echo