X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=autogen.sh;h=582a8a3af495bc6c17d0949cfff141f9eddbad0b;hp=5c5903e0eb2c3e50f0163215f3829edd1119fc41;hb=32740a39b5de3f53be73254008167cd24030c156;hpb=bb0059f36e14cca41bdc242b13f39d57e8b7884d diff --git a/autogen.sh b/autogen.sh index 5c5903e0e..582a8a3af 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,27 +1,36 @@ -#!/bin/sh -e +#!/usr/bin/env sh + +set -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) +} -libdirname=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd)) -args="--prefix=/usr --exec-prefix= --sysconfdir=/etc \ ---libdir=/usr/$libdirname --with-libdir-name=$libdirname \ ---with-selinux --enable-gtk-doc" +args="\ +--prefix=/usr \ +--with-rootprefix= \ +--sysconfdir=/etc \ +--bindir=/sbin \ +--libdir=$(libdir /usr/lib) \ +--with-rootlibdir=$(libdir /lib) \ +--libexecdir=/lib \ +--with-systemdsystemunitdir=/lib/systemd/system \ +--with-selinux \ +--enable-gtk-doc" -export CFLAGS="$CFLAGS $MYCFLAGS" -./configure $args $@ +echo +echo "---------------------------------------------------------------------" +echo "Initialized udev build system. For a common configuration please run:" +echo "---------------------------------------------------------------------" +echo +echo "# ./configure $args" +echo