[Liboss-commit] CVS: liboss configure.in,1.17,1.18
Brought to you by:
thesin
|
From: Benjamin R. <ran...@us...> - 2002-10-22 04:48:11
|
Update of /cvsroot/liboss/liboss
In directory usw-pr-cvs1:/tmp/cvs-serv3823
Modified Files:
configure.in
Log Message:
rearranged the macros so that it will detect esd even if it's not in -I and -L
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- configure.in 21 Oct 2002 23:18:32 -0000 1.17
+++ configure.in 22 Oct 2002 04:48:08 -0000 1.18
@@ -62,6 +62,13 @@
dnl
AM_INIT_AUTOMAKE("liboss", $LIBOSS_MAJOR.$LIBOSS_MINOR.$LIBOSS_SUB$LIBOSS_PRE)
+dnl ====================================================================
+dnl Stolen from KDE's autoconfig
+dnl This macro takes three Arguments like this:
+dnl AC_FIND_FILE(qmovie.h, $qt_incdirs, qt_incdir)
+dnl the filename to look for, the list of paths to check and
+dnl the variable with the result.
+
dnl
dnl Made possible to build for another arch.
dnl
@@ -164,9 +171,8 @@
dnl
AC_CHECK_LIB(dl,dlsym)
-AC_CHECK_LIB(esd,esd_open_sound)
-AC_ARG_WITH(esd-prefix,
+AC_ARG_WITH(esd,
[ --with-esd=DIR where the ESound root is (DIR/include DIR/lib) ],
esd_prefix="$withval"
)
@@ -175,16 +181,30 @@
AC_CHECK_HEADERS(esd.h,[esd=true],
[
- esd=false;
- for ac_dir in $esd_prefix/include /usr/include /usr/local/include;
- do
- AC_CHECK_HEADERS( $ac_dir/esd.h,
- [
- esd=true;
- INCLUDES="$INCLUDES $USER_INCLUDES -I$ac_dir";
- ])
- done
+ esd=false;
+ AC_MSG_CHECKING([for esd.h in little nooks and crannies])
+ for esd_include_dir in ${esd_prefix}/include /usr/include /usr/local/include; do
+ if test -f "${esd_include_dir}/esd.h"; then
+ esd=true
+ INCLUDES="-I${esd_include_dir} $USER_INCLUDES $INCLUDES"
+ AC_MSG_RESULT(${esd_include_dir})
+ break
+ fi
+ done
+ if test x$esd != xtrue; then
+ AC_MSG_RESULT(no)
+ fi
])
+
+if test x$esd = xtrue; then
+ if test -n "${esd_prefix}"; then
+ LIBS="-L${esd_prefix}/lib $LIBS"
+ fi
+ AC_CHECK_LIB(esd,esd_open_sound,[
+ esd=true;
+ LIBS="$LIBS $USER_LIBS -lesd";
+ ])
+fi
AM_CONDITIONAL(ESD, test "x$esd" = "xtrue" )
|