[Liboss-commit] CVS: liboss acinclude.m4,1.1.1.1,1.2 configure.in,1.36,1.37
Brought to you by:
thesin
|
From: Alexander S. <mrv...@us...> - 2003-01-12 16:58:04
|
Update of /cvsroot/liboss/liboss
In directory sc8-pr-cvs1:/tmp/cvs-serv8295
Modified Files:
acinclude.m4 configure.in
Log Message:
Almost got this all cross-platformy, but I'm getting sh parse errors and I have no idea why.
Index: acinclude.m4
===================================================================
RCS file: /cvsroot/liboss/liboss/acinclude.m4,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- acinclude.m4 3 May 2002 16:19:55 -0000 1.1.1.1
+++ acinclude.m4 12 Jan 2003 16:57:59 -0000 1.2
@@ -33,5 +33,4 @@
ifelse([$2],[],[:],[$2])
else
ifelse([$3],[],[:],[$3])
- fi])
-
+ fi])
\ No newline at end of file
Index: configure.in
===================================================================
RCS file: /cvsroot/liboss/liboss/configure.in,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- configure.in 12 Jan 2003 16:11:01 -0000 1.36
+++ configure.in 12 Jan 2003 16:57:59 -0000 1.37
@@ -3,7 +3,7 @@
dnl
AC_INIT([LibOSS],[0.0.1],[lib...@li...],[liboss])
AC_CONFIG_SRCDIR([src/osscat.c])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
dnl Making releases:
dnl LIBOSS_SUB += 1;
@@ -96,10 +96,7 @@
INCLUDES='-I$(top_srcdir) -I$(top_srcdir)/include'
AC_SUBST(INCLUDES)
-dnl where's 'open'?
-SYSTEMLIB="/usr/lib/libc.so"
-AC_CHECK_LIB(System,ioctl,[SYSTEMLIB="/usr/lib/libSystem.dylib"])
-AC_SUBST(SYSTEMLIB)
+dnl where's the stuff we want to pick up?
dnl Common cflags for all platforms
CFLAGS="$CFLAGS $nocpp $wall -I${prefix}/include -O2 $fopt $mopt"
@@ -143,7 +140,6 @@
AC_FUNC_MALLOC
AC_HEADER_DIRENT
-AC_CHECK_HEADERS(sys/syscall.h,[USE_DLOPEN="-DUSE_DLOPEN"],[USE_DLOPEN=""])
dnl
dnl CoreAudio
dnl
@@ -158,19 +154,33 @@
AC_SYS_LONG_FILE_NAMES
+
dnl
dnl Required libraries
dnl
+HAS_SYSCALLS=
+HAS_DLOPENS=
LIBDL=
-AC_CHECK_LIB(dl,dlsym,[LIBDL="-ldl"])
+USE_DLOPEN=
+SYSTEMLIB="/usr/lib/libc.so"
+AC_SUBST(HAS_SYSCALLS)
+AC_SUBST(HAS_DLOPENS)
+AC_SUBST(SYSTEMLIB)
AC_SUBST(LIBDL)
+AC_CHECK_HEADERS(sys/syscall.h,AC_CHECK_FUNC(syscall,HAS_SYSCALLS="true",[]),[])
+
+if test x$HAS_SYSCALLS != xtrue
+ AC_CHECK_LIB(dl,dlsym,[
+ HAS_DLOPENS="true"
+ LIBDL="-ldl"
+ USE_DLOPEN="-DUSE_DLOPEN"
+ ],[
+ AC_MSG_ERROR("Cannot find syscall() or dlsym()")])
+ AC_CHECK_LIB(System,ioctl,SYSTEMLIB="/usr/lib/libSystem.dylib",
+ AC_CHECK_LIB(c,ioctl,,AC_MSG_ERROR("Cannot find the C library")))
+fi
-dnl dlcompat has a function that's a drop-in replacement
-dnl for dlsym that will automatically prepend underscores on a failed lookup
-DLSYM_UNDERSCORE=
-dnl AC_CHECK_LIB(dl,dlsym_prepend_underscore,[DLSYM_UNDERSCORE="-Ddlsym=dlsym_prepend_underscore"])
-AC_SUBST(DLSYM_UNDERSCORE)
AC_ARG_WITH(esd,
[ --with-esd=DIR where the ESound root is (DIR/include DIR/lib) ],
|