autoconf
[Top][All Lists]
Advanced

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

Re: [Fwd: libtool AC_ARG_WITH and autoconf 2.59]


From: Howard Chu
Subject: Re: [Fwd: libtool AC_ARG_WITH and autoconf 2.59]
Date: Thu, 25 Aug 2005 11:17:42 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050821 SeaMonkey/1.0a

Something like this seems to be pretty painless...

Create an AC_PRESERVE_OPTION_ORDER macro which restores the old
behavoir?  Then wrap the code Howard's patch removed, in one macro
and the new code in another macro.  One of the macros would expand
to nothing, AC_PRESERVE_OPTION_ORDER would change which one did.

That would be OK. Maybe AC_PRESERVE_HELP_ORDER instead, that might be more clear.



--
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  OpenLDAP Core Team            http://www.openldap.org/project/
--- general.m4.O        2004-10-01 18:09:15.000000000 -0700
+++ general.m4  2005-08-25 11:16:25.000000000 -0700
@@ -1284,14 +1284,25 @@
 ## Selecting optional features.  ##
 ## ----------------------------- ##
 
+AC_DEFUN([AC_PRESERVE_HELP_ORDER],
+[m4_define([_AC_PRESERVE_HELP_ORDER], 1)
+m4_divert_once([HELP_ENABLE], [[
+Optional Features and Packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
+m4_define([_m4_divert(HELP_ENABLE)],    _m4_divert(HELP_WITH))
+])# AC_PRESERVE_HELP_ORDER
 
 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 # ------------------------------------------------------------------------
 AC_DEFUN([AC_ARG_ENABLE],
-[m4_divert_once([HELP_ENABLE], [[
+[m4_ifndef([_AC_PRESERVE_HELP_ORDER],
+m4_divert_once([HELP_ENABLE], [[
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])dnl
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]]))dnl
 m4_divert_once([HELP_ENABLE], [$2])dnl
 # Check whether --enable-$1 or --disable-$1 was given.
 if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then
@@ -1316,10 +1327,11 @@
 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
 # --------------------------------------------------------------------
 AC_DEFUN([AC_ARG_WITH],
-[m4_divert_once([HELP_WITH], [[
+[m4_ifndef([_AC_PRESERVE_HELP_ORDER],
+m4_divert_once([HELP_WITH], [[
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]]))
 m4_divert_once([HELP_WITH], [$2])dnl
 # Check whether --with-$1 or --without-$1 was given.
 if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then

reply via email to

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