1 # $Id: configure.in,v 1.16 2000/07/07 00:48:19 xiphmont Exp $
4 #AC_CONFIG_HEADER(config.h)
6 cp configure.guess config.guess
7 cp configure.sub config.sub
11 dnl If we're on IRIX, we wanna use cc even if gcc is there (unless the user
12 dnl has overriden us)...
15 if test -z "$CC"; then
18 AC_CHECK_LIB(audio, ALwritesamps)
20 # BeOS does not use -lm
24 # added better check below
28 if test -z "$CC"; then
32 AC_CHECK_PROG(AR,ar,ar)
33 AC_CHECK_PROG(INSTALL,install,install)
35 #not everyone uses libm (eg, BeOS)
36 #AC_CHECK_LIB(m, cos, LIBS="-lm"; AC_DEFINE(HAVE_LIBM), LIBS="")
37 # We no longer use config.h
38 AC_CHECK_LIB(m, cos, LIBS="-lm", LIBS="")
40 dnl Set some target options
41 if test -z "$GCC"; then
46 PROFILE="-p -g3 -O2" ;;
49 OPT="-xO4 -fast -w -fsingle -fsimple -native -xcg92"
50 PROFILE="-v -xpg -g -xO4 -fast -fsingle -native -fsimple -xcg92 -Dsuncc" ;;
58 # -D__NO_MATH_INLINES avoids some serious FP assembly related bugs in
63 DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
64 OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char"
65 PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
67 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
68 OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
69 PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
71 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
72 OPT="-O20 -D__NO_MATH_INLINES -fsigned-char"
73 PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
84 #AC_CHECK_LIB(pthread, pthread_create,
85 # pthread_lib="-lpthread"; AC_DEFINE(HAVE_LIBPTHREAD), :)
86 # We no longer use config.h
87 AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :)
89 #dnl Linuxthreads require you to define _REENTRANT in all threaded
90 #dnl code. Bogus, bogus...
92 #if test -n "$pthread_lib"; then
95 # AC_DEFINE(_REENTRANT)
99 # We no longer use config.h
101 #if test -n "$x_libraries"; then
104 # dnl If we find libgtk installed, great; otherwise assume we have
105 # dnl to build it ourselves.
107 # AC_CHECK_LIB(gtk, gtk_main, :, LIBGTKDIR="libgtk", $X_LIBS -lglib -lgdk -lX11 -lXext -lm)
109 # dnl libpthread is required for xogg.
111 # if test -z "$pthread_lib"; then XOGG=""; fi
113 # dnl If we don't have libgtk installed, and we don't have a libgtk
114 # dnl subdirectory to build the library ourself, we can't build xogg.
116 # if test -n "$LIBGTKDIR" -a ! -d "$LIBGTKDIR"; then
122 dnl This seems to be the only way to make autoconf only *sometimes* configure
123 dnl a subdirectory with AC_CONFIG_SUBDIRS. "__noconf" is assumed to not
124 dnl exist as a directory, so configure won't try to recursively enter it, unless
125 dnl the shell variable $dummy is reset to an existing directory inside the
130 #if test -d "$LIBGTKDIR"; then
131 # enable_shared="no"; export enable_shared
133 # AC_CONFIG_SUBDIRS("$dummy")
134 # X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS"
137 AC_CHECK_SIZEOF(short)
139 AC_CHECK_SIZEOF(long)
140 AC_CHECK_SIZEOF(long long)
143 $ac_cv_sizeof_short) SIZE16="short";;
144 $ac_cv_sizeof_int) SIZE16="int";;
148 $ac_cv_sizeof_short) SIZE32="short";;
149 $ac_cv_sizeof_int) SIZE32="int";;
150 $ac_cv_sizeof_long) SIZE32="long";;
154 $ac_cv_sizeof_int) SIZE64="int";;
155 $ac_cv_sizeof_long) SIZE64="long";;
156 $ac_cv_sizeof_long_long) SIZE64="long long";;
159 if test -z "$SIZE16"; then
160 AC_MSG_ERROR(No 16 bit type found on this platform!)
162 if test -z "$SIZE32"; then
163 AC_MSG_ERROR(No 32 bit type found on this platform!)
165 if test -z "$SIZE64"; then
166 AC_MSG_WARN(No 64 bit type found on this platform!)
169 #AC_CHECK_HEADER(alloca.h,AC_DEFINE(USE_ALLOCA_H),:)
170 #AC_CHECK_HEADER(memory.h,AC_DEFINE(USE_MEMORY_H),:)
171 # We no longer use config.h
172 AC_CHECK_HEADER(alloca.h,CFLAGS="$CFLAGS -DUSE_ALLOCA_H",:)
173 AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:)
182 AC_CHECK_FUNCS(gettimeofday select strcspn strerror strspn sigaction)
195 AC_SUBST(pthread_lib)
197 AC_OUTPUT(Makefile lib/Makefile examples/Makefile vorbis-tools/Makefile\
198 vq/Makefile huff/Makefile cmdline/Makefile xmms/Makefile kmpg/Makefile)