summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorJack Moffitt <jack@xiph.org>2000-09-03 05:54:26 +0000
committerJack Moffitt <jack@xiph.org>2000-09-03 05:54:26 +0000
commite2cee72399a6b0d7986f582e86baf4e240ccaab6 (patch)
tree1d5ac0d04a81d4954932d3073ea096bd576abf2c /configure.in
downloadogg-e2cee72399a6b0d7986f582e86baf4e240ccaab6.tar.gz
Initial revision
git-svn-id: http://svn.xiph.org/trunk/ogg@618 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in221
1 files changed, 221 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..c653ba4
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,221 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(src/framing.c)
+
+AM_INIT_AUTOMAKE(libogg,1.0.0)
+
+AC_PROG_CC
+AM_PROG_LIBTOOL
+
+dnl Set some options based on environment
+
+if test -z "$GCC"; then
+ case $host in
+ *-*-irix*)
+ DEBUG="-g -signed"
+ CFLAGS="-O2 -w -signed"
+ PROFILE="-p -g3 -O2 -signed"
+ ;;
+ sparc-sun-solaris*)
+ DEBUG="-v -g"
+ CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
+ PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc"
+ ;;
+ *)
+ DEBUG="-g"
+ CFLAGS="-O"
+ PROFILE="-g -p"
+ ;;
+ esac
+else
+ case $host in
+ *-*-linux*)
+ DEBUG="-g -Wall -fsigned-char"
+ CFLAGS="-O20 -ffast-math -fsigned-char"
+ PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char"
+ ;;
+ sparc-sun-*)
+ DEBUG="-g -Wall -fsigned-char -mv8"
+ CFLAGS="-O20 -ffast-math -fsigned-char -mv8"
+ PROFILE="-pg -g -O20 -fsigned-char -mv8"
+ ;;
+ *)
+ DEBUG="-g -Wall -fsigned-char"
+ CFLAGS="-O20 -fsigned-char"
+ PROFILE="-O20 -g -pg -fsigned-char"
+ ;;
+ esac
+fi
+
+dnl Checks for programs.
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+AC_HEADER_STDC
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+dnl Check for types
+
+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
+
+dnl Checks for library functions.
+AC_FUNC_MEMCMP
+
+dnl Make substitutions
+
+AC_SUBST(LIBTOOL_DEPS)
+AC_SUBST(SIZE16)
+AC_SUBST(SIZE32)
+AC_SUBST(USIZE32)
+AC_SUBST(SIZE64)
+AC_SUBST(OPT)
+AC_SUBST(LIBS)
+AC_SUBST(DEBUG)
+AC_SUBST(CFLAGS)
+AC_SUBST(PROFILE)
+AC_SUBST(CC)
+AC_SUBST(RANLIB)
+
+AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile include/ogg/Makefile include/ogg/os_types.h)