Recognizes if input is ogg or not.
[xiph.git] / Tremor / configure.in
blob2b44ee4a26489bf89e134c61fbfbd0b11217d495
1 dnl Process this file with autoconf to produce a configure script
3 dnl ------------------------------------------------
4 dnl Initialization and Versioning
5 dnl ------------------------------------------------
7 AC_INIT(mdct.c)
9 AC_CANONICAL_HOST
10 AC_CANONICAL_TARGET
12 AM_CONFIG_HEADER([config.h])
14 AM_INIT_AUTOMAKE(libvorbisidec,1.2.0)
16 dnl Library versioning
18 V_LIB_CURRENT=1
19 V_LIB_REVISION=2
20 V_LIB_AGE=0
21 AC_SUBST(V_LIB_CURRENT)
22 AC_SUBST(V_LIB_REVISION)
23 AC_SUBST(V_LIB_AGE)
25 dnl --------------------------------------------------  
26 dnl Check for programs
27 dnl --------------------------------------------------  
29 dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
30 dnl if $CFLAGS is blank
31 cflags_save="$CFLAGS"
32 AC_PROG_CC
33 AC_PROG_CPP
34 CFLAGS="$cflags_save"
36 AM_PROG_LIBTOOL
38 dnl --------------------------------------------------
39 dnl Set build flags based on environment
40 dnl --------------------------------------------------
42 dnl Set some target options
44 cflags_save="$CFLAGS"
45 ldflags_save="$LDFLAGS"
46 if test -z "$GCC"; then
47         case $host in 
48         arm-*-*)
49                 DEBUG="-g -D_ARM_ASSEM_" 
50                 CFLAGS="-O -D_ARM_ASSEM_"
51                 PROFILE="-p -g -O -D_ARM_ASSEM_" ;;
52         *)
53                 DEBUG="-g"
54                 CFLAGS="-O"
55                 PROFILE="-g -p" ;;
56         esac
57 else
59         case $host in 
60         arm-*-*)
61                 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -D_ARM_ASSEM_"
62                 CFLAGS="-O2 -D_ARM_ASSEM_ -fsigned-char"
63                 PROFILE="-W -pg -g -O2 -D_ARM_ASSEM_ -fsigned-char -fno-inline-functions";;
65         *)
66                 DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char"
67                 CFLAGS="-O2 -Wall -fsigned-char"
68                 PROFILE="-Wall -pg -g -O2 -fsigned-char -fno-inline-functions";;
69         esac
71 CFLAGS="$CFLAGS $cflags_save -D_REENTRANT"
72 LDFLAGS="$LDFLAGS $ldflags_save"
75 # Test whenever ld supports -version-script
76 AC_PROG_LD
77 AC_PROG_LD_GNU
78 if test "x$lt_cv_prog_gnu_ld" = "xyes"; then
79    SHLIB_VERSION_ARG="Wl,--version-script=Version_script"
81    dnl Set extra linker options
82    case "$target_os" in
83   linux* | solaris* )
84     SHLIB_VERSION_ARG="-Wl,--version-script=Version_script"
85     ;;
86   *)
87     ;;
88    esac
89    LDFLAGS="$LDFLAGS $SHLIB_VERSION_ARG"
92 dnl --------------------------------------------------
93 dnl Options 
94 dnl --------------------------------------------------
96 AC_ARG_ENABLE(
97    low-accuracy,
98    [  --enable-low-accuracy   enable 32 bit only multiply operations],
99    CFLAGS="$CFLAGS -D_LOW_ACCURACY_"
102 dnl --------------------------------------------------
103 dnl Check for headers
104 dnl --------------------------------------------------
106 AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:)
108 dnl --------------------------------------------------
109 dnl Check for typedefs, structures, etc
110 dnl --------------------------------------------------
112 dnl none
114 dnl --------------------------------------------------
115 dnl Check for library functions
116 dnl --------------------------------------------------
118 AC_FUNC_ALLOCA
119 AC_FUNC_MEMCMP
121 dnl --------------------------------------------------
122 dnl Do substitutions
123 dnl --------------------------------------------------
125 LIBS="$LIBS"
127 AC_SUBST(LIBS)
128 AC_SUBST(DEBUG)
129 AC_SUBST(PROFILE)
131 AC_OUTPUT(Makefile Version_script)