]> jfr.im git - irc/thales.git/blame - acinclude.m4
unrealmodules
[irc/thales.git] / acinclude.m4
CommitLineData
2ace9480 1AC_DEFUN(AC_CHECK_LIB_LOC,
2[AC_MSG_CHECKING([for lib$2 in $1])
3ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
4AC_CACHE_VAL(ac_cv_lib_loc_$ac_lib_var,
5[ac_save_LIBS="$LIBS"
6LIBS="-L$1 -l$2 $6 $LIBS"
7AC_TRY_LINK(
8[/* We use char because int might match the return type of a gcc2
9 builtin and then its argument prototype would still apply. */
10char $3();
11],
12 [$3()],
13 eval "ac_cv_lib_loc_$ac_lib_var=yes",
14 eval "ac_cv_lib_loc_$ac_lib_var=no")
15LIBS="$ac_save_LIBS"
16])dnl
17if eval "test \"`echo '$ac_cv_lib_loc_'$ac_lib_var`\" = yes"; then
18 AC_MSG_RESULT(yes)
19 ifelse([$4], ,
20[LIBS="-L$1 -l$2 $LIBS"
21], [$4])
22else
23 AC_MSG_RESULT(no)
24ifelse([$5], , , [$5
25])dnl
26fi
27])