summaryrefslogtreecommitdiffstats
path: root/source/aclocal.m4
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-12-31 06:53:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:49 -0500
commit5e1fbcc403c471ecaaa37e8cd54b719b65dd7495 (patch)
tree1ce8ce4921d822ddf367e5cd13407ea1229dbc5f /source/aclocal.m4
parent2117904f18869fca0d4770883cf2de5fb00c4f85 (diff)
downloadsamba-5e1fbcc403c471ecaaa37e8cd54b719b65dd7495.tar.gz
samba-5e1fbcc403c471ecaaa37e8cd54b719b65dd7495.tar.xz
samba-5e1fbcc403c471ecaaa37e8cd54b719b65dd7495.zip
r20429: Restructure the libuuid API tests to handle the case where libuuid
is (effectively) in libc. Convert AC_LIBTESTFUNC to use the mystically undocumented m4_ifval, which fixes some quoting problems when providing shell code for the if-true and if-false branches.
Diffstat (limited to 'source/aclocal.m4')
-rw-r--r--source/aclocal.m438
1 files changed, 21 insertions, 17 deletions
diff --git a/source/aclocal.m4 b/source/aclocal.m4
index b27dc2ec5dd..b66a1c253ec 100644
--- a/source/aclocal.m4
+++ b/source/aclocal.m4
@@ -61,55 +61,59 @@ dnl adding libraries for symbols that are in libc.
dnl
dnl On success, the default actions ensure that HAVE_FOO is defined. The lib
dnl is always added to $LIBS if it was found to be necessary. The caller
-dnl can use SMB_LIB_REMOVE to strp this if necessary.
+dnl can use SMB_REMOVE_LIB to strp this if necessary.
AC_DEFUN([AC_LIBTESTFUNC],
[
AC_CHECK_FUNCS($2,
[
# $2 was found in libc or existing $LIBS
- ifelse($3, [],
+ m4_ifval([$3],
[
- AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
- [Whether $2 is available])
+ $3
],
[
- $3
+ AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
+ [Whether $2 is available])
])
],
[
# $2 was not found, try adding lib$1
case " $LIBS " in
*\ -l$1\ *)
- ifelse($4, [],
+ m4_ifval([$4],
+ [
+ $4
+ ],
[
# $2 was not found and we already had lib$1
# nothing to do here by default
true
- ],
- [ $4 ])
+ ])
;;
*)
# $2 was not found, try adding lib$1
AC_CHECK_LIB($1, $2,
[
LIBS="-l$1 $LIBS"
- ifelse($3, [],
+ m4_ifval([$3],
[
- AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
- [Whether $2 is available])
+ $3
],
[
- $3
+ AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
+ [Whether $2 is available])
])
],
[
- ifelse($4, [],
+ m4_ifval([$4],
+ [
+ $4
+ ],
[
# $2 was not found in lib$1
# nothing to do here by default
true
- ],
- [ $4 ])
+ ])
])
;;
esac
@@ -543,9 +547,9 @@ AC_DEFUN([SMB_IS_LIBPTHREAD_LINKED],
dnl SMB_REMOVE_LIB(lib)
dnl Remove the given library from $LIBS
-AC_DEFUN([SMB_REMOVELIB],
+AC_DEFUN([SMB_REMOVE_LIB],
[
- LIBS=`echo $LIBS | sed -es/-l$1//g`
+ LIBS=`echo $LIBS | sed '-es/-l$1//g'`
])
dnl SMB_CHECK_DMAPI([actions if true], [actions if false])