missing autoconf 2.53 support
"Dr. Uwe Girlich" <[email protected]>
| Newsgroups | gmane.linux.ngpt.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello list! NGPT uses Autoconf to generate its Makefiles but current Linux distributions (like RH 8.0) come more and more with Autoconf 2.53, which needs some changes in aclocal.m4 and configure.in. The attached patch file makes it possible to use both widely used autoconf versions 2.13 and 2.53. Bye, Uwe -- Dr. Uwe Girlich email: [email protected] Philosys Software GmbH www: www.philosys.de Edisonstrasse 6 phone: +49 89 321407-44 D-85716 Unterschleissheim fax: +49 89 321407-12
library-ac253.diff
(text/plain, 5.2 KB)
diff -u -r --exclude='*.o' ngpt-2.0.3-orig/aclocal.m4 ngpt-2.0.3-production/aclocal.m4
--- ngpt-2.0.3-orig/aclocal.m4 2002-06-21 19:01:11.000000000 +0200
+++ ngpt-2.0.3-production/aclocal.m4 2002-10-02 06:33:37.000000000 +0200
@@ -23,6 +23,12 @@
dnl ##
dnl ## aclocal.m4: Pth Autoconf macros
dnl ##
+dnl ## On autoconf 2.53 there is no AC_DIVERSION_NOTICE any more.
+dnl ## With this minimal hack, we can use all the rest as it is and keep
+dnl ## NGPT compatible with autoconf 2.13. Maybe we should remove all
+dnl ## divert calls.
+ifdef(AC_DIVERSION_NOTICE,,define(AC_DIVERSION_NOTICE,1))
+
divert(-1)
dnl # ``"Reuse an expert's code" is the right
dnl # advice for most people. But it's a useless
@@ -190,9 +196,9 @@
dnl ##
AC_DEFUN(AC_PLATFORM,[
-if test ".$host" != .NONE; then
+if test ".$host" != .NONE -a ".$host" != . ; then
$1="$host"
-elif test ".$nonopt" != .NONE; then
+elif test ".$nonopt" != .NONE -a ".$nonopt" != . ; then
$1="$nonopt"
else
$1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
@@ -332,35 +338,39 @@
AC_DEFUN(AC_CHECK_LONGLONG,[dnl
AC_MSG_CHECKING(for built-in type long long)
- AC_CACHE_VAL(ac_cv_type_longlong,[
+ AC_CACHE_VAL(ac_cv_type_longlong,[dnl
AC_TRY_LINK([
#include <sys/types.h>
],[
long long X = 2, Y = 1, Z;
Z = X / Y;
],
- AC_DEFINE(HAVE_LONGLONG)
ac_cv_type_longlong=yes,
ac_cv_type_longlong=no
)dnl
])dnl
+ if test ".$ac_cv_type_longlong" = .yes; then
+ AC_DEFINE(HAVE_LONGLONG)
+ fi
AC_MSG_RESULT([$ac_cv_type_longlong])
])dnl
AC_DEFUN(AC_CHECK_LONGDOUBLE,[dnl
AC_MSG_CHECKING(for built-in type long double)
- AC_CACHE_VAL(ac_cv_type_longdouble,[
+ AC_CACHE_VAL(ac_cv_type_longdouble,[dnl
AC_TRY_LINK([
#include <sys/types.h>
],[
long double X = 2, Y = 1, Z;
Z = X / Y;
],
- AC_DEFINE(HAVE_LONGDOUBLE)
ac_cv_type_longdouble=yes,
ac_cv_type_longdouble=no
)dnl
])dnl
+ if test ".$ac_cv_type_longdouble" = .yes; then
+ AC_DEFINE(HAVE_LONGDOUBLE)
+ fi
AC_MSG_RESULT([$ac_cv_type_longdouble])
])dnl
@@ -813,7 +825,9 @@
fi
i=`expr $i + 1`
done
+changequote([, ])dnl
(eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |\
+changequote(, )dnl
sed -e ':join' \
-e '/,[ ]*$/N' \
-e 's/,[ ]*\n[ ]*/, /' \
@@ -1297,7 +1311,7 @@
rc=`cat conftestval`,
rc=failed,
rc=failed
-)dnl
+)
CFLAGS="$OCFLAGS"
if test ".$rc" = .ok; then
ac_cv_check_sjlj=$testtype
@@ -1393,7 +1407,7 @@
nsig=`cat conftestval`,
nsig=32,
nsig=32
-)dnl
+)
AC_MSG_RESULT([$nsig])
AC_DEFINE_UNQUOTED($1, $nsig)
])
@@ -1417,7 +1431,7 @@
AC_DEFUN(AC_CHECK_EXTLIB,[dnl
AC_ARG_WITH($2,dnl
-[ --with-]substr([$2[[=DIR]] ], 0, 19)[build against $1 library (default=no)],
+[ --with-]substr([$2[[=DIR]] ], 0, 19)[build against $1 library (default=no)],[
if test ".$with_$2" = .yes; then
# via config script
$2_version=`($2-config --version) 2>/dev/null`
@@ -1462,7 +1476,7 @@
fi
# in any subarea
if test ".$found" = .0; then
-changequote(, )dnl
+changequote(, )
for file in x `find $with_$2 -name "$4" -type f -print`; do
test .$file = .x && continue
dir=`echo $file | sed -e 's;[[^/]]*$;;' -e 's;\(.\)/$;\1;'`
@@ -1474,7 +1488,7 @@
dir=`echo $file | sed -e 's;[[^/]]*$;;' -e 's;\(.\)/$;\1;'`
LDFLAGS="$LDFLAGS -L$dir"
done
-changequote([, ])dnl
+changequote([, ])
fi
fi
fi
@@ -1484,11 +1498,11 @@
if test ".$with_$2" = .no; then
AC_ERROR([Unable to find $1 library])
fi
-,
+],[
if test ".$with_$2" = .; then
with_$2=no
fi
-)dnl
+])
AC_MSG_CHECKING(whether to build against $1 library)
if test ".$with_$2" = .yes; then
ifelse([$5], , :, [$5])
@@ -1566,7 +1580,7 @@
ac_cv_check_mcsc=no,
ac_cv_check_mcsc=no
)dnl
-])dnl
+])
AC_MSG_RESULT([$ac_cv_check_mcsc])
if test ".$ac_cv_check_mcsc" = .yes; then
ifelse([$1], , :, [$1])
@@ -1764,10 +1778,10 @@
],[
dnl # cross-platform => failed
ac_cv_stacksetup_$1='guessed:(skaddr),(sksize)'
-])dnl
+])
dnl # restore original compile environment
CFLAGS="$OCFLAGS"
-])dnl
+])
fi
dnl # extract result ingredients of single cached result value
type=`echo $ac_cv_stacksetup_$1 | sed -e 's;:.*$;;'`
@@ -1785,5 +1799,5 @@
AC_MSG_VERBOSE([$]$3)
])
-divert
+divert(0)
diff -u -r --exclude='*.o' ngpt-2.0.3-orig/configure.in ngpt-2.0.3-production/configure.in
--- ngpt-2.0.3-orig/configure.in 2002-09-24 18:07:19.000000000 +0200
+++ ngpt-2.0.3-production/configure.in 2002-10-02 07:00:36.000000000 +0200
@@ -633,12 +633,12 @@
dnl # whether to build thread_db library
AC_MSG_CHECKING(whether to build thread_db library)
AC_ARG_ENABLE(thread_db,dnl
-[ --enable-thread_db build thread_db library (default=no)],
-enable_thread_db="$enableval",
+[ --enable-thread_db build thread_db library (default=no)],[
+enable_thread_db="$enableval"
if test ".$enable_thread_db" = .; then
enable_thread_db=no
fi
-)dnl
+])
AC_MSG_RESULT([$enable_thread_db])
if test ".$enable_thread_db" = .yes; then
LIBTHREAD_DB_LA=libthread_db.la