X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=autogen.sh;h=582a8a3af495bc6c17d0949cfff141f9eddbad0b;hp=63c1997736e2715924c4b01b814ebe9615b2c65a;hb=32740a39b5de3f53be73254008167cd24030c156;hpb=514b8d62123e3d63f2b935aa1d58e5c411f3f603 diff --git a/autogen.sh b/autogen.sh index 63c199773..582a8a3af 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,19 +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 -CFLAGS="-g -Wall \ --Wmissing-declarations -Wmissing-prototypes \ --Wnested-externs -Wpointer-arith \ --Wpointer-arith -Wsign-compare -Wchar-subscripts \ --Wstrict-prototypes -Wshadow \ --Wformat=2 -Wtype-limits" +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 -O2" -./configure $args $@ +echo +echo "---------------------------------------------------------------------" +echo "Initialized udev build system. For a common configuration please run:" +echo "---------------------------------------------------------------------" +echo +echo "# ./configure $args" +echo