|
1 dnl Process this file with autoconf to produce a configure script |
|
2 |
|
3 dnl ------------------------------------------------ |
|
4 dnl Initialization and Versioning |
|
5 dnl ------------------------------------------------ |
|
6 |
|
7 AC_INIT(mdct.c) |
|
8 |
|
9 AC_CANONICAL_HOST |
|
10 AC_CANONICAL_TARGET |
|
11 |
|
12 AM_CONFIG_HEADER([config.h]) |
|
13 |
|
14 AM_INIT_AUTOMAKE(libvorbisidec,1.2.0) |
|
15 |
|
16 dnl Library versioning |
|
17 |
|
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) |
|
24 |
|
25 dnl -------------------------------------------------- |
|
26 dnl Check for programs |
|
27 dnl -------------------------------------------------- |
|
28 |
|
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" |
|
35 |
|
36 AM_PROG_LIBTOOL |
|
37 |
|
38 dnl -------------------------------------------------- |
|
39 dnl Set build flags based on environment |
|
40 dnl -------------------------------------------------- |
|
41 |
|
42 dnl Set some target options |
|
43 |
|
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 |
|
58 |
|
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";; |
|
64 |
|
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 |
|
70 fi |
|
71 CFLAGS="$CFLAGS $cflags_save -D_REENTRANT" |
|
72 LDFLAGS="$LDFLAGS $ldflags_save" |
|
73 |
|
74 |
|
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" |
|
80 |
|
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" |
|
90 fi |
|
91 |
|
92 dnl -------------------------------------------------- |
|
93 dnl Options |
|
94 dnl -------------------------------------------------- |
|
95 |
|
96 AC_ARG_ENABLE( |
|
97 low-accuracy, |
|
98 [ --enable-low-accuracy enable 32 bit only multiply operations], |
|
99 CFLAGS="$CFLAGS -D_LOW_ACCURACY_" |
|
100 ) |
|
101 |
|
102 dnl -------------------------------------------------- |
|
103 dnl Check for headers |
|
104 dnl -------------------------------------------------- |
|
105 |
|
106 AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:) |
|
107 |
|
108 dnl -------------------------------------------------- |
|
109 dnl Check for typedefs, structures, etc |
|
110 dnl -------------------------------------------------- |
|
111 |
|
112 dnl none |
|
113 |
|
114 dnl -------------------------------------------------- |
|
115 dnl Check for library functions |
|
116 dnl -------------------------------------------------- |
|
117 |
|
118 AC_FUNC_ALLOCA |
|
119 AC_FUNC_MEMCMP |
|
120 |
|
121 dnl -------------------------------------------------- |
|
122 dnl Do substitutions |
|
123 dnl -------------------------------------------------- |
|
124 |
|
125 LIBS="$LIBS" |
|
126 |
|
127 AC_SUBST(LIBS) |
|
128 AC_SUBST(DEBUG) |
|
129 AC_SUBST(PROFILE) |
|
130 |
|
131 AC_OUTPUT(Makefile Version_script) |