33
30
AS_IF([test AS_VAR_GET([ac_header]) = "$3" -a AS_VAR_GET([ac_lib]) = yes],
34
31
[AS_VAR_SET([have_lib],[yes])],
35
32
[AS_VAR_SET([have_lib],[no])
38
AC_MSG_CHECKING(for $1 in $withval)
39
if test -f $withval/$3 -a -f $withval/lib$1.a
33
AS_VAR_SET([with_lib],[AS_VAR_GET([with_lib]) /usr/local /opt/csw])
36
AS_IF([test AS_VAR_GET([with_lib]) != yes],[
37
AC_MSG_CHECKING(for $1 in $withval)
38
for libloc in AS_VAR_GET([with_lib])
40
if test -f $libloc/$3 -a -f $libloc/lib$1.a
42
if cd $withval; then withval=`pwd`; cd $owd; fi
43
AS_VAR_SET([cppflags_var],[-I$withval])
44
AS_VAR_SET([libs_var],[-L$withval -l$1])
43
if cd $libloc; then libloc=`pwd`; cd $owd; fi
44
AS_VAR_SET([cppflags_var],[-I$libloc])
45
AS_VAR_SET([libs_var],[-L$libloc -l$1])
45
46
AS_VAR_SET([have_lib],[yes])
46
elif test -f $withval/include/$3 -a -f $withval/lib/lib$1.a; then
48
elif test -f $libloc/include/$3 -a -f $libloc/lib/lib$1.a; then
48
if cd $withval; then withval=`pwd`; cd $owd; fi
49
AS_VAR_SET([cppflags_var],[-I$withval/include])
50
AS_VAR_SET([libs_var],[-L$withval/lib -l$1])
50
if cd $libloc; then libloc=`pwd`; cd $owd; fi
51
AS_VAR_SET([cppflags_var],[-I$libloc/include])
52
AS_VAR_SET([libs_var],[-L$libloc/lib -l$1])
51
53
AS_VAR_SET([have_lib],[yes])
53
AC_MSG_WARN([$3 or lib$1.a not found in $withval])
54
56
AS_VAR_SET([have_lib],[no])
60
AS_IF([test AS_VAR_GET([have_lib]) = no],[
61
AC_MSG_WARN([$3 or lib$1.a not found. Try installing $1 developement packages])
59
65
AC_SUBST(cppflags_var)