[xiph-commits] r14470 - trunk/vorbis-tools

ivo at svn.xiph.org ivo at svn.xiph.org
Mon Feb 11 10:19:44 PST 2008


Author: ivo
Date: 2008-02-11 10:19:43 -0800 (Mon, 11 Feb 2008)
New Revision: 14470

Modified:
   trunk/vorbis-tools/acinclude.m4
Log:
Importing recent corrections used in ogg.m4.

Modified: trunk/vorbis-tools/acinclude.m4
===================================================================
--- trunk/vorbis-tools/acinclude.m4	2008-02-11 15:34:07 UTC (rev 14469)
+++ trunk/vorbis-tools/acinclude.m4	2008-02-11 18:19:43 UTC (rev 14470)
@@ -9,23 +9,29 @@
 [dnl 
 dnl Get the cflags and libraries
 dnl
-AC_ARG_WITH(ogg,[  --with-ogg=PFX   Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
-AC_ARG_WITH(ogg-libraries,[  --with-ogg-libraries=DIR   Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
-AC_ARG_WITH(ogg-includes,[  --with-ogg-includes=DIR   Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
-AC_ARG_ENABLE(oggtest, [  --disable-oggtest       Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
+AC_ARG_WITH(ogg,AC_HELP_STRING([--with-ogg=PFX],[Prefix where libogg is installed (optional)]), ogg_prefix="$withval", ogg_prefix="")
+AC_ARG_WITH(ogg-libraries,AC_HELP_STRING([--with-ogg-libraries=DIR],[Directory where libogg library is installed (optional)]), ogg_libraries="$withval", ogg_libraries="")
+AC_ARG_WITH(ogg-includes,AC_HELP_STRING([--with-ogg-includes=DIR],[Directory where libogg header files are installed (optional)]), ogg_includes="$withval", ogg_includes="")
+AC_ARG_ENABLE(oggtest,AC_HELP_STRING([--disable-oggtest],[Do not try to compile and run a test Ogg program]),, enable_oggtest=yes)
 
   if test "x$ogg_libraries" != "x" ; then
     OGG_LIBS="-L$ogg_libraries"
+  elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
+    OGG_LIBS=""
   elif test "x$ogg_prefix" != "x" ; then
     OGG_LIBS="-L$ogg_prefix/lib"
   elif test "x$prefix" != "xNONE" ; then
     OGG_LIBS="-L$prefix/lib"
   fi
 
-  OGG_LIBS="$OGG_LIBS -logg"
+  if test "x$ogg_prefix" != "xno" ; then
+    OGG_LIBS="$OGG_LIBS -logg"
+  fi
 
   if test "x$ogg_includes" != "x" ; then
     OGG_CFLAGS="-I$ogg_includes"
+  elif test "x$ogg_prefix" = "xno" || test "x$ogg_prefix" = "xyes" ; then
+    OGG_CFLAGS=""
   elif test "x$ogg_prefix" != "x" ; then
     OGG_CFLAGS="-I$ogg_prefix/include"
   elif test "x$prefix" != "xNONE"; then
@@ -33,7 +39,12 @@
   fi
 
   AC_MSG_CHECKING(for Ogg)
-  no_ogg=""
+  if test "x$ogg_prefix" = "xno" ; then
+    no_ogg="disabled"
+    enable_oggtest="no"
+  else
+    no_ogg=""
+  fi
 
 
   if test "x$enable_oggtest" = "xyes" ; then
@@ -62,9 +73,12 @@
        LIBS="$ac_save_LIBS"
   fi
 
-  if test "x$no_ogg" = "x" ; then
+  if test "x$no_ogg" = "xdisabled" ; then
+     AC_MSG_RESULT(no)
+     ifelse([$2], , :, [$2])
+  elif test "x$no_ogg" = "x" ; then
      AC_MSG_RESULT(yes)
-     ifelse([$1], , :, [$1])     
+     ifelse([$1], , :, [$1])
   else
      AC_MSG_RESULT(no)
      if test -f conf.oggtest ; then
@@ -113,13 +127,15 @@
 [dnl 
 dnl Get the cflags and libraries
 dnl
-AC_ARG_WITH(vorbis,[  --with-vorbis=PFX   Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
-AC_ARG_WITH(vorbis-libraries,[  --with-vorbis-libraries=DIR   Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
-AC_ARG_WITH(vorbis-includes,[  --with-vorbis-includes=DIR   Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
-AC_ARG_ENABLE(vorbistest, [  --disable-vorbistest       Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
+AC_ARG_WITH(vorbis,AC_HELP_STRING([--with-vorbis=PFX],[Prefix where libvorbis is installed (optional)]), vorbis_prefix="$withval", vorbis_prefix="")
+AC_ARG_WITH(vorbis-libraries,AC_HELP_STRING([--with-vorbis-libraries=DIR],[Directory where libvorbis library is installed (optional)]), vorbis_libraries="$withval", vorbis_libraries="")
+AC_ARG_WITH(vorbis-includes,AC_HELP_STRING([--with-vorbis-includes=DIR],[Directory where libvorbis header files are installed (optional)]), vorbis_includes="$withval", vorbis_includes="")
+AC_ARG_ENABLE(vorbistest,AC_HELP_STRING([--disable-vorbistest],[Do not try to compile and run a test Vorbis program]),, enable_vorbistest=yes)
 
   if test "x$vorbis_libraries" != "x" ; then
     VORBIS_LIBS="-L$vorbis_libraries"
+  elif test "x$vorbis_prefix" = "xno" || test "x$vorbis_prefix" = "xyes" ; then
+    VORBIS_LIBS=""
   elif test "x$vorbis_prefix" != "x" ; then
     VORBIS_LIBS="-L$vorbis_prefix/lib"
   elif test "x$prefix" != "xNONE"; then
@@ -128,10 +144,14 @@
 
   VORBISFILE_LIBS="$VORBIS_LIBS -lvorbisfile"
   VORBISENC_LIBS="$VORBIS_LIBS -lvorbisenc"
-  VORBIS_LIBS="$VORBIS_LIBS -lvorbis"
+  if test "x$vorbis_prefix" != "xno" ; then
+    VORBIS_LIBS="$VORBIS_LIBS -lvorbis"
+  fi
 
   if test "x$vorbis_includes" != "x" ; then
     VORBIS_CFLAGS="-I$vorbis_includes"
+  elif test "x$vorbis_prefix" = "xno" || test "x$vorbis_prefix" = "xyes" ; then
+    VORBIS_CFLAGS=""
   elif test "x$vorbis_prefix" != "x" ; then
     VORBIS_CFLAGS="-I$vorbis_prefix/include"
   elif test "x$prefix" != "xNONE"; then
@@ -146,7 +166,12 @@
   LIBS="$xiph_saved_LIBS"
 
   AC_MSG_CHECKING(for Vorbis)
-  no_vorbis=""
+  if test "x$vorbis_prefix" = "xno" ; then
+    no_vorbis="disabled"
+    enable_vorbistest="no"
+  else
+    no_vorbis=""
+  fi
 
 
   if test "x$enable_vorbistest" = "xyes" ; then
@@ -175,9 +200,12 @@
        LIBS="$ac_save_LIBS"
   fi
 
-  if test "x$no_vorbis" = "x" ; then
+  if test "x$no_vorbis" = "xdisabled" ; then
+     AC_MSG_RESULT(no)
+     ifelse([$2], , :, [$2])
+  elif test "x$no_vorbis" = "x" ; then
      AC_MSG_RESULT(yes)
-     ifelse([$1], , :, [$1])     
+     ifelse([$1], , :, [$1])
   else
      AC_MSG_RESULT(no)
      if test -f conf.vorbistest ; then
@@ -230,15 +258,17 @@
 [dnl 
 dnl Get the cflags and libraries
 dnl
-AC_ARG_WITH(ao,[  --with-ao=PFX   Prefix where libao is installed (optional)], ao_prefix="$withval", ao_prefix="")
-AC_ARG_WITH(ao-libraries,[  --with-ao-libraries=DIR   Directory where libao library is installed (optional)], ao_libraries="$withval", ao_libraries="")
-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)
+AC_ARG_WITH(ao,AC_HELP_STRING([--with-ao=PFX],[Prefix where libao is installed (optional)]), ao_prefix="$withval", ao_prefix="")
+AC_ARG_WITH(ao-libraries,AC_HELP_STRING([--with-ao-libraries=DIR],[Directory where libao library is installed (optional)]), ao_libraries="$withval", ao_libraries="")
+AC_ARG_WITH(ao-includes,AC_HELP_STRING([--with-ao-includes=DIR],[Directory where libao header files are installed (optional)]), ao_includes="$withval", ao_includes="")
+AC_ARG_ENABLE(aotest,AC_HELP_STRING([--disable-aotest],[Do not try to compile and run a test ao program]),, enable_aotest=yes)
 
   if test "x$ao_prefix" != "xno"
   then
     if test "x$ao_libraries" != "x" ; then
       AO_LIBS="-L$ao_libraries"
+  elif test "x$ao_prefix" = "xno" || test "x$ao_prefix" = "xyes" ; then
+    AO_LIBS=""
     elif test "x$ao_prefix" != "x" -a "x$ao_prefix" != "xyes"; then
       AO_LIBS="-L$ao_prefix/lib"
     elif test "x$prefix" != "xNONE"; then
@@ -247,6 +277,8 @@
 
     if test "x$ao_includes" != "x" ; then
       AO_CFLAGS="-I$ao_includes"
+  elif test "x$ao_prefix" = "xno" || test "x$ao_prefix" = "xyes" ; then
+    AO_CFLAGS=""
     elif test "x$ao_prefix" != "x" -a "x$ao_prefix" != "xyes"; then
       AO_CFLAGS="-I$ao_prefix/include"
     elif test "x$prefix" != "xNONE"; then
@@ -261,10 +293,17 @@
       ])
     ])
 
+  if test "x$ao_prefix" != "xno" ; then
     AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
+  fi
 
     AC_MSG_CHECKING(for ao)
+  if test "x$ao_prefix" = "xno" ; then
+    no_ao="disabled"
+    enable_aotest="no"
+  else
     no_ao=""
+  fi
 
 
     if test "x$enable_aotest" = "xyes" ; then
@@ -293,9 +332,12 @@
        LIBS="$ac_save_LIBS"
     fi
 
-    if test "x$no_ao" = "x" ; then
+    if test "x$no_ao" = "xdisabled" ; then
+       AC_MSG_RESULT(no)
+       ifelse([$2], , :, [$2])
+    elif test "x$no_ao" = "x" ; then
        AC_MSG_RESULT(yes)
-       ifelse([$1], , :, [$1])     
+       ifelse([$1], , :, [$1])
     else
        AC_MSG_RESULT(no)
        if test -f conf.aotest ; then
@@ -715,4 +757,3 @@
 fi
 
 ])
-



More information about the commits mailing list