fixed broken non-unicode build
[public/netxms.git] / reconf
diff --git a/reconf b/reconf
old mode 100644 (file)
new mode 100755 (executable)
index e00777d..2bed62d
--- a/reconf
+++ b/reconf
@@ -1,3 +1,4 @@
+#!/bin/sh
 # Copyright (C) 2004 Alex Kirhenshtein <alk@alk.lv>
 #  
 # This file is free software; as a special exception the author gives
@@ -8,15 +9,47 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-#!/bin/sh
+autoreconf -fi -W none,obsolete,syntax
+exit $?
+
+ACLOCAL=aclocal
+AUTOCONF=autoconf
+AUTOHEADER=autoheader
+AUTOMAKE=automake
+if test -x "`which libtoolize`"; then
+       LIBTOOLIZE=libtoolize
+fi
+if test -x "`which glibtoolize`"; then
+       LIBTOOLIZE=glibtoolize
+fi
+
+mkdir -p config
+touch README
+
+echo \*\*\* ACLOCAL: `which $ACLOCAL`
+echo \*\*\* AUTOCONF: `which $AUTOCONF`
+echo \*\*\* AUTOHEADER: `which $AUTOHEADER`
+echo \*\*\* AUTOMAKE: `which $AUTOMAKE`
+echo \*\*\* LIBTOOLIZE: `which $LIBTOOLIZE`
+
 rm -f config.cache &&
-[ ! -f config/ltmain.sh ] && libtoolize
+[ ! -f config/ltmain.sh ] && $LIBTOOLIZE
 echo "- aclocal." &&
-aclocal-1.7 -I m4 &&
+$ACLOCAL -I m4 &&
 echo "- autoconf." &&
-autoconf-2.59 &&
+$AUTOCONF &&
 echo "- autoheader." &&
-autoheader-2.59 &&
+$AUTOHEADER &&
 echo "- automake." &&
-automake-1.7 -a &&
+$AUTOMAKE -a &&
+chmod 755 configure
+
+if test -d src/private; then
+       FILES=`cat src/private/configure.files`
+       for file in $FILES; do
+               echo "Processing $file"
+               $AUTOMAKE $file
+       done
+fi
+
 exit $?