diff options
author | Akim Demaille <akim@epita.fr> | 1999-09-22 08:14:03 +0000 |
---|---|---|
committer | Akim Demaille <akim@epita.fr> | 1999-09-22 08:14:03 +0000 |
commit | e819cbd112e0fdebf26ecca5a5e6d59202043ac5 (patch) | |
tree | 58bedc280c09b30698177f0e86e0852cf7fea76c | |
parent | 2f32c2e1dea70d9b3c02d4a2b1e16fa660fa3fea (diff) | |
download | autoconf-e819cbd112e0fdebf26ecca5a5e6d59202043ac5.tar.gz |
1999-09-22 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (m4_default): New macro.
(AC_CHECK_LIB): When ACTION-IF-FOUND is specified, don't perform
the default action.
Reported by Pavel.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | acgeneral.m4 | 22 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | lib/autoconf/general.m4 | 22 |
4 files changed, 47 insertions, 8 deletions
@@ -1,3 +1,10 @@ +1999-09-22 Akim Demaille <akim@epita.fr> + + * acgeneral.m4 (m4_default): New macro. + (AC_CHECK_LIB): When ACTION-IF-FOUND is specified, don't perform + the default action. + Reported by Pavel. + 1999-09-21 Akim Demaille <akim@epita.fr> * acgeneral.m4 (AC_INIT_PARSE_ARGS, --help message): Use quoted diff --git a/acgeneral.m4 b/acgeneral.m4 index 92dac461..a5aa636d 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -79,6 +79,10 @@ dnl If COND is not the empty string, expand IF-TRUE, otherwise IF-FALSE. dnl Comparable to ifdef. define([ifset], [ifelse([$1],,[$3],[$2])]) +dnl m4_default(EXP1, EXP2) +dnl ---------------------- +dnl Returns EXP1 if non empty, otherwisee EXP2. +define([m4_default], [ifset([$1], [$1], [$2])]) dnl ### Defining macros @@ -1070,6 +1074,8 @@ AC_DEFUN(AC_INIT_BINSH, ]) dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR) +dnl ---------------------------------- +dnl Output the preamble of the `configure' script. AC_DEFUN(AC_INIT, [sinclude(acsite.m4)dnl sinclude(./aclocal.m4)dnl @@ -1089,6 +1095,15 @@ AC_DEFUN(AC_INCLUDE, ])]) dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) +dnl ------------------------------------------ +dnl Called by AC_INIT to buid the preamble of the `configure' scripts. +dnl 1. Trap and clean up various tmp files. +dnl 2. Set up the fd and output files +dnl 3. Remember the options given to `configure' for `config.status --recheck'. +dnl 4. Ensure a correct environment +dnl 5. Find `$srcdir', and check its validity by verifying the presence of +dnl UNIQUE-FILE-IN-SOURCE-DIR. +dnl 6. Required macros (cache, default AC_SUBST etc.) AC_DEFUN(AC_INIT_PREPARE, [trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 @@ -2140,10 +2155,11 @@ char $2(); AC_VAR_SET(ac_var, yes), AC_VAR_SET(ac_var, no)) LIBS="$ac_save_LIBS"]) AC_SHELL_IFELSE(test AC_VAR_GET(ac_var) = yes, - [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1)) + m4_default([$3], + [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1)) LIBS="-l$1 $LIBS" - $3], - [$4])dnl +]), + [$4])dnl AC_VAR_POPDEF([ac_var])dnl ])dnl AC_CHECK_LIB @@ -151,8 +151,8 @@ do # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << \EOF -`configure' configures software source code packages to adapt to many -kinds of systems. +`configure' configures software source code packages to adapt to many kinds +of systems. Usage: configure [OPTION]... [VAR=VALUE]... [HOST] diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 92dac461..a5aa636d 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -79,6 +79,10 @@ dnl If COND is not the empty string, expand IF-TRUE, otherwise IF-FALSE. dnl Comparable to ifdef. define([ifset], [ifelse([$1],,[$3],[$2])]) +dnl m4_default(EXP1, EXP2) +dnl ---------------------- +dnl Returns EXP1 if non empty, otherwisee EXP2. +define([m4_default], [ifset([$1], [$1], [$2])]) dnl ### Defining macros @@ -1070,6 +1074,8 @@ AC_DEFUN(AC_INIT_BINSH, ]) dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR) +dnl ---------------------------------- +dnl Output the preamble of the `configure' script. AC_DEFUN(AC_INIT, [sinclude(acsite.m4)dnl sinclude(./aclocal.m4)dnl @@ -1089,6 +1095,15 @@ AC_DEFUN(AC_INCLUDE, ])]) dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) +dnl ------------------------------------------ +dnl Called by AC_INIT to buid the preamble of the `configure' scripts. +dnl 1. Trap and clean up various tmp files. +dnl 2. Set up the fd and output files +dnl 3. Remember the options given to `configure' for `config.status --recheck'. +dnl 4. Ensure a correct environment +dnl 5. Find `$srcdir', and check its validity by verifying the presence of +dnl UNIQUE-FILE-IN-SOURCE-DIR. +dnl 6. Required macros (cache, default AC_SUBST etc.) AC_DEFUN(AC_INIT_PREPARE, [trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 @@ -2140,10 +2155,11 @@ char $2(); AC_VAR_SET(ac_var, yes), AC_VAR_SET(ac_var, no)) LIBS="$ac_save_LIBS"]) AC_SHELL_IFELSE(test AC_VAR_GET(ac_var) = yes, - [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1)) + m4_default([$3], + [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1)) LIBS="-l$1 $LIBS" - $3], - [$4])dnl +]), + [$4])dnl AC_VAR_POPDEF([ac_var])dnl ])dnl AC_CHECK_LIB |