From 655193fdbe876506009dbb4d87e4cc9bf3ab32d1 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 14 Apr 2009 19:52:33 +0200 Subject: sync with and depend on recent udev --- autogen.sh | 53 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 17 deletions(-) (limited to 'autogen.sh') 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 -- cgit