12 |
|
AC_PROG_MAKE_SET |
13 |
|
AC_PROG_INSTALL |
14 |
|
|
15 |
< |
dnl Don't want the default "-O2 -g" that autoconf uses for gcc. |
15 |
> |
dnl -fomit-frame-pointer makes things faster |
16 |
|
if [[ x"$GXX" = "xyes" ]]; then |
17 |
< |
CFLAGS="-O2 -g -fomit-frame-pointer -Wall -Wno-unused -Wno-format" |
18 |
< |
fi |
19 |
< |
|
20 |
< |
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown |
21 |
< |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown |
22 |
< |
|
23 |
< |
HPUX_REV=0 |
24 |
< |
if [[ x$UNAME_SYSTEM = "xHP-UX" ]]; then |
25 |
< |
HPUX_REV=`echo $UNAME_RELEASE | sed -e 's/[^.]*.[0B]*//' -e 's/\..*$//'` |
17 |
> |
CFLAGS="$CFLAGS -fomit-frame-pointer -fno-exceptions" |
18 |
|
fi |
19 |
|
|
20 |
|
AC_AIX |
87 |
|
LIBS="$LIBS $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" |
88 |
|
fi |
89 |
|
|
98 |
– |
dnl Find out some things about the system |
99 |
– |
dnl - whether we have GCC 2.7 or better. |
100 |
– |
dnl - what CPU we have (to use some assembly hacks on the x86) |
101 |
– |
|
102 |
– |
HAVEGCC27=n |
103 |
– |
HAVEI386=n |
104 |
– |
|
105 |
– |
cat >conftest.cpp << EOF |
106 |
– |
#include <stdio.h> |
107 |
– |
int main() |
108 |
– |
{ |
109 |
– |
#if defined(__GNUC__) && defined(__GNUC_MINOR__) |
110 |
– |
#if __GNUC__ > 2 || __GNUC_MINOR__ > 6 |
111 |
– |
printf("GNU\n"); |
112 |
– |
#endif |
113 |
– |
#endif |
114 |
– |
return 0; |
115 |
– |
} |
116 |
– |
EOF |
117 |
– |
|
118 |
– |
$CXX conftest.cpp -c -o conftest.o |
119 |
– |
$CXX conftest.o -o conftest |
120 |
– |
./conftest >conftest.file |
121 |
– |
if grep GNU conftest.file >/dev/null; then |
122 |
– |
HAVEGCC27=y |
123 |
– |
echo "Good news. Found GCC 2.7 or better." |
124 |
– |
elif [[ "$CC" = "gcc" ]]; then |
125 |
– |
echo "I suggest you upgrade to at least version 2.7 of GCC" |
126 |
– |
else |
127 |
– |
echo "Couldn't find GCC. Frodo may or may not compile and run correctly." |
128 |
– |
fi |
129 |
– |
|
130 |
– |
cat >conftest.c << EOF |
131 |
– |
#include <stdio.h> |
132 |
– |
int main() |
133 |
– |
{ |
134 |
– |
#ifdef __i386__ |
135 |
– |
printf("386\n"); |
136 |
– |
#endif |
137 |
– |
return 0; |
138 |
– |
} |
139 |
– |
EOF |
140 |
– |
|
141 |
– |
$CC conftest.c -c -o conftest.o |
142 |
– |
$CC conftest.o -o conftest |
143 |
– |
./conftest >conftest.file |
144 |
– |
if grep 386 conftest.file >/dev/null; then |
145 |
– |
HAVEI386=y |
146 |
– |
echo "You seem to be using a x86 CPU" |
147 |
– |
else |
148 |
– |
echo "No special hacks for your CPU, sorry." |
149 |
– |
fi |
150 |
– |
|
151 |
– |
rm -f conftest* |
152 |
– |
|
153 |
– |
if [[ "$HAVEGCC27" = "y" -a "$HAVEI386" = "y" ]]; then |
154 |
– |
# Don't want strength-reduce on the i386, makes the code slower usually. |
155 |
– |
CFLAGS="$CFLAGS -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\"" |
156 |
– |
elif [[ "$TARGET" = "amigaos" ]]; then |
157 |
– |
CFLAGS="$CFLAGS -DREGPARAM=\"__attribute__((regargs(4)))\" " |
158 |
– |
else |
159 |
– |
CFLAGS="$CFLAGS -DREGPARAM=" |
160 |
– |
fi |
161 |
– |
|
162 |
– |
CC=$CXX |
163 |
– |
|
90 |
|
AC_SUBST(TARGET) |
91 |
|
AC_SUBST(SET_MAKE) |
92 |
|
AC_SUBST(top_srcdir) |