]> git.ipfire.org Git - thirdparty/systemd.git/blame - autogen.sh
volume_id: fat - move check for msdos signature (0x55 0xaa)
[thirdparty/systemd.git] / autogen.sh
CommitLineData
01618658
KS
1#!/bin/sh -e
2
01618658
KS
3(autoconf --version) < /dev/null > /dev/null 2>&1 || {
4 echo
5 echo "You must have autoconf installed to generate the build system."
6 echo
7 exit 1
8}
9(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
10 echo
11 echo "You must have libtool installed to generate the build system."
12 echo
13 exit 1
14}
15(autoheader --version) < /dev/null > /dev/null 2>&1 || {
16 echo
17 echo "You must have autoheader installed to generate the build system."
18 echo
19 exit 1
20}
21(automake --version) < /dev/null > /dev/null 2>&1 || {
22 echo
23 echo "You must have automake installed to generate the build system."
24 echo
25 exit 1
26}
27
28test -f udev/udevd.c || {
29 echo "You must run this script in the top-level source directory"
30 exit 1
31}
32
33echo " aclocal: $(aclocal --version | head -1)"
34aclocal
35echo " autoconf: $(autoconf --version | head -1)"
36autoconf
37echo " libtool: $(automake --version | head -1)"
38libtoolize --force
39echo " autoheader: $(autoheader --version | head -1)"
40autoheader
41echo " automake: $(automake --version | head -1)"
42automake --add-missing
43
b929e83a 44CFLAGS="-g -Wall \
e231a5db
KS
45-Wmissing-declarations -Wmissing-prototypes \
46-Wnested-externs -Wpointer-arith \
47-Wpointer-arith -Wsign-compare -Wchar-subscripts \
48-Wstrict-prototypes -Wshadow"
b929e83a
KS
49
50if test -z "$1" -o "$1" = "install"; then
51 args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux"
52 args="$args --with-libdir-name=$(basename $(gcc -print-multi-os-directory))"
53 CFLAGS="$CFLAGS -O2"
54elif test "$1" = "devel" ; then
55 args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux --enable-debug"
56 args="$args --with-libdir-name=$(basename $(gcc -print-multi-os-directory))"
57 CFLAGS="$CFLAGS -O0"
01618658
KS
58else
59 args=$@
60fi
61echo " configure: $args"
62echo
b929e83a 63export CFLAGS
01618658 64./configure $args