fixed libtoolize detection
[public/netxms.git] / reconf
1 #!/bin/sh
2 # Copyright (C) 2004 Alex Kirhenshtein <alk@alk.lv>
3 #
4 # This file is free software; as a special exception the author gives
5 # unlimited permission to copy and/or distribute it, with or without
6 # modifications, as long as this notice is preserved.
7 #
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12 ACLOCAL=aclocal
13 AUTOCONF=autoconf
14 AUTOHEADER=autoheader
15 AUTOMAKE=automake
16 if test -x "`which libtoolize`"; then
17 LIBTOOLIZE=libtoolize
18 fi
19 if test -x "`which glibtoolize`"; then
20 LIBTOOLIZE=glibtoolize
21 fi
22
23 mkdir -p config
24 touch README
25
26 echo \*\*\* ACLOCAL: `which $ACLOCAL`
27 echo \*\*\* AUTOCONF: `which $AUTOCONF`
28 echo \*\*\* AUTOHEADER: `which $AUTOHEADER`
29 echo \*\*\* AUTOMAKE: `which $AUTOMAKE`
30 echo \*\*\* LIBTOOLIZE: `which $LIBTOOLIZE`
31
32 rm -f config.cache &&
33 [ ! -f config/ltmain.sh ] && $LIBTOOLIZE
34 echo "- aclocal." &&
35 $ACLOCAL -I m4 &&
36 echo "- autoconf." &&
37 $AUTOCONF &&
38 echo "- autoheader." &&
39 $AUTOHEADER &&
40 echo "- automake." &&
41 $AUTOMAKE -a &&
42 chmod 755 configure
43
44 if test -d src/private; then
45 FILES=`cat src/private/configure.files`
46 for file in $FILES; do
47 echo "Processing $file"
48 $AUTOMAKE $file
49 done
50 fi
51
52 exit $?