[xiph-cvs] cvs commit: vorbis-tools acinclude.m4

Ralph Giles giles at xiph.org
Tue Feb 27 15:06:38 PST 2001



giles       01/02/27 15:06:37

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

Revision  Changes    Path
1.6       +9 -1      vorbis-tools/acinclude.m4

Index: acinclude.m4
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/acinclude.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- acinclude.m4	2000/12/17 20:29:32	1.5
+++ acinclude.m4	2001/02/27 23:06:36	1.6
@@ -210,7 +210,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