libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

support for autoconf >= 2.52


From: Bruno Haible
Subject: support for autoconf >= 2.52
Date: Sat, 29 Mar 2003 13:11:02 +0100 (CET)

AC_ARG_WITH's semantic has changed since autoconf 2.52: brackets are omitted by
default from the argument. This leads to unintelligible "configure --help"
output:

  --with-gnu-ld           assume the C compiler uses GNU ld default=no
  --with-pic              try to use only PIC/non-PIC objects default=use both

instead of

  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-pic              try to use only PIC/non-PIC objects [default=use both]

Here is a fix, tested with both autoconf 2.13 and autoconf 2.57.


2003-02-16  Bruno Haible  <address@hidden>

        Workaround autoconf >= 2.52 breakage.
        * libtool.m4 (AC_LIBTOOL_ARG_WITH): New macro.
        (_LT_AC_LTCONFIG_HACK, AC_PROG_LD): Use it.

*** libtool-1.4.3/libtool.m4    2002-10-23 02:45:04.000000000 +0200
--- libtool.m4  2003-02-16 14:01:42.000000000 +0100
***************
*** 833,839 ****
  
  ## FIXME: this should be a separate macro
  ##
! AC_ARG_WITH(pic,
  [  --with-pic              try to use only PIC/non-PIC objects [default=use 
both]],
  pic_mode="$withval", pic_mode=default)
  test -z "$pic_mode" && pic_mode=default
--- 836,842 ----
  
  ## FIXME: this should be a separate macro
  ##
! AC_LIBTOOL_ARG_WITH(pic,
  [  --with-pic              try to use only PIC/non-PIC objects [default=use 
both]],
  pic_mode="$withval", pic_mode=default)
  test -z "$pic_mode" && pic_mode=default
***************
*** 3208,3214 ****
  
  # AC_PROG_LD - find the path to the GNU or non-GNU linker
  AC_DEFUN([AC_PROG_LD],
! [AC_ARG_WITH(gnu-ld,
  [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
  test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  AC_REQUIRE([AC_PROG_CC])dnl
--- 3238,3244 ----
  
  # AC_PROG_LD - find the path to the GNU or non-GNU linker
  AC_DEFUN([AC_PROG_LD],
! [AC_LIBTOOL_ARG_WITH(gnu-ld,
  [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
  test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  AC_REQUIRE([AC_PROG_CC])dnl
***************
*** 3600,3605 ****
--- 3630,3642 ----
    INCLTDL="$LTDLINCL"
  ])
  
+ dnl AC_LIBTOOL_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+ dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+ dnl require excessive bracketing.
+ ifdef([AC_HELP_STRING],
+ [AC_DEFUN([AC_LIBTOOL_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+ [AC_DEFUN([AC_LIBTOOL_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+ 
  # old names
  AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
  AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]