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

Brendan brendan at xiph.org
Sat Jan 18 16:00:21 PST 2003



brendan     03/01/18 19:00:21

  Modified:    .        acinclude.m4
  Log:
  Pay attention to $ao_prefix = "yes" and "no" (closes #283)
  Really a five line diff but I had to reindent everything because it's all
  wrappen in a new conditional.

Revision  Changes    Path
1.22      +67 -65    vorbis-tools/acinclude.m4

Index: acinclude.m4
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/acinclude.m4,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- acinclude.m4	18 Jan 2003 22:33:08 -0000	1.21
+++ acinclude.m4	19 Jan 2003 00:00:21 -0000	1.22
@@ -235,42 +235,43 @@
 AC_ARG_WITH(ao-includes,[  --with-ao-includes=DIR   Directory where libao header files are installed (optional)], ao_includes="$withval", ao_includes="")
 AC_ARG_ENABLE(aotest, [  --disable-aotest       Do not try to compile and run a test ao program],, enable_aotest=yes)
 
-
-  if test "x$ao_libraries" != "x" ; then
-    AO_LIBS="-L$ao_libraries"
-  elif test "x$ao_prefix" != "x"; then
-    AO_LIBS="-L$ao_prefix/lib"
-  elif test "x$prefix" != "xNONE"; then
-    AO_LIBS="-L$prefix/lib"
-  fi
-
-  if test "x$ao_includes" != "x" ; then
-    AO_CFLAGS="-I$ao_includes"
-  elif test "x$ao_prefix" != "x"; then
-    AO_CFLAGS="-I$ao_prefix/include"
-  elif test "x$prefix" != "xNONE"; then
-    AO_CFLAGS="-I$prefix/include"
-  fi
-
-  # see where dl* and friends live
-  AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
-    AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
-      AC_MSG_WARN([could not find dlopen() needed by libao sound drivers
-      your system may not be supported.])
+  if test "x$ao_prefix" != "xno"
+  then
+    if test "x$ao_libraries" != "x" ; then
+      AO_LIBS="-L$ao_libraries"
+    elif test "x$ao_prefix" != "x" -a "x$ao_prefix" != "xyes"; then
+      AO_LIBS="-L$ao_prefix/lib"
+    elif test "x$prefix" != "xNONE"; then
+      AO_LIBS="-L$prefix/lib"
+    fi
+
+    if test "x$ao_includes" != "x" ; then
+      AO_CFLAGS="-I$ao_includes"
+    elif test "x$ao_prefix" != "x" -a "x$ao_prefix" != "xyes"; then
+      AO_CFLAGS="-I$ao_prefix/include"
+    elif test "x$prefix" != "xNONE"; then
+      AO_CFLAGS="-I$prefix/include"
+    fi
+
+    # see where dl* and friends live
+    AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
+      AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
+        AC_MSG_WARN([could not find dlopen() needed by libao sound drivers
+        your system may not be supported.])
+      ])
     ])
-  ])
 
-  AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
+    AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
 
-  AC_MSG_CHECKING(for ao)
-  no_ao=""
+    AC_MSG_CHECKING(for ao)
+    no_ao=""
 
 
-  if test "x$enable_aotest" = "xyes" ; then
-    ac_save_CFLAGS="$CFLAGS"
-    ac_save_LIBS="$LIBS"
-    CFLAGS="$CFLAGS $AO_CFLAGS"
-    LIBS="$LIBS $AO_LIBS"
+    if test "x$enable_aotest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $AO_CFLAGS"
+      LIBS="$LIBS $AO_LIBS"
 dnl
 dnl Now check if the installed ao is sufficiently new.
 dnl
@@ -290,45 +291,46 @@
 ],, no_ao=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
        CFLAGS="$ac_save_CFLAGS"
        LIBS="$ac_save_LIBS"
-  fi
+    fi
 
-  if test "x$no_ao" = "x" ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$1], , :, [$1])     
-  else
-     AC_MSG_RESULT(no)
-     if test -f conf.aotest ; then
-       :
-     else
-       echo "*** Could not run ao test program, checking why..."
-       CFLAGS="$CFLAGS $AO_CFLAGS"
-       LIBS="$LIBS $AO_LIBS"
+    if test "x$no_ao" = "x" ; then
+       AC_MSG_RESULT(yes)
+       ifelse([$1], , :, [$1])     
+    else
+       AC_MSG_RESULT(no)
+       if test -f conf.aotest ; then
+         :
+       else
+         echo "*** Could not run ao test program, checking why..."
+         CFLAGS="$CFLAGS $AO_CFLAGS"
+         LIBS="$LIBS $AO_LIBS"
        AC_TRY_LINK([
 #include <stdio.h>
 #include <ao/ao.h>
-],     [ return 0; ],
-       [ echo "*** The test program compiled, but did not run. This usually means"
-       echo "*** that the run-time linker is not finding ao or finding the wrong"
-       echo "*** version of ao. If it is not finding ao, you'll need to set your"
-       echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-       echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-       echo "*** is required on your system"
-       echo "***"
-       echo "*** If you have an old version installed, it is best to remove it, although"
-       echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-       [ echo "*** The test program failed to compile or link. See the file config.log for the"
-       echo "*** exact error that occured. This usually means ao was incorrectly installed"
-       echo "*** or that you have moved ao since it was installed." ])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-     AO_CFLAGS=""
-     AO_LIBS=""
-     ifelse([$2], , :, [$2])
+],       [ return 0; ],
+         [ echo "*** The test program compiled, but did not run. This usually means"
+         echo "*** that the run-time linker is not finding ao or finding the wrong"
+         echo "*** version of ao. If it is not finding ao, you'll need to set your"
+         echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+         echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+         echo "*** is required on your system"
+         echo "***"
+         echo "*** If you have an old version installed, it is best to remove it, although"
+         echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+         [ echo "*** The test program failed to compile or link. See the file config.log for the"
+         echo "*** exact error that occured. This usually means ao was incorrectly installed"
+         echo "*** or that you have moved ao since it was installed." ])
+         CFLAGS="$ac_save_CFLAGS"
+         LIBS="$ac_save_LIBS"
+       fi
+       AO_CFLAGS=""
+       AO_LIBS=""
+       ifelse([$2], , :, [$2])
+    fi
+    AC_SUBST(AO_CFLAGS)
+    AC_SUBST(AO_LIBS)
+    rm -f conf.aotest
   fi
-  AC_SUBST(AO_CFLAGS)
-  AC_SUBST(AO_LIBS)
-  rm -f conf.aotest
 ])
 
 dnl This macros shamelessly stolen from

<p><p>--- >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