Commit f364af0d authored by Niels Möller's avatar Niels Möller
Browse files

* acinclude.m4: AC_CHECK_MEMBER: Deleted definition (a similar

macro is included in autoconf-2.50).
AC_CHECK_VAR: Deleted.
(AC_CHECK_KRB_LIB): Don't use changequote.

Rev: acinclude.m4:1.11
parent 808629fa
dnl (progn (modify-syntax-entry ?' "'") (modify-syntax-entry ?` "'"))
dnl AC_CHECK_MEMBER(includes, struct, field)
AC_DEFUN([AC_CHECK_MEMBER],
[ AC_CACHE_CHECK([if $2 has member $3],
lsh_cv_decl_struct_$2_$3,
[AC_TRY_COMPILE([$1],
changequote(<{, }>)dnl
<{ struct $2 x; (void) &x.$3; }>,
changequote([, ])dnl
[lsh_cv_decl_struct_$2_$3=yes],
[lsh_cv_decl_struct_$2_$3=no])])
if test x$lsh_cv_decl_struct_$2_$3 = xyes; then
AC_DEFINE_UNQUOTED(`echo HAVE_$3 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`)
fi
])
dnl AC_CHECK_VAR(VAR, TYPE)
AC_DEFUN([AC_CHECK_VAR],
[ AC_CACHE_CHECK(
[for $1],
lsh_cv_var_$1,
AC_TRY_LINK(, [extern $2 $1; void *p = (void *) &$1;],
[lsh_cv_var_$1=yes],
[lsh_cv_var_$1=no]))
if eval "test \"`echo '$lsh_cv_var_'$1`\" = yes"; then
AC_DEFINE_UNQUOTED(HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`)
fi
])
dnl Try to detect the type of the third arg to getsockname() et al
# Try to detect the type of the third arg to getsockname() et al
AC_DEFUN([AC_TYPE_SOCKLEN_T],
[AC_CACHE_CHECK([for socklen_t in sys/socket.h], ac_cv_type_socklen_t,
[AC_EGREP_HEADER(socklen_t, sys/socket.h,
......@@ -48,8 +19,8 @@ AC_DEFINE(socklen_t, int)
fi
])
dnl checks for gmp version 2 or later.
dnl AC_CHECK_LIBGMP(library, [, if-found [, if-not-found]])
# checks for gmp version 2 or later.
# AC_CHECK_LIBGMP(library, [, if-found [, if-not-found]])
AC_DEFUN([AC_CHECK_LIBGMP],
[AC_CACHE_CHECK([for mpz_get_d in -l$1], ac_cv_lib_$1_mpz_get_d,
[ac_save_libs="$LIBS"
......@@ -78,8 +49,8 @@ $3
fi
])
dnl checks for gmp version 2 or later.
dnl AC_SEARCH_LIBGMP(libraries, [, if-found [, if-not-found]])
# checks for gmp version 2 or later.
# AC_SEARCH_LIBGMP(libraries, [, if-found [, if-not-found]])
AC_DEFUN([AC_SEARCH_LIBGMP],
[AC_CACHE_CHECK([for library containing mpz_get_d], ac_cv_search_mpz_get_d,
[ac_search_save_LIBS="$LIBS"
......@@ -112,7 +83,7 @@ $3
fi
])
dnl LSH_PATH_ADD(path-id, directory)
# LSH_PATH_ADD(path-id, directory)
AC_DEFUN([LSH_PATH_ADD],
[AC_MSG_CHECKING($2)
ac_exists=no
......@@ -142,10 +113,10 @@ if test $ac_exists = no ; then
fi
])
dnl LSH_RPATH_ADD(dir)
# LSH_RPATH_ADD(dir)
AC_DEFUN([LSH_RPATH_ADD], [LSH_PATH_ADD(RPATH_CANDIDATE, $1)])
dnl LSH_RPATH_INIT(candidates)
# LSH_RPATH_INIT(candidates)
AC_DEFUN([LSH_RPATH_INIT],
[AC_MSG_CHECKING([for -R flag])
RPATHFLAG=''
......@@ -191,9 +162,9 @@ for d in $1 ; do
done
])
dnl Try to execute a main program, and if it fails, try adding some
dnl -R flag.
dnl LSH_RPATH_FIX
# Try to execute a main program, and if it fails, try adding some
# -R flag.
# LSH_RPATH_FIX
AC_DEFUN([LSH_RPATH_FIX],
[if test $cross_compiling = no -a "x$RPATHFLAG" != x ; then
ac_success=no
......@@ -228,26 +199,24 @@ dnl echo LDFLAGS = $LDFLAGS
fi
])
dnl Like AC_CHECK_LIB, but uses $KRB_LIBS rather than $LIBS.
dnl AC_CHECK_KRB_LIB(LIBRARY, FUNCTION, [, ACTION-IF-FOUND [,
dnl ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
# Like AC_CHECK_LIB, but uses $KRB_LIBS rather than $LIBS.
# AC_CHECK_KRB_LIB(LIBRARY, FUNCTION, [, ACTION-IF-FOUND [,
# ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
AC_DEFUN([AC_CHECK_KRB_LIB],
[AC_CHECK_LIB([$1], [$2],
ifelse([$3], ,
[ changequote(, )dnl
ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
[[ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_lib)
KRB_LIBS="-l$1 $KRB_LIBS"
], [$3]),
]], [$3]),
ifelse([$4], , , [$4
])dnl
, [$5 $KRB_LIBS])
])
dnl AC_LIB_ARGP(ACTION-IF-OK, ACTION-IF-BAD)
# AC_LIB_ARGP(ACTION-IF-OK, ACTION-IF-BAD)
AC_DEFUN([AC_LIB_ARGP],
[ ac_argp_save_LIBS="$LIBS"
ac_argp_save_LDFLAGS="$LDFLAGS"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment