]> git.ipfire.org Git - thirdparty/util-linux.git/blame - tools/config-gen
docs: update year in libs docs
[thirdparty/util-linux.git] / tools / config-gen
CommitLineData
83134551 1#!/bin/sh
9221fb85 2#
2bb3aa36
EM
3# Copyright (C) 2011 Karel Zak <kzak@redhat.com>
4#
9221fb85 5
d2feb47f 6test -f sys-utils/mount.c || {
9221fb85
KZ
7 echo
8 echo "You must run this script in the top-level util-linux directory"
9 echo
10 exit 1
11}
12
13. tools/config-gen-functions.sh
14
22c3c4f9
SK
15if [ $# -eq 0 ]; then
16 echo "This script requires at least one of the folloving arguments:"
17 cd tools/config-gen.d
18 for i in *.conf; do
19 echo " ${i%%.conf}"
20 done
21 exit 1
22fi
23
9221fb85
KZ
24while [ -n "$1" ]; do
25 opts="$opts $(ul_get_configuration tools/config-gen.d/$1.conf)"
26 shift
27done
28
29opts=$(echo $opts | tr " " "\n" | sort -u)
30echo "Configure options:"
31for x in $opts; do
32 echo " $x"
33done
34if [ -n "$CFLAGS" ]; then
35 echo "CFLAGS: $CFLAGS"
83134551
SK
36 CFLAGS="$CFLAGS"
37 export CFLAGS
9221fb85
KZ
38fi
39
0a2c1e8e
SK
40if [ ! -f ./configure ]; then
41 ./autogen.sh
42fi
43
9221fb85
KZ
44echo
45./configure $opts