summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-09-21 17:09:09 -0600
committerEric Blake <eblake@redhat.com>2010-09-21 17:09:09 -0600
commit6117b5a630834020b77722acd7e76580e113b728 (patch)
tree1b684fb3f5ad258def221a478911dd4ca1186d62 /lib
parent043b96c5db243d69f817bebd2ef90dd560625f36 (diff)
downloadautoconf-6117b5a630834020b77722acd7e76580e113b728.tar.gz
AC_LIBOBJ: optimize internal use
* lib/autoconf/general.m4 (_AC_LIBOBJ): Move literal check... (AC_LIBOBJ): ...into callers. * lib/autoconf/functions.m4 (_AC_REPLACE_FUNC): Likewise, thus avoiding a second call to AS_LITERAL_IF. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/autoconf/functions.m42
-rw-r--r--lib/autoconf/general.m412
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index ca027124..70a7ddf3 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -123,7 +123,7 @@ m4_define([_AC_FUNCS_EXPANSION],
m4_define([_AC_REPLACE_FUNC],
[AC_CHECK_FUNC([$1],
[_AH_CHECK_FUNC([$1])AC_DEFINE(AS_TR_CPP([HAVE_$1]))],
- [AC_LIBOBJ([$1])])])
+ [_AC_LIBOBJ([$1])AC_LIBSOURCE([$1.c])])])
# AC_REPLACE_FUNCS(FUNCTION...)
# -----------------------------
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 14109213..59c47abb 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -2926,10 +2926,7 @@ AC_DEFUN([AC_LIBSOURCES],
# --------------------------------------------
# We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
m4_define([_AC_LIBOBJ],
-[AS_LITERAL_WORD_IF([$1],
- [AC_LIBSOURCE([$1.c])],
- [$2])dnl
-case " $LIB@&t@OBJS " in
+[case " $LIB@&t@OBJS " in
*" $1.$ac_objext "* ) ;;
*) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;;
esac
@@ -2940,10 +2937,9 @@ esac
# --------------------------
# We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'.
AC_DEFUN([AC_LIBOBJ],
-[_AC_LIBOBJ([$1],
- [AC_DIAGNOSE(syntax,
- [$0($1): you should use literals])])dnl
-])
+[_AC_LIBOBJ([$1])]dnl
+[AS_LITERAL_WORD_IF([$1], [AC_LIBSOURCE([$1.c])],
+ [AC_DIAGNOSE([syntax], [$0($1): you should use literals])])])
# _AC_LIBOBJS_NORMALIZE