diff options
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 53 |
1 files changed, 36 insertions, 17 deletions
@@ -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 |