propagating configure cleanups
authorRalph Giles <giles@xiph.org>
Tue, 31 Oct 2000 18:40:48 +0000 (18:40 +0000)
committerRalph Giles <giles@xiph.org>
Tue, 31 Oct 2000 18:40:48 +0000 (18:40 +0000)
svn path=/trunk/vorbis/; revision=864

autogen.sh
configure.in

index 1e6fa11..5d6b972 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-# (basically ripped directly from enlightenment's autogen.sh)
+# Run this to set up the build system: configure, makefiles, etc.
+# (based on the version in enlightenment's cvs)
+
+package="vorbis"
 
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
@@ -10,7 +12,7 @@ DIE=0
 
 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
         echo
-        echo "You must have autoconf installed to compile libvorbis."
+        echo "You must have autoconf installed to compile $package."
         echo "Download the appropriate package for your distribution,"
         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
         DIE=1
@@ -18,12 +20,22 @@ DIE=0
 
 (automake --version) < /dev/null > /dev/null 2>&1 || {
         echo
-        echo "You must have automake installed to compile libvorbis."
-        echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
-        echo "(or a newer version if it is available)"
+        echo "You must have automake installed to compile $package."
+       echo "Download the appropriate package for your system,
+       echo "or get the source from one of the GNU ftp sites"
+       echo "listed in http://www.gnu.org/order/ftp.html"
         DIE=1
 }
 
+(libtool --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have libtool installed to compile $package."
+       echo "Download the appropriate package for your system,
+       echo "or get the source from one of the GNU ftp sites"
+       echo "listed in http://www.gnu.org/order/ftp.html"
+       DIE=1
+}
+
 if test "$DIE" -eq 1; then
         exit 1
 fi
@@ -33,12 +45,14 @@ if test -z "$*"; then
         echo "to pass any to it, please specify them on the $0 command line."
 fi
 
-echo "Generating configuration files for libvorbis, please wait...."
+echo "Generating configuration files for $package, please wait...."
 
 echo "  aclocal $ACLOCAL_FLAGS"
 aclocal $ACLOCAL_FLAGS
-echo "  autoheader"
-autoheader
+#echo "  autoheader"
+#autoheader
+echo "  libtoolize --automake"
+libtoolize --automake
 echo "  automake --add-missing"
 automake --add-missing 
 echo "  autoconf"
index e8c0ed3..926d3e3 100644 (file)
@@ -132,46 +132,7 @@ fi
 
 AC_HEADER_STDC
 
-dnl AC_PATH_X
-dnl AC_PATH_XTRA
-
-#AC_CHECK_LIB(pthread, pthread_create, 
-#      pthread_lib="-lpthread"; AC_DEFINE(HAVE_LIBPTHREAD), :)
-# We no longer use config.h
-AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :)
-
-#dnl Linuxthreads require you to define _REENTRANT in all threaded
-#dnl code.  Bogus, bogus...
-#
-#if test -n "$pthread_lib"; then
-#      case $host in 
-#      i?86-*-linux*)
-#              AC_DEFINE(_REENTRANT)
-#              ;;
-#      esac
-#fi
-# We no longer use config.h
-
-#if test -n "$x_libraries"; then
-#      XOGG="yes"
-#
-#      dnl If we find libgtk installed, great; otherwise assume we have
-#      dnl to build it ourselves.
-#
-#      AC_CHECK_LIB(gtk, gtk_main, :, LIBGTKDIR="libgtk", $X_LIBS -lglib -lgdk -lX11 -lXext -lm)
-#
-#      dnl libpthread is required for xogg.
-#
-#      if test -z "$pthread_lib"; then XOGG=""; fi
-#
-#      dnl If we don't have libgtk installed, and we don't have a libgtk 
-#      dnl  subdirectory to build the library ourself, we can't build xogg.
-#
-#      if test -n "$LIBGTKDIR" -a ! -d "$LIBGTKDIR"; then
-#              XOGG=""
-#              LIBGTKDIR=""
-#      fi
-#fi
+AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread")
 
 dnl This seems to be the only way to make autoconf only *sometimes* configure
 dnl a subdirectory with AC_CONFIG_SUBDIRS.  "__noconf" is assumed to not 
@@ -181,13 +142,6 @@ dnl if clause.
 
 dummy="__noconf"
 
-#if test -d "$LIBGTKDIR"; then
-#      enable_shared="no"; export enable_shared
-#      dummy="libgtk"
-#      AC_CONFIG_SUBDIRS("$dummy")
-#      X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS"
-#fi
-
 # check macro modified from Jon Shiring's to compensate for autoconf's lagging
 # behind the times on type madness
 
@@ -322,10 +276,8 @@ dnl --------------------------------------------------
 dnl Do substitutions
 dnl --------------------------------------------------
 
-AC_SUBST(LIBS)
 AC_SUBST(DEBUG)
 AC_SUBST(PROFILE)
-AC_SUBST(CC)
 AC_SUBST(pthread_lib)
 
 AC_OUTPUT(Makefile lib/Makefile doc/Makefile include/Makefile include/vorbis/Makefile include/vorbis/book/Makefile examples/Makefile)