You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mo DeJong <md...@cygnus.com> on 2001/07/06 11:48:20 UTC

Upgrading apr to autoconf 2.50 and libtool 1.4

On 6 Jul 2001 MAILER-DAEMON@apache.org wrote:

Hi all.

I was asked to look into upgrading apr to use the most
recent stable releases of autoconf and libtool. I
am going to try to avoid discussion of the old
"should we upgrade" thing. I am just going to post
the patch that does it and let you folks sort it
out. I just wanted to point out that the new
autoconf represents years of work and finally makes
cross compiling bearable and explainable. Ok,
enough sales pitch, now for the patch.

I was not able to attach the patch because it is
too big for the mailing list. I am going to
append the bits that are needed and explain
what needs to be done by hand.

The other part of the patch is an update for the
build/buildcheck.sh file. I think I did this correctly
but I would like someone to take a look at it since
it is getting late :)


Index: configure.in
===================================================================
RCS file: /home/cvspublic/apr/configure.in,v
retrieving revision 1.328
diff -u -r1.328 configure.in
--- configure.in	2001/07/05 00:02:09	1.328
+++ configure.in	2001/07/06 09:19:16
@@ -4,6 +4,7 @@
 dnl # Process this file with autoconf to produce a configure script.
 dnl # Use ./buildconf to prepare build files and run autoconf for APR.
 
+AC_PREREQ(2.50)
 AC_INIT(build/apr_common.m4)
 AC_CONFIG_HEADER(include/arch/unix/apr_private.h)
 AC_CONFIG_AUX_DIR(build)
Index: shmem/unix/mm/Makefile.in
===================================================================
RCS file: /home/cvspublic/apr/shmem/unix/mm/Makefile.in,v
retrieving revision 1.4
diff -u -r1.4 Makefile.in
--- shmem/unix/mm/Makefile.in	2000/05/03 17:15:48	1.4
+++ shmem/unix/mm/Makefile.in	2001/07/06 09:19:21
@@ -51,6 +51,10 @@
 includedir  = @includedir@
 mandir      = @mandir@
 
+# This is a nasty hack that is needed because libtool
+# uses top_builddir which is undefined.
+top_builddir = .
+
 SHELL       = /bin/sh
 CC          = @CC@
 CFLAGS      = @CFLAGS@
Index: shmem/unix/mm/configure.in
===================================================================
RCS file: /home/cvspublic/apr/shmem/unix/mm/configure.in,v
retrieving revision 1.9
diff -u -r1.9 configure.in
--- shmem/unix/mm/configure.in	2001/02/18 15:52:12	1.9
+++ shmem/unix/mm/configure.in	2001/07/06 09:19:23
@@ -6,7 +6,7 @@
 dnl #   standard Autoconf prolog
 dnl #
 
-AC_PREREQ(2.12)dnl
+AC_PREREQ(2.50)dnl
 AC_REVISION($1.0$)dnl
 
 dnl #   autoconf initialization



Now for the tricky bit. The shmem/unix/mm/aclocal.m4 file needs
to be modified like so:

Index: shmem/unix/mm/aclocal.m4
===================================================================
RCS file: /home/cvspublic/apr/shmem/unix/mm/aclocal.m4,v
retrieving revision 1.9
diff -u -r1.9 aclocal.m4
--- shmem/unix/mm/aclocal.m4	2000/12/31 12:26:41	1.9
+++ shmem/unix/mm/aclocal.m4	2001/07/06 09:19:22
@@ -38,32 +38,6 @@
 ## ====================================================================
 divert(-1)
 
-define(AC_PROG_LIBTOOL,[dnl
-AC_ARG_ENABLE(static,dnl
-[  --enable-static         build static libraries (default=yes)],
-enable_static="$enableval",
-enable_static=yes
-)
-AC_ARG_ENABLE(shared,dnl
-[  --enable-shared         build shared libraries (default=yes)],
-enable_shared="$enableval",
-enable_shared=yes
-)
-libtool_flags=''
-echo "Calling ltconfig with PLATFORM=$PLATFORM"
-test ".$silent"            = .yes && libtool_flags="$libtool_flags --silent"
-test ".$enable_static"     = .no  && libtool_flags="$libtool_flags 
--disable-static"
-test ".$enable_shared"     = .no  && libtool_flags="$libtool_flags 
--disable-shared"
-test ".$ac_cv_prog_gcc"    = .yes && libtool_flags="$libtool_flags 
--with-gcc"
-test ".$ac_cv_prog_gnu_ld" = .yes && libtool_flags="$libtool_flags 
--with-gnu-ld"
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" \
-${CONFIG_SHELL-/bin/sh} ltconfig --no-reexec \
-$libtool_flags --no-verify ltmain.sh $PLATFORM ||\
-AC_MSG_ERROR([libtool configuration failed])
-LIBTOOL="\$(TOP)/libtool"
-AC_SUBST(LIBTOOL)
-])
-
 define(AC_CHECK_DEBUGGING,[dnl
 AC_MSG_CHECKING(for compilation debug mode)
 AC_ARG_ENABLE(debug,dnl
@@ -209,38 +183,6 @@
 fi
 ])
 
-AC_DEFUN(AC_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  ac_cv_path_NM="$NM"
-else
-  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/nm; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep 
/dev/null >/dev/null; then
-        ac_cv_path_NM="$ac_dir/nm -B"
-      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep 
/dev/null >/dev/null; then
-        ac_cv_path_NM="$ac_dir/nm -p"
-      else
-        ac_cv_path_NM="$ac_dir/nm"
-      fi
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
-fi])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
-])
-
 define(AC_CHECK_MAXSEGSIZE,[dnl
 AC_MSG_CHECKING(for shared memory maximum segment size)
 AC_CACHE_VAL(ac_cv_maxsegsize,


Now after the above macros are deleted you will need to
pull in the full text if the libtool.m4 macros file from
the libtool 1.4 install.

I suggest adding something like this after the divert
so that folks know where the libtool macros start.

+
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+# The rest of this file is a cut and past of libtool.m4 from 1.4
+# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+

Finally, here is the buildconf patch:


Index: build/buildcheck.sh
===================================================================
RCS file: /home/cvspublic/apr/build/buildcheck.sh,v
retrieving revision 1.4
diff -u -r1.4 buildcheck.sh
--- build/buildcheck.sh	2001/04/12 04:40:21	1.4
+++ build/buildcheck.sh	2001/07/06 09:27:36
@@ -2,45 +2,42 @@
 
 echo "buildconf: checking installation..."
 
-# autoconf 2.13 or newer
+# autoconf 2.50 or newer
 ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' 
-e 's/[a-z]* *$//'`
 if test -z "$ac_version"; then
 echo "buildconf: autoconf not found."
-echo "           You need autoconf version 2.13 or newer installed"
+echo "           You need autoconf version 2.50 or newer installed"
 echo "           to build Apache from CVS."
+echo "           ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.50.tar.gz"
 exit 1
 fi
 IFS=.; set $ac_version; IFS=' '
-if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
+if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
 echo "buildconf: autoconf version $ac_version found."
-echo "           You need autoconf version 2.13 or newer installed"
+echo "           You need autoconf version 2.50 or newer installed"
 echo "           to build Apache from CVS."
+echo "           ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.50.tar.gz"
 exit 1
 else
 echo "buildconf: autoconf version $ac_version (ok)"
 fi
 
-# libtool 1.3.3 or newer
+# libtool 1.4 or newer
 libtool=`build/PrintPath glibtool libtool`
 lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 
's/[- ].*//'`
 if test -z "$lt_pversion"; then
 echo "buildconf: libtool not found."
-echo "           You need libtool version 1.3 or newer installed"
+echo "           You need libtool version 1.4 or newer installed"
 echo "           to build Apache from CVS."
+echo "           ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.4.tar.gz"
 exit 1
 fi
 lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
 IFS=.; set $lt_version; IFS=' '
 lt_status="good"
 if test "$1" = "1"; then
-   if test "$2" -lt "3"; then
+   if test "$2" -lt "4"; then
       lt_status="bad"
-   else
-      if test "$2" = "3"; then
-         if test -z "$3" -o "$3" = "1" -o "$3" = "2"; then
-            lt_status="bad"
-         fi
-      fi
    fi
 fi
 if test $lt_status = "good"; then
@@ -49,7 +46,8 @@
 fi
 
 echo "buildconf: libtool version $lt_pversion found."
-echo "           You need libtool version 1.3.3 or newer installed"
+echo "           You need libtool version 1.4 or newer installed"
 echo "           to build Apache from CVS."
+echo "           ftp://ftp.gnu.org/pub/gnu/libtool/libtool-1.4.tar.gz"
 
 exit 1


cheers
Mo DeJong

Re: Upgrading apr to autoconf 2.50 and libtool 1.4

Posted by Sascha Schumann <sa...@schumann.cx>.
> Wouldn't this would require EVERY single APR developer to upgrade
> to autoconf 2.50?  Yuck.  -- justin

    Additionally to that, using autoconf 2.50 is not encouraged
    as it still produces unportable shell code in some cases.
    For details, refer to the mailing list archive of new-httpd.
    In my humble opinion, we need to give it some time to
    stabilize before upgrading.

    - Sascha                                     Experience IRCG
      http://schumann.cx/                http://schumann.cx/ircg


Re: Upgrading apr to autoconf 2.50 and libtool 1.4

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Fri, Jul 06, 2001 at 02:48:20AM -0700, Mo DeJong wrote:
> On 6 Jul 2001 MAILER-DAEMON@apache.org wrote:
> 
> Hi all.
> 
> I was asked to look into upgrading apr to use the most
> recent stable releases of autoconf and libtool. I
> am going to try to avoid discussion of the old
> "should we upgrade" thing. I am just going to post
> the patch that does it and let you folks sort it
> out. I just wanted to point out that the new
> autoconf represents years of work and finally makes
> cross compiling bearable and explainable. Ok,
> enough sales pitch, now for the patch.

Wouldn't this would require EVERY single APR developer to upgrade 
to autoconf 2.50?  Yuck.  -- justin