This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Use AC_HELP_STRING macro to configure.in


Hi.

Here's a pretty big patch that adds the AC_HELP_STRING macro to the
configure.in file. The purpose of this macro is to format the text given
when invoking "configure --help". I've added it to all the AC_ARG_WITH
and AC_ARG_ENABLE macros, and I've also done a bit of reformatting to
explicitly quote the arguments of these macros. The AC_MSG_ERROR macro
in code adding "--with-gmp" was missing its quotes, and autoconf-2.5X is
much more picky about these things. A curious thing about AC_HELP_STRING
is that the autoconf docs say don't place it in quotes, unlike nearly
every other macro used as an argument within another macro.

In a couple of places you'll see "@<:@" and "@:>@" - these are autoconf
quadrigraphs that expand to "[" and "]", and I used these so the output
help text will still have the brackets in the output.

I also changed the AC_CONFIG_HEADER to AC_CONFIG_HEADERS macro, as the
AC_CONFIG_HEADER is obsolete, and added quotes to the AC_CONFIG_AUX_DIR
macro.

With all these changes, I rebuilt my configure script, and configured a
directory for a build. 

2002-10-19  Art Haas <ahaas@neosoft.com>

	* configure.in: Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS,
	add AC_HELP_STRING to all AC_ARG_WITH and AC_ARG_ENABLE macros,
	add autoconf quotes to the AC_CONFIG_AUX_DIR macro.

Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.371
diff -u -r1.371 configure.in
--- configure.in	19 Oct 2002 00:23:41 -0000	1.371
+++ configure.in	19 Oct 2002 23:53:28 -0000
@@ -3,26 +3,28 @@
 AC_PREREQ(2.53)dnl		dnl Minimum Autoconf version required.
 AC_INIT([GNU C Library], [(see version.h)], [glibc])
 AC_CONFIG_SRCDIR([include/features.h])
-AC_CONFIG_HEADER(config.h)
-AC_CONFIG_AUX_DIR(scripts)
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_AUX_DIR([scripts])
 
 # This will get text that should go into config.make.
 config_vars=
 
 # Check for a --with-gmp argument and set gmp-srcdir in config.make.
-AC_ARG_WITH(gmp, dnl
-  --with-gmp=DIRECTORY	  find GMP source code in DIRECTORY (not needed),
-	    [dnl
+AC_ARG_WITH([gmp],
+            AC_HELP_STRING([--with-gmp=DIRECTORY],
+                           [find GMP source code in DIRECTORY (not needed)]),
+	    [
 case "$with_gmp" in
-yes) AC_MSG_ERROR(--with-gmp requires an argument; use --with-gmp=DIRECTORY) ;;
+yes) AC_MSG_ERROR([--with-gmp requires an argument; use --with-gmp=DIRECTORY]) ;;
 ''|no) ;;
 *) config_vars="$config_vars
 gmp-srcdir = $withval" ;;
 esac
 ])
 # Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
-AC_ARG_WITH(gd, dnl
-  --with-gd=DIR           find libgd include dir and library with prefix DIR,
+AC_ARG_WITH([gd],
+            AC_HELP_STRING([--with-gd=DIR],
+                           [find libgd include dir and library with prefix DIR]),
 	    [dnl
 case "$with_gd" in
 yes|''|no) ;;
@@ -30,16 +32,18 @@
    libgd_ldflags="-L$withval/lib" ;;
 esac
 ])
-AC_ARG_WITH(gd-include, dnl
-  --with-gd-include=DIR   find libgd include files in DIR,
+AC_ARG_WITH([gd-include],
+            AC_HELP_STRING([--with-gd-include=DIR],
+                           [find libgd include files in DIR]),
             [dnl
 case "$with_gd_include" in
 ''|no) ;;
 *) libgd_include="-I$withval" ;;
 esac
 ])
-AC_ARG_WITH(gd-lib, dnl
-  --with-gd-lib=DIR       find libgd library files in DIR,
+AC_ARG_WITH([gd-lib],
+            AC_HELP_STRING([--with-gd-lib=DIR],
+                           [find libgd library files in DIR]),
             [dnl
 case "$with_gd_lib" in
 ''|no) ;;
@@ -57,22 +61,32 @@
 fi
 
 dnl Arguments to specify presence of other packages/features.
-AC_ARG_WITH(fp, dnl
-[  --with-fp		  if using floating-point hardware [default=yes]],
-	    with_fp=$withval, with_fp=yes)
+AC_ARG_WITH([fp],
+            AC_HELP_STRING([--with-fp],
+                           [if using floating-point hardware @<:@default=yes@:>@]),
+	    [with_fp=$withval],
+	    [with_fp=yes])
 AC_SUBST(with_fp)
-AC_ARG_WITH(binutils, dnl
-  --with-binutils=PATH	  specify location of binutils (as and ld),
-	    path_binutils=$withval, path_binutils='')
-AC_ARG_WITH(elf, dnl
-  --with-elf		  if using the ELF object format,
-	    elf=$withval, elf=no)
-AC_ARG_WITH(xcoff, dnl
-  --with-xcoff		  if using the XCOFF object format,
-	    xcoff=$withval, xcoff=no)
-AC_ARG_WITH(cvs, dnl
-[  --without-cvs           if CVS should not be used],
-	    with_cvs=$withval, with_cvs=yes)
+AC_ARG_WITH([binutils],
+            AC_HELP_STRING([--with-binutils=PATH],
+                           [specify location of binutils (as and ld)]),
+	    [path_binutils=$withval],
+	    [path_binutils=''])
+AC_ARG_WITH([elf],
+            AC_HELP_STRING([--with-elf],
+                           [if using the ELF object format]),
+	    [elf=$withval],
+	    [elf=no])
+AC_ARG_WITH([xcoff],
+            AC_HELP_STRING([--with-xcoff],
+                           [if using the XCOFF object format]),
+	    [xcoff=$withval],
+	    [xcoff=no])
+AC_ARG_WITH([cvs],
+            AC_HELP_STRING([--without-cvs],
+                           [if CVS should not be used]),
+	    [with_cvs=$withval],
+	    [with_cvs=yes])
 if test "$with_cvs" = yes; then
   if test -d $srcdir/CVS && grep :pserver: $srcdir/CVS/Root > /dev/null
   then
@@ -81,46 +95,59 @@
 fi
 AC_SUBST(with_cvs)
 
-AC_ARG_WITH(headers, dnl
-[  --with-headers=PATH     location of system headers to use
-                          [e.g. /usr/src/linux/include]
-                          [default=compiler default]],
-	    sysheaders=$withval, sysheaders='')
-
-AC_ARG_ENABLE(sanity-checks, dnl
-[  --disable-sanity-checks really do not use threads (should not be used
-			  except in special situations) [default=yes]],
-              enable_sanity=$enableval, enable_sanity=yes)
+AC_ARG_WITH([headers],
+            AC_HELP_STRING([--with-headers=PATH],
+	                   [location of system headers to use @<:@e.g. /usr/src/linux/include@:>@ @<:@default=compiler default@:>@]),
+	    [sysheaders=$withval],
+	    [sysheaders=''])
+
+AC_ARG_ENABLE([sanity-checks],
+              AC_HELP_STRING([--disable-sanity-checks],
+                             [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
+	      [enable_sanity=$enableval],
+	      [enable_sanity=yes])
 
 dnl Arguments to enable or disable building the static, shared, profiled,
 dnl and -fomit-frame-pointer libraries.
 dnl I've disabled this for now since we cannot build glibc without static
 dnl libraries built in the moment.
-dnl AC_ARG_ENABLE(static, dnl
-dnl [  --enable-static         build static library [default=yes]],
-dnl	      static=$enableval, static=yes)
+dnl AC_ARG_ENABLE([static],
+dnl               AC_HELP_STRING([--enable-static],
+dnl                              [build static library @<:@default=yes@:>@]),
+dnl               [static=$enableval],
+dnl               [static=yes])
 static=yes
-AC_ARG_ENABLE(shared, dnl
-[  --enable-shared         build shared library [default=yes if GNU ld & ELF]],
-	      shared=$enableval, shared=default)
-AC_ARG_ENABLE(profile, dnl
-[  --enable-profile        build profiled library [default=yes]],
-	      profile=$enableval, profile=yes)
-AC_ARG_ENABLE(omitfp, dnl
-[  --enable-omitfp         build undebuggable optimized library [default=no]],
-	      omitfp=$enableval, omitfp=no)
-AC_ARG_ENABLE(bounded, dnl
-[  --enable-bounded        build with runtime bounds checking [default=no]],
-	      bounded=$enableval, bounded=no)
-AC_ARG_ENABLE(versioning, dnl
-[  --disable-versioning    do not include versioning information in the
-                          library objects [default=yes if supported]],
-             enable_versioning=$enableval, enable_versioning=yes)
-
-AC_ARG_ENABLE(oldest-abi, dnl
-[  --enable-oldest-abi=ABI configure the oldest ABI supported [e.g. 2.2]
-                          [default=glibc default]],
-	    oldest_abi=$enableval, oldest_abi=no)
+AC_ARG_ENABLE([shared],
+              AC_HELP_STRING([--enable-shared],
+                             [build shared library @<:@default=yes if GNU ld & ELF@:>@]),
+	      [shared=$enableval],
+	      [shared=default])
+AC_ARG_ENABLE([profile],
+              AC_HELP_STRING([--enable-profile],
+                             [build profiled library @<:@default=yes@:>@]),
+	      [profile=$enableval],
+	      [profile=yes])
+AC_ARG_ENABLE([omitfp],
+              AC_HELP_STRING([--enable-omitfp],
+                             [build undebuggable optimized library @<:@default=no@:>@]),
+	      [omitfp=$enableval],
+	      [omitfp=no])
+AC_ARG_ENABLE([bounded],
+              AC_HELP_STRING([--enable-bounded],
+                             [build with runtime bounds checking @<:@default=no@:>@]),
+	      [bounded=$enableval],
+	      [bounded=no])
+AC_ARG_ENABLE([versioning],
+              AC_HELP_STRING([--disable-versioning],
+                             [do not include versioning information in the library objects @<:@default=yes if supported@:>@]),
+	      [enable_versioning=$enableval],
+	      [enable_versioning=yes])
+
+AC_ARG_ENABLE([oldest-abi],
+              AC_HELP_STRING([--enable-oldest-abi=ABI],
+                             [configure the oldest ABI supported @<:@e.g. 2.2@:>@ @<:@default=glibc default@:>@]),
+	      [oldest_abi=$enableval],
+	      [oldest_abi=no])
 if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
   oldest_abi=default
 else
@@ -129,10 +156,9 @@
 AC_SUBST(oldest_abi)
 
 dnl Generic infrastructure for drop-in additions to libc.
-AC_ARG_ENABLE(add-ons, dnl
-[  --enable-add-ons[=DIR1,DIR2]...
-			  configure and build add-ons in DIR1,DIR2,...
-                          search for add-ons if no parameter given],
+AC_ARG_ENABLE([add-ons],
+              AC_HELP_STRING([--enable-add-ons@<:@=DIRS...@:>@],
+                             [configure and build add-ons in DIR1,DIR2,...  search for add-ons if no parameter given]),
   [case "$enableval" in
     yes) add_ons=`cd $srcdir && echo */configure | sed -e 's!/configure!!g'`
 	 test "$add_ons" = "*" && add_ons= ;;
@@ -142,17 +168,23 @@
 
 dnl Let the user avoid using TLS.  Don't know why but...
 dnl XXX For now we disable support by default.
-AC_ARG_WITH(tls, dnl
-[  --with-tls              enable support for TLS],
-	    usetls=$withval, usetls=no)
-
-AC_ARG_WITH(__thread, dnl
-[  --without-__thread      do not use TLS features even when supporting them],
-	    use__thread=$withval, use__thread=yes)
-
-AC_ARG_ENABLE(hidden-plt, dnl
-[  --disable-hidden-plt    do not hide internal function calls to avoid PLT],
-	      hidden=$enableval, hidden=yes)
+AC_ARG_WITH([tls],
+            AC_HELP_STRING([--with-tls],
+                           [enable support for TLS]),
+	    [usetls=$withval],
+	    [usetls=no])
+
+AC_ARG_WITH([__thread],
+            AC_HELP_STRING([--without-__thread],
+                           [do not use TLS features even when supporting them]),
+	    [use__thread=$withval],
+	    [use__thread=yes])
+
+AC_ARG_ENABLE([hidden-plt],
+              AC_HELP_STRING([--disable-hidden-plt],
+                             [do not hide internal function calls to avoid PLT]),
+	      [hidden=$enableval],
+	      [hidden=yes])
 if test "x$hidden" = xno; then
   AC_DEFINE(NO_HIDDEN)
 fi
@@ -187,27 +219,31 @@
 
 dnl On some platforms we cannot use dynamic loading.  We must provide
 dnl static NSS modules.
-AC_ARG_ENABLE(static-nss, dnl
-[  --enable-static-nss     build static NSS modules [default=no]],
-	      static_nss=$enableval, static_nss=no)
+AC_ARG_ENABLE([static-nss],
+              AC_HELP_STRING([--enable-static-nss],
+                             [build static NSS modules @<:@default=no@:>@]),
+	      [static_nss=$enableval],
+	      [static_nss=no])
 dnl Enable static NSS also if we build no shared objects.
 if test x"$static_nss" = xyes || test x"$shared" = xno; then
   static_nss=yes
   AC_DEFINE(DO_STATIC_NSS)
 fi
 
-AC_ARG_ENABLE(force-install,
-[  --disable-force-install don't force installation of files from this package,
-			  even if they are older than the installed files],
-	      force_install=$enableval, force_install=yes)
+AC_ARG_ENABLE([force-install],
+              AC_HELP_STRING([--disable-force-install],
+                             [don't force installation of files from this package, even if they are older than the installed files]),
+	      [force_install=$enableval],
+	      [force_install=yes])
 AC_SUBST(force_install)
 
 dnl On some platforms we allow dropping compatibility with all kernel
 dnl versions.
-AC_ARG_ENABLE(kernel,
-[  --enable-kernel=VERSION compile for compatibility with kernel not older
-                           than VERSION],
-              minimum_kernel=$enableval)
+AC_ARG_ENABLE([kernel],
+              AC_HELP_STRING([--enable-kernel=VERSION],
+                             [compile for compatibility with kernel not older than VERSION]),
+	      [minimum_kernel=$enableval],
+	      [])
 dnl Prevent unreasonable values.
 if test "$minimum_kernel" = yes || test "$minimum_kernel" = no; then
   # Better nothing than this.
@@ -221,9 +257,11 @@
 dnl For the development we sometimes want gcc to issue even more warnings.
 dnl This is not the default since many of the extra warnings are not
 dnl appropriate.
-AC_ARG_ENABLE(all-warnings,
-[  --enable-all-warnings   enable all useful warnings gcc can issue],
-	      all_warnings=$enableval)
+AC_ARG_ENABLE([all-warnings],
+	      AC_HELP_STRING([--enable-all-warnings],
+                             [enable all useful warnings gcc can issue]),
+	      [all_warnings=$enableval],
+	      [])
 AC_SUBST(all_warnings)
 
 AC_CANONICAL_HOST
-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]