1 # $Id: configure.in,v 1.2 1999/07/13 07:48:13 mwhitson 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)
22 if test -z "$CC"; then
26 AC_CHECK_PROG(AR,ar,ar)
28 dnl Set some target options
29 if test -z "$GCC"; then
34 PROFILE="-p -g3 -O2" ;;
37 OPT="-xO4 -fast -w -fsingle -fsimple -native -xcg92"
38 PROFILE="-v -xpg -g -xO4 -fast -fsingle -native -fsimple -xcg92 -Dsuncc" ;;
47 DEBUG="-g -Wall -fsigned-char"
48 OPT="-O20 -ffast-math -fsigned-char"
49 PROFILE="-pg -g -O20 -fsigned-char";;
51 DEBUG="-g -Wall -fsigned-char -mv8"
52 OPT="-O20 -ffast-math -fsigned-char -mv8"
53 PROFILE="-pg -g -O20 -fsigned-char -mv8" ;;
55 DEBUG="-g -Wall -fsigned-char"
56 OPT="-O20 -fsigned-char"
57 PROFILE="-O20 -g -pg -fsigned-char" ;;
68 AC_CHECK_LIB(pthread, pthread_create,
69 pthread_lib="-lpthread"; AC_DEFINE(HAVE_LIBPTHREAD), :)
71 dnl Linuxthreads require you to define _REENTRANT in all threaded
72 dnl code. Bogus, bogus...
74 if test -n "$pthread_lib"; then
82 #if test -n "$x_libraries"; then
85 # dnl If we find libgtk installed, great; otherwise assume we have
86 # dnl to build it ourselves.
88 # AC_CHECK_LIB(gtk, gtk_main, :, LIBGTKDIR="libgtk", $X_LIBS -lglib -lgdk -lX11 -lXext -lm)
90 # dnl libpthread is required for xogg.
92 # if test -z "$pthread_lib"; then XOGG=""; fi
94 # dnl If we don't have libgtk installed, and we don't have a libgtk
95 # dnl subdirectory to build the library ourself, we can't build xogg.
97 # if test -n "$LIBGTKDIR" -a ! -d "$LIBGTKDIR"; then
103 dnl This seems to be the only way to make autoconf only *sometimes* configure
104 dnl a subdirectory with AC_CONFIG_SUBDIRS. "__noconf" is assumed to not
105 dnl exist as a directory, so configure won't try to recursively enter it, unless
106 dnl the shell variable $dummy is reset to an existing directory inside the
111 #if test -d "$LIBGTKDIR"; then
112 # enable_shared="no"; export enable_shared
114 # AC_CONFIG_SUBDIRS("$dummy")
115 # X_LIBS="-L${srcdir}/libgtk/gtk/.libs -L${srcdir}/libgtk/gdk/.libs -L${srcdir}/libgtk/glib/.libs $X_LIBS"
120 AC_CHECK_SIZEOF(short)
122 AC_CHECK_SIZEOF(long)
123 AC_CHECK_SIZEOF(long long)
126 $ac_cv_sizeof_short) TYPESIZES="$TYPESIZES -Dsize16='short'"
128 $ac_cv_sizeof_int) TYPESIZES="$TYPESIZES -Dsize16='int'"
133 $ac_cv_sizeof_short) TYPESIZES="$TYPESIZES -Dsize32='short'"
135 $ac_cv_sizeof_int) TYPESIZES="$TYPESIZES -Dsize32='int'"
137 $ac_cv_sizeof_long) TYPESIZES="$TYPESIZES -Dsize32='long'"
142 $ac_cv_sizeof_int) TYPESIZES="$TYPESIZES -Dsize64='int'"
144 $ac_cv_sizeof_long) TYPESIZES="$TYPESIZES -Dsize64='long'"
146 $ac_cv_sizeof_long_long) TYPESIZES="$TYPESIZES -Dsize64='long long'"
151 if test -z "$SIZE16"; then
152 AC_MSG_ERROR(No 16 bit type found on this platform!)
154 if test -z "$SIZE32"; then
155 AC_MSG_ERROR(No 32 bit type found on this platform!)
157 if test -z "$SIZE64"; then
158 AC_MSG_WARN(No 64 bit type found on this platform!)
162 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h)
171 AC_CHECK_FUNCS(gettimeofday select strcspn strerror strspn sigaction)
181 AC_SUBST(pthread_lib)
183 AC_OUTPUT(Makefile lib/Makefile cmdline/Makefile)