[xiph-cvs] cvs commit: vorbis configure.in
Jack Moffit
jack at xiph.org
Thu Sep 7 00:36:21 PDT 2000
jack 00/09/07 00:36:21
Modified: . Tag: branch_jackoggsvorbis configure.in
Log:
configure cleanup
Revision Changes Path
No revision
No revision
1.20.2.3.2.3 +60 -208 vorbis/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/vorbis/configure.in,v
retrieving revision 1.20.2.3.2.2
retrieving revision 1.20.2.3.2.3
diff -u -r1.20.2.3.2.2 -r1.20.2.3.2.3
--- configure.in 2000/09/07 01:25:44 1.20.2.3.2.2
+++ configure.in 2000/09/07 07:36:21 1.20.2.3.2.3
@@ -1,49 +1,55 @@
-# $Id: configure.in,v 1.20.2.3.2.2 2000/09/07 01:25:44 jack Exp $
+dnl Process this file with autoconf to produce a configure script
-AC_INIT(lib/mdct.c)
-
-dnl Do some additional argument setup
-AC_ARG_WITH(ogg, [ --with-ogg=DIR Set where the Ogg library is located])
+dnl ------------------------------------------------
+dnl Initialization
+dnl ------------------------------------------------
-AC_CANONICAL_HOST
+AC_INIT(lib/mdct.c)
+AM_INIT_AUTOMAKE(libvorbis,1.0.0)
-dnl If we're on IRIX, we wanna use cc even if gcc is there (unless the user
-dnl has overriden us)...
-case $host in
- *-*-irix*)
- if test -z "$CC"; then
- CC=cc
- fi
- AC_CHECK_LIB(audio, ALwritesamps)
- ;;
-esac
+dnl --------------------------------------------------
+dnl Check for programs
+dnl --------------------------------------------------
+dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
+dnl if $CFLAGS is blank
cflags_save="$CFLAGS"
AC_PROG_CC
-# because AC_PROG_CC likes to set -g
CFLAGS="$cflags_save"
-AC_PROG_CPP
-AC_PROG_RANLIB
-AC_CHECK_PROG(AR,ar,ar)
-AC_CHECK_PROG(INSTALL,install,install)
+AM_PROG_LIBTOOL
-AC_CHECK_LIB(m, cos, LIBS="-lm", LIBS="")
+dnl --------------------------------------------------
+dnl Additional arguments
+dnl --------------------------------------------------
+
+AC_ARG_WITH(ogg, [ --with-ogg=DIR Set where the Ogg library is located])
+dnl --------------------------------------------------
+dnl Set build flags based on environment
+dnl --------------------------------------------------
+
+AC_CANONICAL_HOST
+
dnl Set some target options
if test -z "$GCC"; then
case $host in
*-*-irix*)
+ dnl If we're on IRIX, we wanna use cc even if gcc
+ dnl is there (unless the user has overriden us)...
+ if test -z "$CC"; then
+ CC=cc
+ fi
DEBUG="-g -signed"
- OPT="-O2 -w -signed"
+ CFLAGS="-O2 -w -signed"
PROFILE="-p -g3 -O2 -signed" ;;
sparc-sun-solaris*)
DEBUG="-v -g"
- OPT="-xO4 -fast -w -fsimple -native -xcg92"
+ CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
*)
DEBUG="-g"
- OPT="-O"
+ CFLAGS="-O"
PROFILE="-g -p" ;;
esac
else
@@ -51,7 +57,7 @@
case $host in
*86-*-linux*)
DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
- OPT="-O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
+ CFLAGS="-O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
# PROFILE="-Wall -W -pg -O20 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
PROFILE="-Wall -W -pg -O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline -static"
@@ -91,195 +97,43 @@
AC_MSG_WARN([********************************************************])
AC_MSG_WARN([ ])
- OPT=${OPT}" -D__NO_MATH_INLINES"
+ CFLAGS=${OPT}" -D__NO_MATH_INLINES"
PROFILE=${PROFILE}" -D__NO_MATH_INLINES"
fi;;
*-*-linux*)
DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
- OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char"
+ CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char"
PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
sparc-sun-*)
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
- OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
+ CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
*)
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
- OPT="-O20 -D__NO_MATH_INLINES -fsigned-char"
+ CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
esac
fi
-AC_HEADER_STDC
+dnl --------------------------------------------------
+dnl Check for headers
+dnl --------------------------------------------------
-dnl AC_PATH_X
-dnl AC_PATH_XTRA
-
-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
-dnl exist as a directory, so configure won't try to recursively enter it, unless
-dnl the shell variable $dummy is reset to an existing directory inside the
-dnl if clause.
-
-dummy="__noconf"
-
-dnl check macro modified from Jon Shiring's to compensate for autoconf's lagging
-dnl behind the times on type madness
-
-AC_MSG_CHECKING(for int16_t)
-AC_CACHE_VAL(has_int16_t,
-[AC_TRY_RUN([
-#ifdef __BEOS__
-#include <inttypes.h>
-#endif
-#include <sys/types.h>
-int16_t foo;
-int main() {return 0;}
-],
-has_int16_t=yes,
-has_int16_t=no,
-has_int16_t=no
-)])
-AC_MSG_RESULT($has_int16_t)
-
-AC_MSG_CHECKING(for int32_t)
-AC_CACHE_VAL(has_int32_t,
-[AC_TRY_RUN([
-#ifdef __BEOS__
-#include <inttypes.h>
-#endif
-#include <sys/types.h>
-int32_t foo;
-int main() {return 0;}
-],
-has_int32_t=yes,
-has_int32_t=no,
-has_int32_t=no
-)])
-AC_MSG_RESULT($has_int32_t)
-
-AC_MSG_CHECKING(for uint32_t)
-AC_CACHE_VAL(has_uint32_t,
-[AC_TRY_RUN([
-#ifdef __BEOS__
-#include <inttypes.h>
-#endif
-#include <sys/types.h>
-uint32_t foo;
-int main() {return 0;}
-],
-has_uint32_t=yes,
-has_uint32_t=no,
-has_uint32_t=no
-)])
-AC_MSG_RESULT($has_uint32_t)
-
-AC_MSG_CHECKING(for u_int32_t)
-AC_CACHE_VAL(has_u_int32_t,
-[AC_TRY_RUN([
-#ifdef __BEOS__
-#include <inttypes.h>
-#endif
-#include <sys/types.h>
-u_int32_t foo;
-int main() {return 0;}
-],
-has_u_int32_t=yes,
-has_u_int32_t=no,
-has_u_int32_t=no
-)])
-AC_MSG_RESULT($has_u_int32_t)
-
-AC_MSG_CHECKING(for int64_t)
-AC_CACHE_VAL(has_int64_t,
-[AC_TRY_RUN([
-#ifdef __BEOS__
-#include <inttypes.h>
-#endif
-#include <sys/types.h>
-int64_t foo;
-int main() {return 0;}
-],
-has_int64_t=yes,
-has_int64_t=no,
-has_int64_t=no
-)])
-AC_MSG_RESULT($has_int64_t)
-
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(long long)
-
-
-if test x$has_int16_t = "xyes" ; then
- SIZE16="int16_t"
-else
- case 2 in
- $ac_cv_sizeof_short) SIZE16="short";;
- $ac_cv_sizeof_int) SIZE16="int";;
- esac
-fi
-
-if test x$has_int32_t = "xyes" ; then
- SIZE32="int32_t"
-else
- case 4 in
- $ac_cv_sizeof_short) SIZE32="short";;
- $ac_cv_sizeof_int) SIZE32="int";;
- $ac_cv_sizeof_long) SIZE32="long";;
- esac
-fi
-
-if test x$has_uint32_t = "xyes" ; then
- USIZE32="uint32_t"
-else
- if test x$has_u_int32_t = "xyes" ; then
- USIZE32="u_int32_t"
- else
- case 4 in
- $ac_cv_sizeof_short) USIZE32="unsigned short";;
- $ac_cv_sizeof_int) USIZE32="unsigned int";;
- $ac_cv_sizeof_long) USIZE32="unsigned long";;
- esac
- fi
-fi
-
-if test x$has_int64_t = "xyes" ; then
- SIZE64="int64_t"
-else
-case 8 in
- $ac_cv_sizeof_int) SIZE64="int";;
- $ac_cv_sizeof_long) SIZE64="long";;
- $ac_cv_sizeof_long_long) SIZE64="long long";;
-esac
-fi
-
-if test -z "$SIZE16"; then
- AC_MSG_ERROR(No 16 bit type found on this platform!)
-fi
-if test -z "$SIZE32"; then
- AC_MSG_ERROR(No 32 bit type found on this platform!)
-fi
-if test -z "$USIZE32"; then
- AC_MSG_ERROR(No unsigned 32 bit type found on this platform!)
-fi
-if test -z "$SIZE64"; then
- AC_MSG_WARN(No 64 bit type found on this platform!)
-fi
-
AC_CHECK_HEADER(alloca.h,CFLAGS="$CFLAGS -DUSE_ALLOCA_H",:)
AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:)
-AC_C_CONST
-AC_HEADER_TIME
-AC_STRUCT_TM
+dnl --------------------------------------------------
+dnl Check for typedefs, structures, etc
+dnl --------------------------------------------------
+
+dnl none
+
+dnl --------------------------------------------------
+dnl Check for libraries
+dnl --------------------------------------------------
-AC_PROG_MAKE_SET
-AC_FUNC_MEMCMP
-AC_TYPE_SIGNAL
-AC_CHECK_FUNCS(gettimeofday select strcspn strerror strspn sigaction)
+AC_CHECK_LIB(m, cos, LIBS="-lm", LIBS="")
+AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :)
dnl Check for libogg
if test -n $with_ogg; then
@@ -287,22 +141,20 @@
fi
AC_CHECK_LIB(ogg, oggpack_read, LIBS="$LIBS -logg", AC_MSG_ERROR([You must have libogg to compile vorbis!!!]))
+dnl --------------------------------------------------
+dnl Check for library functions
+dnl --------------------------------------------------
-AC_SUBST(SIZE16)
-AC_SUBST(SIZE32)
-AC_SUBST(USIZE32)
-AC_SUBST(SIZE64)
-AC_SUBST(OPT)
+AC_FUNC_MEMCMP
+
+dnl --------------------------------------------------
+dnl Do substitutions
+dnl --------------------------------------------------
+
AC_SUBST(LIBS)
AC_SUBST(DEBUG)
AC_SUBST(PROFILE)
AC_SUBST(CC)
-AC_SUBST(RANLIB)
AC_SUBST(pthread_lib)
-
-AC_CONFIG_SUBDIRS(vorbis-tools/libao)
-
-AC_OUTPUT(Makefile lib/Makefile examples/Makefile\
- vorbis-tools/Makefile\
- vq/Makefile huff/Makefile xmms/Makefile kmpg/Makefile)
+AC_OUTPUT(Makefile lib/Makefile doc/Makefile include/Makefile include/vorbis/Makefile include/vorbis/book/Makefile)
--- >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