summaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-04-14 19:52:33 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-04-14 19:52:33 +0200
commit655193fdbe876506009dbb4d87e4cc9bf3ab32d1 (patch)
tree65b2973e866860dfc15105950429f54a27f38f0f /autogen.sh
parenta06e510fb08293c0e2b4bdd42e42f85f0107f387 (diff)
sync with and depend on recent udev
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh53
1 files changed, 36 insertions, 17 deletions
diff --git a/autogen.sh b/autogen.sh
index 9b803da..fb96d4a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,20 +1,39 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
+#!/bin/sh -e
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-REQUIRED_AUTOMAKE_VERSION=1.9
-PKG_NAME=udev-extras
+autoreconf --install --symlink
-(test -f $srcdir/configure.ac \
- && test -f $srcdir/modem-modeswitch/modem-modeswitch.c) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
-
-(cd $srcdir;
- autoreconf --install --symlink
- ./configure $@
-)
+CFLAGS="-g -Wall \
+-Wmissing-declarations -Wmissing-prototypes \
+-Wnested-externs -Wpointer-arith \
+-Wpointer-arith -Wsign-compare -Wchar-subscripts \
+-Wstrict-prototypes -Wshadow \
+-Wformat=2 -Wtype-limits"
+args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux"
+libdir=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
+case "$1" in
+ *install|"")
+ args="$args --with-libdir-name=$libdir"
+ export CFLAGS="$CFLAGS -O2"
+ echo " configure: $args"
+ echo
+ ./configure $args
+ ;;
+ *devel)
+ args="$args --enable-debug --with-libdir-name=$libdir"
+ export CFLAGS="$CFLAGS -O0"
+ echo " configure: $args"
+ echo
+ ./configure $args
+ ;;
+ *clean)
+ ./configure
+ make maintainer-clean
+ git clean -f -X
+ exit 0
+ ;;
+ *)
+ echo "Usage: $0 [--install|--devel|--clean]"
+ exit 1
+ ;;
+esac