chiark / gitweb /
bash-completion: list valid signal names
[elogind.git] / autogen.sh
index 86fe9b3785a27453e4808ed861aeff82a970005b..f99d0d031ff5b04c052249289e2bd0dda7c6d2e0 100755 (executable)
 
 set -e
 
-if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
-        # This part is allowed to fail
-        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
-        chmod +x .git/hooks/pre-commit && \
-        echo "Activated pre-commit hook." || :
-fi
+oldpwd=$(pwd)
+topdir=$(dirname $0)
+cd $topdir
 
-if which gtkdocize >/dev/null 2>/dev/null; then
-        gtkdocize --docdir docs/
-        gtkdocargs=--enable-gtk-doc
-else
-        echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
-        rm -f docs/gtk-doc.make
-        echo 'EXTRA_DIST =' > docs/gtk-doc.make
-fi
+# We do not need this, we are not systemd upstream!
+#if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
+#        # This part is allowed to fail
+#        cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
+#        chmod +x .git/hooks/pre-commit && \
+#        echo "Activated pre-commit hook." || :
+#fi
 
 intltoolize --force --automake
 autoreconf --force --install --symlink
@@ -44,24 +40,25 @@ args="\
 --sysconfdir=/etc \
 --localstatedir=/var \
 --libdir=$(libdir /usr/lib) \
-$gtkdocargs"
+"
+
+if [ -f "$topdir/.config.args" ]; then
+        args="$args $(cat $topdir/.config.args)"
+fi
 
 if [ ! -L /bin ]; then
 args="$args \
---with-rootprefix= \
+--with-rootprefix=/ \
 --with-rootlibdir=$(libdir /lib) \
 "
 fi
 
-if [ "x$1" = "xc" ]; then
-        ./configure CFLAGS='-g -O0' $args
-        make clean
-else
-        echo
-        echo "----------------------------------------------------------------"
-        echo "Initialized build system. For a common configuration please run:"
-        echo "----------------------------------------------------------------"
-        echo
-        echo "./configure CFLAGS='-g -O0' $args"
-        echo
-fi
+cd $oldpwd
+
+echo
+echo "----------------------------------------------------------------"
+echo "Initialized build system. For a common configuration please run:"
+echo "----------------------------------------------------------------"
+echo
+echo "$topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-kdbus $args"
+echo