diff options
author | James Peach <jpeach@samba.org> | 2006-12-31 06:53:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:49 -0500 |
commit | 17a8c7cb9206a99360cfd33f1d29ef727b581955 (patch) | |
tree | 5e9f8f79fb013f29aef8a9b41c64e43e32987837 /source3/aclocal.m4 | |
parent | 62382d19e9d31177679fc0e89c16b95b1c35cbef (diff) | |
download | samba-17a8c7cb9206a99360cfd33f1d29ef727b581955.tar.gz samba-17a8c7cb9206a99360cfd33f1d29ef727b581955.tar.bz2 samba-17a8c7cb9206a99360cfd33f1d29ef727b581955.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.
(This used to be commit 5e1fbcc403c471ecaaa37e8cd54b719b65dd7495)
Diffstat (limited to 'source3/aclocal.m4')
-rw-r--r-- | source3/aclocal.m4 | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4 index b27dc2ec5d..b66a1c253e 100644 --- a/source3/aclocal.m4 +++ b/source3/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]) |