[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Fix AC_PROVIDE (Was: Problems with AC_CONFIG_AUX_DIR/AC_CONFIG_AUX_
From: |
Akim Demaille |
Subject: |
FYI: Fix AC_PROVIDE (Was: Problems with AC_CONFIG_AUX_DIR/AC_CONFIG_AUX_DIR_DEFAULT) |
Date: |
03 Nov 2000 16:56:47 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
| And the second problem is not clear to me yet. Your analysis is
| right, but you missed one fact: AC_CONFIG_AUX_DIRS AC_PROVIDE's
| AC_CONFIG_AUX_DIR_DEFAULTS itself. I'm on it.
LOL... Whose the guy who revamped AC_PROVIDE recently? He is
dangerous... :)
Index: ChangeLog
from Akim Demaille <address@hidden>
AC_CONFIG_AUX_DIR_DEFAULTS overrides AC_CONFIG_AUX_DIR. Ouch.
Reported by Paul Martinolich.
* acgeneral.m4 (AC_PROVIDE): Don't forget to `m4_provide'!!!
Tss, novice...
* tests/base.at (AC_REQUIRE & AC_PROVIDE): New test.
2000-11-03 Akim Demaille <address@hidden>
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.616
diff -u -u -r1.616 acgeneral.m4
--- acgeneral.m4 2000/11/03 13:41:40 1.616
+++ acgeneral.m4 2000/11/03 15:57:38
@@ -264,10 +264,11 @@
# AC_PROVIDE(MACRO-NAME)
# ----------------------
-# Ideally we should use `AC_PROVIDE($1)', but unfortunately many third
-# party macros know that we use `AC_PROVIDE_$1' and they depend on it.
+# Ideally we should just use `m4_provide($1)', but unfortunately many
+# third party macros know that we use `AC_PROVIDE_$1' and they depend
+# on it.
m4_define([AC_PROVIDE],
-[m4_define([AC_PROVIDE_$1])])
+[m4_define([AC_PROVIDE_$1])m4_provide([$1])])
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
Index: tests/base.at
===================================================================
RCS file: /cvs/autoconf/tests/base.at,v
retrieving revision 1.4
diff -u -u -r1.4 base.at
--- tests/base.at 2000/11/03 10:39:28 1.4
+++ tests/base.at 2000/11/03 15:58:43
@@ -7,13 +7,13 @@
EOF
-## ------------ ##
-## AC_REQUIRE. ##
-## ------------ ##
+## ------------------------------- ##
+## AC_REQUIRE: topological sort.. ##
+## ------------------------------- ##
# Check that dependencies are always properly honored.
-AT_SETUP(AC_REQUIRE: topological sort)
+AT_SETUP([AC_REQUIRE: topological sort])
AT_DATA(configure.in,
[[define([REQUIRE_AND_CHECK],
@@ -54,7 +54,7 @@
## AC_REQUIRE and AC_DEFUN_ONCE: Require, expand. ##
## ----------------------------------------------- ##
-AT_SETUP(AC_REQUIRE & AC_DEFUN_ONCE: Require, expand)
+AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: Require, expand])
AT_DATA([configure.in],
[[AC_DEFUN([TEST],
@@ -97,7 +97,7 @@
## AC_REQUIRE and AC_DEFUN_ONCE: Expand, require. ##
## ----------------------------------------------- ##
-AT_SETUP(AC_REQUIRE & AC_DEFUN_ONCE: Expand, require)
+AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: Expand, require])
AT_DATA([configure.in],
[[AC_DEFUN([TEST],
@@ -122,12 +122,44 @@
..:. ) AS_EXIT(0);;
..:* ) AC_MSG_ERROR([DEFUN_ONCE is broken]);;
*:. ) AC_MSG_ERROR([DEFUN is broken (Wow, congrats!)]);;
+ * ) AC_MSG_ERROR([received `$multi_test:$single_test']);;
esac
]])
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0, [],
[configure.in:15: warning: SINGLE_TEST invoked multiple times
])
+AT_CHECK([./configure], 0)
+
+
+AT_CLEANUP(configure)
+
+
+
+## ------------------------- ##
+## AC_REQUIRE & AC_PROVIDE. ##
+## ------------------------- ##
+
+AT_SETUP([AC_REQUIRE & AC_PROVIDE])
+
+AT_DATA([configure.in],
+[[AC_DEFUN([TEST],
+[AC_REQUIRE([INNER_TEST])])
+
+AC_DEFUN([INNER_TEST],
+[inner_test=".$inner_test"])
+
+AC_PLAIN_SCRIPT
+AC_PROVIDE([INNER_TEST])
+TEST
+
+case $inner_test in
+ "" ) AS_EXIT(0);;
+ * ) AC_MSG_ERROR([received `$inner_test']);;
+esac
+]])
+
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0)
AT_CHECK([./configure], 0)
- FYI: Fix AC_PROVIDE (Was: Problems with AC_CONFIG_AUX_DIR/AC_CONFIG_AUX_DIR_DEFAULT),
Akim Demaille <=