[xiph-cvs] cvs commit: ices configure.in autogen.sh

Karl Heyes karl at xiph.org
Tue Jul 1 16:24:47 PDT 2003



karl        03/07/01 19:24:47

  Modified:    .        configure.in autogen.sh
  Log:
  fixup autoconf to use the shared m4 scripts

Revision  Changes    Path
1.25      +31 -65    ices/configure.in

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/ices/configure.in,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- configure.in	6 Jun 2003 00:05:19 -0000	1.24
+++ configure.in	1 Jul 2003 23:24:46 -0000	1.25
@@ -14,33 +14,33 @@
 
 dnl openbsd headers break when _XOPEN_SOURCE is defined but without it seems
 dnl to be fine
-case "$ac_cv_host" in
+case "$host" in
    *openbsd*)
    ;;
-   *) AC_DEFINE(_XOPEN_SOURCE, 500, [Define if you have POSIX and XPG specifications])
+   *) AC_DEFINE(_XOPEN_SOURCE, 600, [Define if you have POSIX and XPG specifications])
    ;;
 esac
-case $host in 
+case "$host" in 
 *-*-irix*)
         DEBUG="-g -signed -D_REENTRANT" 
-        XIPH_CFLAGS="-O2 -w -signed -D_REENTRANT"
+        XIPH_CPPFLAGS="-O2 -w -signed -D_REENTRANT"
         PROFILE="-p -g3 -O2 -signed -D_REENTRANT"
 ;;
 *-*-solaris*)
-        AC_DEFINE(__EXTENSIONS__, 1, [define to 1 for IPv6 functions on solaris])
+        AC_DEFINE(__EXTENSIONS__, 1, [define to 1 to get resolve header problem on solaris])
         DEBUG="-v -g -D_REENTRANT"
-        XIPH_CFLAGS="-xO4 -fast -w -fsimple -native -xcg92 -D_REENTRANT"
+        XIPH_CPPFLAGS="-xO4 -fast -w -fsimple -native -xcg92 -D_REENTRANT"
         PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc -D_REENTRANT"
 ;;
 *)
         DEBUG="-g -D_REENTRANT"
-        XIPH_CFLAGS="-O -D_REENTRANT"
+        XIPH_CPPFLAGS="-O -D_REENTRANT"
         PROFILE="-g -p -D_REENTRANT" 
 ;;
 esac
 if test -n "$GCC"; then
         AC_DEFINE(_GNU_SOURCE, ,[Define if you have POSIX and GNU specifications])
-        XIPH_CFLAGS="-ffast-math -fsigned-char"
+        XIPH_CPPFLAGS="-ffast-math -fsigned-char"
         DEBUG="-g"
         PROFILE="-g -pg"
 fi
@@ -90,48 +90,12 @@
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
-AC_CHECK_TYPES([socklen_t],,,[
-#include <sys/types.h>
-#include <sys/socket.h>
-])
-AH_BOTTOM([
-#ifndef HAVE_SOCKLEN_T
-      typedef int socklen_t;
-#endif
-])
-
-AC_MSG_CHECKING([how to copy va_list])
-    AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);],
-            AC_MSG_RESULT([va_copy]),
-            [ AH_TEMPLATE([va_copy], [define if va_copy is not available])
-            AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);],
-                [ AC_DEFINE([va_copy], [__va_copy])
-                AC_MSG_RESULT([__va_copy])],
-                [ AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))])
-                AC_MSG_RESULT([memcpy])]
-                )
-            ])
-
-dnl needs to be checked early on, so that additional libraries
-dnl don't trick the check
-ACX_PTHREAD([
-     LIBS="$PTHREAD_LIBS $LIBS"
-     XIPH_CFLAGS="$XIPH_CFLAGS $PTHREAD_CFLAGS"
-     CC="$PTHREAD_CC"
-])
 
 dnl Check for types
 AC_CHECK_TYPES([uint64_t],,AC_ERROR([could not find a uint64_t type]))
 
 dnl Checks for library functions.
 
-AC_CHECK_LIB(nsl, gethostbyname, LIBS="-lnsl $LIBS",)
-AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS",)
-AC_CHECK_LIB(rt, nanosleep, LIBS="-lrt $LIBS",)
-AC_CHECK_LIB(resolv, res_query, LIBS="-lresolv $LIBS",)
-
-dnl -- configure options --
-
 dnl deal with xml-config
 AC_MSG_RESULT([checking for XML configuration])
 AC_ARG_VAR([XMLCONFIG],[XML configuration program])
@@ -149,25 +113,27 @@
 fi
 XML_LIBS="$($XMLCONFIG --libs)"
 XML_CFLAGS="$($XMLCONFIG --cflags)"
-LIBS="$XML_LIBS $LIBS"
-XIPH_CFLAGS="$XIPH_CFLAGS $XML_CFLAGS"
+ac_save_LIBS="$LIBS"
+ac_save_CFLAGS="$CFLAGS"
+LIBS="$XML_LIBS $XIPH_LIBS"
+CFLAGS="$XIPH_CFLAGS $XML_CFLAGS"
 AC_CHECK_FUNC(xmlParseFile,, [AC_MSG_ERROR([There was a problem linking with libxml])])
-
-AM_PATH_OGG(, AC_MSG_ERROR([must have Ogg v1.0 installed!]))
-LIBS="$OGG_LIBS $LIBS"
-XIPH_CFLAGS="$XIPH_CFLAGS $OGG_CFLAGS"
-
-AM_PATH_VORBIS(, AC_MSG_ERROR([must have Vorbis v1.0 installed!]))
-LIBS="$VORBIS_LIBS $VORBISENC_LIBS $LIBS"
-XIPH_CFLAGS="$XIPH_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS"
-
-dnl we expect thread support in libshout
-save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-AM_PATH_SHOUT(, AC_MSG_ERROR([must have libshout installed!]))
-LIBS="$SHOUT_LIBS $LIBS"
-XIPH_CFLAGS="$XIPH_CFLAGS $SHOUT_CFLAGS"
-CFLAGS=$save_CFLAGS
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+XIPH_VAR_APPEND([XIPH_CFLAGS], [$XML_CFLAGS])
+XIPH_VAR_PREPEND([XIPH_LIBS], [$XML_LIBS])
+
+XIPH_PATH_SHOUT(, AC_MSG_ERROR([must have libshout installed!]))
+if test "$SHOUT_THREADED" = "no"; then
+    AC_MSG_ERROR([libshout found does not have thread support])
+fi
+XIPH_VAR_APPEND([XIPH_CPPFLAGS], [$SHOUT_CPPFLAGS])
+XIPH_VAR_APPEND([XIPH_CFLAGS], [$SHOUT_CFLAGS])
+XIPH_VAR_PREPEND([XIPH_LIBS], [$SHOUT_LIBS])
+
+XIPH_PATH_VORBIS(, AC_MSG_ERROR([must have Ogg Vorbis v1.0 installed!]))
+XIPH_VAR_APPEND([XIPH_CPPFLAGS], [$VORBIS_CFLAGS $VORBISENC_CFLAGS])
+XIPH_VAR_PREPEND([XIPH_LIBS], [$VORBISENC_LIBS $VORBIS_LIBS])
 
 dnl Make substitutions
 
@@ -175,10 +141,10 @@
 AC_SUBST(XML_LIBS)
 AC_SUBST(XML_CFLAGS)
 AC_SUBST(LIBTOOL_DEPS)
-AC_SUBST(LIBS)
 AC_SUBST(DEBUG)
 AC_SUBST(PROFILE)
 AC_SUBST(XIPH_CFLAGS)
-AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(XIPH_CPPFLAGS)
+AC_SUBST(XIPH_LIBS)
 
-AC_OUTPUT(Makefile conf/Makefile src/Makefile src/avl/Makefile src/thread/Makefile src/net/Makefile src/log/Makefile src/timing/Makefile)
+AC_OUTPUT(Makefile conf/Makefile src/Makefile src/log/Makefile)

<p><p>1.5       +2 -1      ices/autogen.sh

Index: autogen.sh
===================================================================
RCS file: /usr/local/cvsroot/ices/autogen.sh,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- autogen.sh	22 Mar 2003 02:31:22 -0000	1.4
+++ autogen.sh	1 Jul 2003 23:24:46 -0000	1.5
@@ -48,8 +48,9 @@
 
 echo "Generating configuration files for $package, please wait...."
 
+ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
 echo "  aclocal $ACLOCAL_FLAGS"
-aclocal -I m4 $ACLOCAL_FLAGS
+aclocal $ACLOCAL_FLAGS
 echo "  autoheader"
 autoheader
 echo "  libtoolize --automake"

<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