[xiph-cvs] cvs commit: ao ao.m4

Ralph Giles giles at xiph.org
Tue Feb 27 15:09:54 PST 2001



giles       01/02/27 15:09:54

  Modified:    .        ao.m4
  Log:
  Check for dlopen() in the system libraries before trying -ldl.
  Fixes compilation on BSDs.

Revision  Changes    Path
1.4       +10 -1     ao/ao.m4

Index: ao.m4
===================================================================
RCS file: /usr/local/cvsroot/ao/ao.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ao.m4	2000/11/08 04:25:17	1.3
+++ ao.m4	2001/02/27 23:09:53	1.4
@@ -1,3 +1,4 @@
+# ao.m4
 # Configure paths for libao
 # Jack Moffitt <jack at icecast.org> 10-21-2000
 # Shamelessly stolen from Owen Taylor and Manish Singh
@@ -18,7 +19,15 @@
     AO_LIBS="-L$ao_prefix/lib"
   fi
 
-  AO_LIBS="$AO_LIBS -lao -ldl"
+  # see where dl* and friends live
+  AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
+    AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
+      AC_MSG_ERROR([could not find dlopen() needed by libao sound drivers
+      your system may not be supported.])
+    ])
+  ])
+
+  AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
 
   AC_MSG_CHECKING(for ao)
   no_ao=""

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list