author | Sam Lantinga <slouken@libsdl.org> |
Wed, 03 Oct 2012 19:02:46 -0700 | |
changeset 6549 | db16b819e1d1 |
parent 6492 | 0732954fa8ef |
child 6593 | f20b511e05a6 |
permissions | -rw-r--r-- |
6492
0732954fa8ef
Result of autogen.sh run with previous commit
Sam Lantinga <slouken@libsdl.org>
parents:
6454
diff
changeset
|
1 |
AC_DEFUN([AC_CHECK_DEFINE],[dnl |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 |
AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 |
AC_EGREP_CPP([YES_IS_DEFINED], [ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
#include <$2> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 |
#ifdef $1 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 |
YES_IS_DEFINED |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 |
#endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 |
], ac_cv_define_$1=yes, ac_cv_define_$1=no) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 |
if test "$ac_cv_define_$1" = "yes" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 |
AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 |
])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 |
############################################################################## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 |
dnl Configure Paths for Alsa |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 |
dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
dnl Christopher Lansdown <lansdoct@cs.alfred.edu> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 |
dnl Jaroslav Kysela <perex@suse.cz> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 |
dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 |
dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 |
dnl enables arguments --with-alsa-prefix= |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 |
dnl --with-alsa-enc-prefix= |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 |
dnl --disable-alsatest |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 |
dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 |
AC_DEFUN([AM_PATH_ALSA], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 |
[dnl Save the original CFLAGS, LDFLAGS, and LIBS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 |
alsa_save_CFLAGS="$CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 |
alsa_save_LDFLAGS="$LDFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 |
alsa_save_LIBS="$LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 |
alsa_found=yes |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 |
dnl Get the cflags and libraries for alsa |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 |
AC_ARG_WITH(alsa-prefix, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 |
[ --with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 |
[alsa_prefix="$withval"], [alsa_prefix=""]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 |
AC_ARG_WITH(alsa-inc-prefix, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 |
[ --with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
46 |
[alsa_inc_prefix="$withval"], [alsa_inc_prefix=""]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
47 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 |
dnl FIXME: this is not yet implemented |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 |
AC_ARG_ENABLE(alsatest, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
50 |
[ --disable-alsatest Do not try to compile and run a test Alsa program], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
51 |
[enable_alsatest="$enableval"], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
52 |
[enable_alsatest=yes]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
53 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 |
dnl Add any special include directories |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
55 |
AC_MSG_CHECKING(for ALSA CFLAGS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 |
if test "$alsa_inc_prefix" != "" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 |
ALSA_CFLAGS="$ALSA_CFLAGS -I$alsa_inc_prefix" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
58 |
CFLAGS="$CFLAGS -I$alsa_inc_prefix" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
60 |
AC_MSG_RESULT($ALSA_CFLAGS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
61 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
62 |
dnl add any special lib dirs |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
63 |
AC_MSG_CHECKING(for ALSA LDFLAGS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
64 |
if test "$alsa_prefix" != "" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 |
ALSA_LIBS="$ALSA_LIBS -L$alsa_prefix" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
66 |
LDFLAGS="$LDFLAGS $ALSA_LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
68 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
69 |
dnl add the alsa library |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 |
ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 |
LIBS=`echo $LIBS | sed 's/-lm//'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
72 |
LIBS=`echo $LIBS | sed 's/-ldl//'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 |
LIBS=`echo $LIBS | sed 's/-lpthread//'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 |
LIBS=`echo $LIBS | sed 's/ //'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
75 |
LIBS="$ALSA_LIBS $LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
76 |
AC_MSG_RESULT($ALSA_LIBS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
77 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
78 |
dnl Check for a working version of libasound that is of the right version. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
79 |
min_alsa_version=ifelse([$1], ,0.1.1,$1) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
80 |
AC_MSG_CHECKING(for libasound headers version >= $min_alsa_version) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
81 |
no_alsa="" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
82 |
alsa_min_major_version=`echo $min_alsa_version | \ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
83 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
84 |
alsa_min_minor_version=`echo $min_alsa_version | \ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
85 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
86 |
alsa_min_micro_version=`echo $min_alsa_version | \ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
87 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
88 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 |
AC_LANG_SAVE |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
90 |
AC_LANG_C |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 |
AC_TRY_COMPILE([ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 |
#include <alsa/asoundlib.h> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
93 |
], [ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
94 |
/* ensure backward compatibility */ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
95 |
#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
96 |
#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
97 |
#endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
98 |
#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
99 |
#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
100 |
#endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
101 |
#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
102 |
#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
103 |
#endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
104 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 |
# if(SND_LIB_MAJOR > $alsa_min_major_version) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
106 |
exit(0); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 |
# else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 |
# if(SND_LIB_MAJOR < $alsa_min_major_version) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
109 |
# error not present |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
110 |
# endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
111 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
112 |
# if(SND_LIB_MINOR > $alsa_min_minor_version) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 |
exit(0); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
114 |
# else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
115 |
# if(SND_LIB_MINOR < $alsa_min_minor_version) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 |
# error not present |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
117 |
# endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
118 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
119 |
# if(SND_LIB_SUBMINOR < $alsa_min_micro_version) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
120 |
# error not present |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 |
# endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 |
# endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 |
# endif |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 |
exit(0); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 |
], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 |
[AC_MSG_RESULT(found.)], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 |
[AC_MSG_RESULT(not present.) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
128 |
ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
129 |
alsa_found=no] |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
130 |
) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
131 |
AC_LANG_RESTORE |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
132 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
133 |
dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
134 |
if test "x$enable_alsatest" = "xyes"; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
135 |
AC_CHECK_LIB([asound], [snd_ctl_open],, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
136 |
[ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
137 |
alsa_found=no] |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
138 |
) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
139 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
140 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
141 |
if test "x$alsa_found" = "xyes" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
142 |
ifelse([$2], , :, [$2]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
143 |
LIBS=`echo $LIBS | sed 's/-lasound//g'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
144 |
LIBS=`echo $LIBS | sed 's/ //'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
145 |
LIBS="-lasound $LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
146 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
147 |
if test "x$alsa_found" = "xno" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
148 |
ifelse([$3], , :, [$3]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
149 |
CFLAGS="$alsa_save_CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
150 |
LDFLAGS="$alsa_save_LDFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
151 |
LIBS="$alsa_save_LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
152 |
ALSA_CFLAGS="" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
153 |
ALSA_LIBS="" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
154 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
155 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
156 |
dnl That should be it. Now just export out symbols: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
157 |
AC_SUBST(ALSA_CFLAGS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
158 |
AC_SUBST(ALSA_LIBS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
159 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
160 |
# =========================================================================== |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
161 |
# http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
162 |
# =========================================================================== |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
163 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
164 |
# SYNOPSIS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
165 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
166 |
# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
167 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
168 |
# DESCRIPTION |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
169 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
170 |
# Check whether the given compiler FLAGS work with the current language's |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
171 |
# compiler, or whether they give an error. (Warnings, however, are |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
172 |
# ignored.) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
173 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
174 |
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
175 |
# success/failure. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
176 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
177 |
# LICENSE |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
178 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
179 |
# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
180 |
# Copyright (c) 2009 Matteo Frigo |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
181 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
182 |
# This program is free software: you can redistribute it and/or modify it |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
183 |
# under the terms of the GNU General Public License as published by the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
184 |
# Free Software Foundation, either version 3 of the License, or (at your |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
185 |
# option) any later version. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
186 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
187 |
# This program is distributed in the hope that it will be useful, but |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
188 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
189 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
190 |
# Public License for more details. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
191 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
192 |
# You should have received a copy of the GNU General Public License along |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
193 |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
194 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
195 |
# As a special exception, the respective Autoconf Macro's copyright owner |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
196 |
# gives unlimited permission to copy, distribute and modify the configure |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
197 |
# scripts that are the output of Autoconf when processing the Macro. You |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
198 |
# need not follow the terms of the GNU General Public License when using |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
199 |
# or distributing such scripts, even though portions of the text of the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
200 |
# Macro appear in them. The GNU General Public License (GPL) does govern |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
201 |
# all other use of the material that constitutes the Autoconf Macro. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
202 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
203 |
# This special exception to the GPL applies to versions of the Autoconf |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
204 |
# Macro released by the Autoconf Archive. When you make and distribute a |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
205 |
# modified version of the Autoconf Macro, you may extend this special |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
206 |
# exception to the GPL to apply to your modified version as well. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
207 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
208 |
#serial 9 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
209 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
210 |
AC_DEFUN([AX_CHECK_COMPILER_FLAGS], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
211 |
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
212 |
AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
213 |
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
214 |
AS_LITERAL_IF([$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
215 |
[AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
216 |
ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
217 |
_AC_LANG_PREFIX[]FLAGS="$1" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
218 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
219 |
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
220 |
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
221 |
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
222 |
[ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
223 |
_AC_LANG_PREFIX[]FLAGS="$1" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
224 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
225 |
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
226 |
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
227 |
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
228 |
eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
229 |
AC_MSG_RESULT($ax_check_compiler_flags) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
230 |
if test "x$ax_check_compiler_flags" = xyes; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
231 |
m4_default([$2], :) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
232 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
233 |
m4_default([$3], :) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
234 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
235 |
])dnl AX_CHECK_COMPILER_FLAGS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
236 |
# =========================================================================== |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
237 |
# http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
238 |
# =========================================================================== |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
239 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
240 |
# SYNOPSIS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
241 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
242 |
# AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
243 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
244 |
# DESCRIPTION |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
245 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
246 |
# This macro tries to guess the "native" arch corresponding to the target |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
247 |
# architecture for use with gcc's -march=arch or -mtune=arch flags. If |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
248 |
# found, the cache variable $ax_cv_gcc_archflag is set to this flag and |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
249 |
# ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is is set to |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
250 |
# "unknown" and ACTION-FAILURE is executed. The default ACTION-SUCCESS is |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
251 |
# to add $ax_cv_gcc_archflag to the end of $CFLAGS. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
252 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
253 |
# PORTABLE? should be either [yes] (default) or [no]. In the former case, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
254 |
# the flag is set to -mtune (or equivalent) so that the architecture is |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
255 |
# only used for tuning, but the instruction set used is still portable. In |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
256 |
# the latter case, the flag is set to -march (or equivalent) so that |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
257 |
# architecture-specific instructions are enabled. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
258 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
259 |
# The user can specify --with-gcc-arch=<arch> in order to override the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
260 |
# macro's choice of architecture, or --without-gcc-arch to disable this. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
261 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
262 |
# When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
263 |
# called unless the user specified --with-gcc-arch manually. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
264 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
265 |
# Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
266 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
267 |
# (The main emphasis here is on recent CPUs, on the principle that doing |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
268 |
# high-performance computing on old hardware is uncommon.) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
269 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
270 |
# LICENSE |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
271 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
272 |
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
273 |
# Copyright (c) 2008 Matteo Frigo |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
274 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
275 |
# This program is free software: you can redistribute it and/or modify it |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
276 |
# under the terms of the GNU General Public License as published by the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
277 |
# Free Software Foundation, either version 3 of the License, or (at your |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
278 |
# option) any later version. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
279 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
280 |
# This program is distributed in the hope that it will be useful, but |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
281 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
282 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
283 |
# Public License for more details. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
284 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
285 |
# You should have received a copy of the GNU General Public License along |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
286 |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
287 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
288 |
# As a special exception, the respective Autoconf Macro's copyright owner |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
289 |
# gives unlimited permission to copy, distribute and modify the configure |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
290 |
# scripts that are the output of Autoconf when processing the Macro. You |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
291 |
# need not follow the terms of the GNU General Public License when using |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
292 |
# or distributing such scripts, even though portions of the text of the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
293 |
# Macro appear in them. The GNU General Public License (GPL) does govern |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
294 |
# all other use of the material that constitutes the Autoconf Macro. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
295 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
296 |
# This special exception to the GPL applies to versions of the Autoconf |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
297 |
# Macro released by the Autoconf Archive. When you make and distribute a |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
298 |
# modified version of the Autoconf Macro, you may extend this special |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
299 |
# exception to the GPL to apply to your modified version as well. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
300 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
301 |
#serial 8 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
302 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
303 |
AC_DEFUN([AX_GCC_ARCHFLAG], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
304 |
[AC_REQUIRE([AC_PROG_CC]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
305 |
AC_REQUIRE([AC_CANONICAL_HOST]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
306 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
307 |
AC_ARG_WITH(gcc-arch, [AS_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
308 |
ax_gcc_arch=$withval, ax_gcc_arch=yes) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
309 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
310 |
AC_MSG_CHECKING([for gcc architecture flag]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
311 |
AC_MSG_RESULT([]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
312 |
AC_CACHE_VAL(ax_cv_gcc_archflag, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
313 |
[ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
314 |
ax_cv_gcc_archflag="unknown" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
315 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
316 |
if test "$GCC" = yes; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
317 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
318 |
if test "x$ax_gcc_arch" = xyes; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
319 |
ax_gcc_arch="" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
320 |
if test "$cross_compiling" = no; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
321 |
case $host_cpu in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
322 |
i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
323 |
AX_GCC_X86_CPUID(0) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
324 |
AX_GCC_X86_CPUID(1) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
325 |
case $ax_cv_gcc_x86_cpuid_0 in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
326 |
*:756e6547:*:*) # Intel |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
327 |
case $ax_cv_gcc_x86_cpuid_1 in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
328 |
*5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
329 |
*5??:*:*:*) ax_gcc_arch=pentium ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
330 |
*6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
331 |
*6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
332 |
*6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
333 |
*6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
334 |
*6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
335 |
*6??:*:*:*) ax_gcc_arch=pentiumpro ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
336 |
*f3[[347]]:*:*:*|*f4[1347]:*:*:*) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
337 |
case $host_cpu in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
338 |
x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
339 |
*) ax_gcc_arch="prescott pentium4 pentiumpro" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
340 |
esac ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
341 |
*f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
342 |
esac ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
343 |
*:68747541:*:*) # AMD |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
344 |
case $ax_cv_gcc_x86_cpuid_1 in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
345 |
*5[[67]]?:*:*:*) ax_gcc_arch=k6 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
346 |
*5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
347 |
*5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
348 |
*60?:*:*:*) ax_gcc_arch=k7 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
349 |
*6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
350 |
*6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
351 |
*67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
352 |
*6[[68a]]?:*:*:*) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
353 |
AX_GCC_X86_CPUID(0x80000006) # L2 cache size |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
354 |
case $ax_cv_gcc_x86_cpuid_0x80000006 in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
355 |
*:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
356 |
ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
357 |
*) ax_gcc_arch="athlon-4 athlon k7" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
358 |
esac ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
359 |
*f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
360 |
*f5?:*:*:*) ax_gcc_arch="opteron k8" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
361 |
*f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
362 |
*f??:*:*:*) ax_gcc_arch="k8" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
363 |
esac ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
364 |
*:746e6543:*:*) # IDT |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
365 |
case $ax_cv_gcc_x86_cpuid_1 in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
366 |
*54?:*:*:*) ax_gcc_arch=winchip-c6 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
367 |
*58?:*:*:*) ax_gcc_arch=winchip2 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
368 |
*6[[78]]?:*:*:*) ax_gcc_arch=c3 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
369 |
*69?:*:*:*) ax_gcc_arch="c3-2 c3" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
370 |
esac ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
371 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
372 |
if test x"$ax_gcc_arch" = x; then # fallback |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
373 |
case $host_cpu in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
374 |
i586*) ax_gcc_arch=pentium ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
375 |
i686*) ax_gcc_arch=pentiumpro ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
376 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
377 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
378 |
;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
379 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
380 |
sparc*) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
381 |
AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
382 |
cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
383 |
cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
384 |
case $cputype in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
385 |
*ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
386 |
*ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
387 |
*ultrasparc*) ax_gcc_arch="ultrasparc v9" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
388 |
*supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
389 |
*hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
390 |
*cypress*) ax_gcc_arch=cypress ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
391 |
esac ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
392 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
393 |
alphaev5) ax_gcc_arch=ev5 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
394 |
alphaev56) ax_gcc_arch=ev56 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
395 |
alphapca56) ax_gcc_arch="pca56 ev56" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
396 |
alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
397 |
alphaev6) ax_gcc_arch=ev6 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
398 |
alphaev67) ax_gcc_arch=ev67 ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
399 |
alphaev68) ax_gcc_arch="ev68 ev67" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
400 |
alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
401 |
alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
402 |
alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
403 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
404 |
powerpc*) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
405 |
cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
406 |
cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
407 |
case $cputype in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
408 |
*750*) ax_gcc_arch="750 G3" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
409 |
*740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
410 |
*74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
411 |
*74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
412 |
*970*) ax_gcc_arch="970 G5 power4";; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
413 |
*POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
414 |
*POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
415 |
603ev|8240) ax_gcc_arch="$cputype 603e 603";; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
416 |
*) ax_gcc_arch=$cputype ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
417 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
418 |
ax_gcc_arch="$ax_gcc_arch powerpc" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
419 |
;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
420 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
421 |
fi # not cross-compiling |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
422 |
fi # guess arch |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
423 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
424 |
if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
425 |
for arch in $ax_gcc_arch; do |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
426 |
if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
427 |
flags="-mtune=$arch" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
428 |
# -mcpu=$arch and m$arch generate nonportable code on every arch except |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
429 |
# x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
430 |
case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
431 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
432 |
flags="-march=$arch -mcpu=$arch -m$arch" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
433 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
434 |
for flag in $flags; do |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
435 |
AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
436 |
done |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
437 |
test "x$ax_cv_gcc_archflag" = xunknown || break |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
438 |
done |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
439 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
440 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
441 |
fi # $GCC=yes |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
442 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
443 |
AC_MSG_CHECKING([for gcc architecture flag]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
444 |
AC_MSG_RESULT($ax_cv_gcc_archflag) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
445 |
if test "x$ax_cv_gcc_archflag" = xunknown; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
446 |
m4_default([$3],:) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
447 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
448 |
m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
449 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
450 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
451 |
# =========================================================================== |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
452 |
# http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
453 |
# =========================================================================== |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
454 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
455 |
# SYNOPSIS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
456 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
457 |
# AX_GCC_X86_CPUID(OP) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
458 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
459 |
# DESCRIPTION |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
460 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
461 |
# On Pentium and later x86 processors, with gcc or a compiler that has a |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
462 |
# compatible syntax for inline assembly instructions, run a small program |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
463 |
# that executes the cpuid instruction with input OP. This can be used to |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
464 |
# detect the CPU type. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
465 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
466 |
# On output, the values of the eax, ebx, ecx, and edx registers are stored |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
467 |
# as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
468 |
# ax_cv_gcc_x86_cpuid_OP. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
469 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
470 |
# If the cpuid instruction fails (because you are running a |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
471 |
# cross-compiler, or because you are not using gcc, or because you are on |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
472 |
# a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
473 |
# is set to the string "unknown". |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
474 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
475 |
# This macro mainly exists to be used in AX_GCC_ARCHFLAG. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
476 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
477 |
# LICENSE |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
478 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
479 |
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
480 |
# Copyright (c) 2008 Matteo Frigo |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
481 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
482 |
# This program is free software: you can redistribute it and/or modify it |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
483 |
# under the terms of the GNU General Public License as published by the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
484 |
# Free Software Foundation, either version 3 of the License, or (at your |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
485 |
# option) any later version. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
486 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
487 |
# This program is distributed in the hope that it will be useful, but |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
488 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
489 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
490 |
# Public License for more details. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
491 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
492 |
# You should have received a copy of the GNU General Public License along |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
493 |
# with this program. If not, see <http://www.gnu.org/licenses/>. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
494 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
495 |
# As a special exception, the respective Autoconf Macro's copyright owner |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
496 |
# gives unlimited permission to copy, distribute and modify the configure |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
497 |
# scripts that are the output of Autoconf when processing the Macro. You |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
498 |
# need not follow the terms of the GNU General Public License when using |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
499 |
# or distributing such scripts, even though portions of the text of the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
500 |
# Macro appear in them. The GNU General Public License (GPL) does govern |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
501 |
# all other use of the material that constitutes the Autoconf Macro. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
502 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
503 |
# This special exception to the GPL applies to versions of the Autoconf |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
504 |
# Macro released by the Autoconf Archive. When you make and distribute a |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
505 |
# modified version of the Autoconf Macro, you may extend this special |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
506 |
# exception to the GPL to apply to your modified version as well. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
507 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
508 |
#serial 7 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
509 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
510 |
AC_DEFUN([AX_GCC_X86_CPUID], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
511 |
[AC_REQUIRE([AC_PROG_CC]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
512 |
AC_LANG_PUSH([C]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
513 |
AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
514 |
[AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
515 |
int op = $1, eax, ebx, ecx, edx; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
516 |
FILE *f; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
517 |
__asm__("cpuid" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
518 |
: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
519 |
: "a" (op)); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
520 |
f = fopen("conftest_cpuid", "w"); if (!f) return 1; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
521 |
fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
522 |
fclose(f); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
523 |
return 0; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
524 |
])], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
525 |
[ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
526 |
[ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
527 |
[ax_cv_gcc_x86_cpuid_$1=unknown])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
528 |
AC_LANG_POP([C]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
529 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
530 |
############################################################################## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
531 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
532 |
# --- esd.m4 --- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
533 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
534 |
# Configure paths for ESD |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
535 |
# Manish Singh 98-9-30 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
536 |
# stolen back from Frank Belew |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
537 |
# stolen from Manish Singh |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
538 |
# Shamelessly stolen from Owen Taylor |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
539 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
540 |
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
541 |
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
542 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
543 |
AC_DEFUN([AM_PATH_ESD], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
544 |
[dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
545 |
dnl Get the cflags and libraries from the esd-config script |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
546 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
547 |
AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
548 |
esd_prefix="$withval", esd_prefix="") |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
549 |
AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
550 |
esd_exec_prefix="$withval", esd_exec_prefix="") |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
551 |
AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
552 |
, enable_esdtest=yes) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
553 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
554 |
if test x$esd_exec_prefix != x ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
555 |
esd_args="$esd_args --exec-prefix=$esd_exec_prefix" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
556 |
if test x${ESD_CONFIG+set} != xset ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
557 |
ESD_CONFIG=$esd_exec_prefix/bin/esd-config |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
558 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
559 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
560 |
if test x$esd_prefix != x ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
561 |
esd_args="$esd_args --prefix=$esd_prefix" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
562 |
if test x${ESD_CONFIG+set} != xset ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
563 |
ESD_CONFIG=$esd_prefix/bin/esd-config |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
564 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
565 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
566 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
567 |
AC_PATH_PROG(ESD_CONFIG, esd-config, no) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
568 |
min_esd_version=ifelse([$1], ,0.2.7,$1) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
569 |
AC_MSG_CHECKING(for ESD - version >= $min_esd_version) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
570 |
no_esd="" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
571 |
if test "$ESD_CONFIG" = "no" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
572 |
no_esd=yes |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
573 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
574 |
ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
575 |
ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
576 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
577 |
esd_major_version=`$ESD_CONFIG $esd_args --version | \ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
578 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
579 |
esd_minor_version=`$ESD_CONFIG $esd_args --version | \ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
580 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
581 |
esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
582 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
583 |
if test "x$enable_esdtest" = "xyes" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
584 |
ac_save_CFLAGS="$CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
585 |
ac_save_LIBS="$LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
586 |
CFLAGS="$CFLAGS $ESD_CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
587 |
LIBS="$LIBS $ESD_LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
588 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
589 |
dnl Now check if the installed ESD is sufficiently new. (Also sanity |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
590 |
dnl checks the results of esd-config to some extent |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
591 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
592 |
rm -f conf.esdtest |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
593 |
AC_TRY_RUN([ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
594 |
#include <stdio.h> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
595 |
#include <stdlib.h> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
596 |
#include <string.h> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
597 |
#include <esd.h> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
598 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
599 |
char* |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
600 |
my_strdup (char *str) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
601 |
{ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
602 |
char *new_str; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
603 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
604 |
if (str) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
605 |
{ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
606 |
new_str = malloc ((strlen (str) + 1) * sizeof(char)); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
607 |
strcpy (new_str, str); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
608 |
} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
609 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
610 |
new_str = NULL; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
611 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
612 |
return new_str; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
613 |
} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
614 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
615 |
int main () |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
616 |
{ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
617 |
int major, minor, micro; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
618 |
char *tmp_version; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
619 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
620 |
system ("touch conf.esdtest"); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
621 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
622 |
/* HP/UX 9 (%@#!) writes to sscanf strings */ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
623 |
tmp_version = my_strdup("$min_esd_version"); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
624 |
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
625 |
printf("%s, bad version string\n", "$min_esd_version"); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
626 |
exit(1); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
627 |
} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
628 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
629 |
if (($esd_major_version > major) || |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
630 |
(($esd_major_version == major) && ($esd_minor_version > minor)) || |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
631 |
(($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
632 |
{ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
633 |
return 0; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
634 |
} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
635 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
636 |
{ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
637 |
printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
638 |
printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
639 |
printf("*** best to upgrade to the required version.\n"); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
640 |
printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
641 |
printf("*** to point to the correct copy of esd-config, and remove the file\n"); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
642 |
printf("*** config.cache before re-running configure\n"); |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
643 |
return 1; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
644 |
} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
645 |
} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
646 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
647 |
],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
648 |
CFLAGS="$ac_save_CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
649 |
LIBS="$ac_save_LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
650 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
651 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
652 |
if test "x$no_esd" = x ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
653 |
AC_MSG_RESULT(yes) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
654 |
ifelse([$2], , :, [$2]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
655 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
656 |
AC_MSG_RESULT(no) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
657 |
if test "$ESD_CONFIG" = "no" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
658 |
echo "*** The esd-config script installed by ESD could not be found" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
659 |
echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
660 |
echo "*** your path, or set the ESD_CONFIG environment variable to the" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
661 |
echo "*** full path to esd-config." |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
662 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
663 |
if test -f conf.esdtest ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
664 |
: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
665 |
else |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
666 |
echo "*** Could not run ESD test program, checking why..." |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
667 |
CFLAGS="$CFLAGS $ESD_CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
668 |
LIBS="$LIBS $ESD_LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
669 |
AC_TRY_LINK([ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
670 |
#include <stdio.h> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
671 |
#include <esd.h> |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
672 |
], [ return 0; ], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
673 |
[ echo "*** The test program compiled, but did not run. This usually means" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
674 |
echo "*** that the run-time linker is not finding ESD or finding the wrong" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
675 |
echo "*** version of ESD. If it is not finding ESD, you'll need to set your" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
676 |
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
677 |
echo "*** to the installed location Also, make sure you have run ldconfig if that" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
678 |
echo "*** is required on your system" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
679 |
echo "***" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
680 |
echo "*** If you have an old version installed, it is best to remove it, although" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
681 |
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
682 |
[ echo "*** The test program failed to compile or link. See the file config.log for the" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
683 |
echo "*** exact error that occured. This usually means ESD was incorrectly installed" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
684 |
echo "*** or that you have moved ESD since it was installed. In the latter case, you" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
685 |
echo "*** may want to edit the esd-config script: $ESD_CONFIG" ]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
686 |
CFLAGS="$ac_save_CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
687 |
LIBS="$ac_save_LIBS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
688 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
689 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
690 |
ESD_CFLAGS="" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
691 |
ESD_LIBS="" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
692 |
ifelse([$3], , :, [$3]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
693 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
694 |
AC_SUBST(ESD_CFLAGS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
695 |
AC_SUBST(ESD_LIBS) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
696 |
rm -f conf.esdtest |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
697 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
698 |
############################################################################## |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
699 |
# Based on libtool-2.4.2 |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
700 |
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
701 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
702 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
703 |
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
704 |
# Foundation, Inc. |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
705 |
# Written by Gordon Matzigkeit, 1996 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
706 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
707 |
# This file is free software; the Free Software Foundation gives |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
708 |
# unlimited permission to copy and/or distribute it, with or without |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
709 |
# modifications, as long as this notice is preserved. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
710 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
711 |
m4_define([_LT_COPYING], [dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
712 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
713 |
# 2006, 2007, 2008, 2009, 2010, 2011 Free Software |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
714 |
# Foundation, Inc. |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
715 |
# Written by Gordon Matzigkeit, 1996 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
716 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
717 |
# This file is part of GNU Libtool. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
718 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
719 |
# GNU Libtool is free software; you can redistribute it and/or |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
720 |
# modify it under the terms of the GNU General Public License as |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
721 |
# published by the Free Software Foundation; either version 2 of |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
722 |
# the License, or (at your option) any later version. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
723 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
724 |
# As a special exception to the GNU General Public License, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
725 |
# if you distribute this file as part of a program or library that |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
726 |
# is built using GNU Libtool, you may include this file under the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
727 |
# same distribution terms that you use for the rest of that program. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
728 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
729 |
# GNU Libtool is distributed in the hope that it will be useful, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
730 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
731 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
732 |
# GNU General Public License for more details. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
733 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
734 |
# You should have received a copy of the GNU General Public License |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
735 |
# along with GNU Libtool; see the file COPYING. If not, a copy |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
736 |
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
737 |
# obtained by writing to the Free Software Foundation, Inc., |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
738 |
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
739 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
740 |
|
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
741 |
# serial 57 LT_INIT |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
742 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
743 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
744 |
# LT_PREREQ(VERSION) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
745 |
# ------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
746 |
# Complain and exit if this libtool version is less that VERSION. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
747 |
m4_defun([LT_PREREQ], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
748 |
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
749 |
[m4_default([$3], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
750 |
[m4_fatal([Libtool version $1 or higher is required], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
751 |
63)])], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
752 |
[$2])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
753 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
754 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
755 |
# _LT_CHECK_BUILDDIR |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
756 |
# ------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
757 |
# Complain if the absolute build directory name contains unusual characters |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
758 |
m4_defun([_LT_CHECK_BUILDDIR], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
759 |
[case `pwd` in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
760 |
*\ * | *\ *) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
761 |
AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
762 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
763 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
764 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
765 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
766 |
# LT_INIT([OPTIONS]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
767 |
# ------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
768 |
AC_DEFUN([LT_INIT], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
769 |
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
770 |
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
771 |
AC_BEFORE([$0], [LT_LANG])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
772 |
AC_BEFORE([$0], [LT_OUTPUT])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
773 |
AC_BEFORE([$0], [LTDL_INIT])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
774 |
m4_require([_LT_CHECK_BUILDDIR])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
775 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
776 |
dnl Autoconf doesn't catch unexpanded LT_ macros by default: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
777 |
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
778 |
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
779 |
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
780 |
dnl unless we require an AC_DEFUNed macro: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
781 |
AC_REQUIRE([LTOPTIONS_VERSION])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
782 |
AC_REQUIRE([LTSUGAR_VERSION])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
783 |
AC_REQUIRE([LTVERSION_VERSION])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
784 |
AC_REQUIRE([LTOBSOLETE_VERSION])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
785 |
m4_require([_LT_PROG_LTMAIN])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
786 |
|
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
787 |
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
788 |
|
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
789 |
dnl Parse OPTIONS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
790 |
_LT_SET_OPTIONS([$0], [$1]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
791 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
792 |
# This can be used to rebuild libtool when needed |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
793 |
LIBTOOL_DEPS="$ltmain" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
794 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
795 |
# Always use our own libtool. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
796 |
LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
797 |
AC_SUBST(LIBTOOL)dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
798 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
799 |
_LT_SETUP |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
800 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
801 |
# Only expand once: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
802 |
m4_define([LT_INIT]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
803 |
])# LT_INIT |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
804 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
805 |
# Old names: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
806 |
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
807 |
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
808 |
dnl aclocal-1.4 backwards compatibility: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
809 |
dnl AC_DEFUN([AC_PROG_LIBTOOL], []) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
810 |
dnl AC_DEFUN([AM_PROG_LIBTOOL], []) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
811 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
812 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
813 |
# _LT_CC_BASENAME(CC) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
814 |
# ------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
815 |
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
816 |
m4_defun([_LT_CC_BASENAME], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
817 |
[for cc_temp in $1""; do |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
818 |
case $cc_temp in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
819 |
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
820 |
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
821 |
\-*) ;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
822 |
*) break;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
823 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
824 |
done |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
825 |
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
826 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
827 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
828 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
829 |
# _LT_FILEUTILS_DEFAULTS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
830 |
# ---------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
831 |
# It is okay to use these file commands and assume they have been set |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
832 |
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
833 |
m4_defun([_LT_FILEUTILS_DEFAULTS], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
834 |
[: ${CP="cp -f"} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
835 |
: ${MV="mv -f"} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
836 |
: ${RM="rm -f"} |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
837 |
])# _LT_FILEUTILS_DEFAULTS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
838 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
839 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
840 |
# _LT_SETUP |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
841 |
# --------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
842 |
m4_defun([_LT_SETUP], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
843 |
[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
844 |
AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
845 |
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
846 |
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
847 |
|
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
848 |
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
849 |
dnl |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
850 |
_LT_DECL([], [host_alias], [0], [The host system])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
851 |
_LT_DECL([], [host], [0])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
852 |
_LT_DECL([], [host_os], [0])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
853 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
854 |
_LT_DECL([], [build_alias], [0], [The build system])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
855 |
_LT_DECL([], [build], [0])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
856 |
_LT_DECL([], [build_os], [0])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
857 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
858 |
AC_REQUIRE([AC_PROG_CC])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
859 |
AC_REQUIRE([LT_PATH_LD])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
860 |
AC_REQUIRE([LT_PATH_NM])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
861 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
862 |
AC_REQUIRE([AC_PROG_LN_S])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
863 |
test -z "$LN_S" && LN_S="ln -s" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
864 |
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
865 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
866 |
AC_REQUIRE([LT_CMD_MAX_LEN])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
867 |
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
868 |
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
869 |
dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
870 |
m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
871 |
m4_require([_LT_CHECK_SHELL_FEATURES])dnl |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
872 |
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
873 |
m4_require([_LT_CMD_RELOAD])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
874 |
m4_require([_LT_CHECK_MAGIC_METHOD])dnl |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
875 |
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
876 |
m4_require([_LT_CMD_OLD_ARCHIVE])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
877 |
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
878 |
m4_require([_LT_WITH_SYSROOT])dnl |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
879 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
880 |
_LT_CONFIG_LIBTOOL_INIT([ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
881 |
# See if we are running on zsh, and set the options which allow our |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
882 |
# commands through without removal of \ escapes INIT. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
883 |
if test -n "\${ZSH_VERSION+set}" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
884 |
setopt NO_GLOB_SUBST |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
885 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
886 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
887 |
if test -n "${ZSH_VERSION+set}" ; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
888 |
setopt NO_GLOB_SUBST |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
889 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
890 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
891 |
_LT_CHECK_OBJDIR |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
892 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
893 |
m4_require([_LT_TAG_COMPILER])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
894 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
895 |
case $host_os in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
896 |
aix3*) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
897 |
# AIX sometimes has problems with the GCC collect2 program. For some |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
898 |
# reason, if we set the COLLECT_NAMES environment variable, the problems |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
899 |
# vanish in a puff of smoke. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
900 |
if test "X${COLLECT_NAMES+set}" != Xset; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
901 |
COLLECT_NAMES= |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
902 |
export COLLECT_NAMES |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
903 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
904 |
;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
905 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
906 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
907 |
# Global variables: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
908 |
ofile=libtool |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
909 |
can_build_shared=yes |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
910 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
911 |
# All known linkers require a `.a' archive for static linking (except MSVC, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
912 |
# which needs '.lib'). |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
913 |
libext=a |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
914 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
915 |
with_gnu_ld="$lt_cv_prog_gnu_ld" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
916 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
917 |
old_CC="$CC" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
918 |
old_CFLAGS="$CFLAGS" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
919 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
920 |
# Set sane defaults for various variables |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
921 |
test -z "$CC" && CC=cc |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
922 |
test -z "$LTCC" && LTCC=$CC |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
923 |
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
924 |
test -z "$LD" && LD=ld |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
925 |
test -z "$ac_objext" && ac_objext=o |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
926 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
927 |
_LT_CC_BASENAME([$compiler]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
928 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
929 |
# Only perform the check for file, if the check method requires it |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
930 |
test -z "$MAGIC_CMD" && MAGIC_CMD=file |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
931 |
case $deplibs_check_method in |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
932 |
file_magic*) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
933 |
if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
934 |
_LT_PATH_MAGIC |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
935 |
fi |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
936 |
;; |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
937 |
esac |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
938 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
939 |
# Use C for the default configuration in the libtool script |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
940 |
LT_SUPPORTED_TAG([CC]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
941 |
_LT_LANG_C_CONFIG |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
942 |
_LT_LANG_DEFAULT_CONFIG |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
943 |
_LT_CONFIG_COMMANDS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
944 |
])# _LT_SETUP |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
945 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
946 |
|
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
947 |
# _LT_PREPARE_SED_QUOTE_VARS |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
948 |
# -------------------------- |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
949 |
# Define a few sed substitution that help us do robust quoting. |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
950 |
m4_defun([_LT_PREPARE_SED_QUOTE_VARS], |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
951 |
[# Backslashify metacharacters that are still active within |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
952 |
# double-quoted strings. |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
953 |
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
954 |
|
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
955 |
# Same as above, but do not quote variable references. |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
956 |
double_quote_subst='s/\([["`\\]]\)/\\\1/g' |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
957 |
|
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
958 |
# Sed substitution to delay expansion of an escaped shell variable in a |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
959 |
# double_quote_subst'ed string. |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
960 |
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
961 |
|
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
962 |
# Sed substitution to delay expansion of an escaped single quote. |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
963 |
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
964 |
|
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
965 |
# Sed substitution to avoid accidental globbing in evaled expressions |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
966 |
no_glob_subst='s/\*/\\\*/g' |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
967 |
]) |
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
968 |
|
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
969 |
# _LT_PROG_LTMAIN |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
970 |
# --------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
971 |
# Note that this code is called both from `configure', and `config.status' |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
972 |
# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
973 |
# `config.status' has no value for ac_aux_dir unless we are using Automake, |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
974 |
# so we pass a copy along to make sure it has a sensible value anyway. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
975 |
m4_defun([_LT_PROG_LTMAIN], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
976 |
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
977 |
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
978 |
ltmain="$ac_aux_dir/ltmain.sh" |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
979 |
])# _LT_PROG_LTMAIN |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
980 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
981 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
982 |
## ------------------------------------- ## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
983 |
## Accumulate code for creating libtool. ## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
984 |
## ------------------------------------- ## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
985 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
986 |
# So that we can recreate a full libtool script including additional |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
987 |
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
988 |
# in macros and then make a single call at the end using the `libtool' |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
989 |
# label. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
990 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
991 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
992 |
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
993 |
# ---------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
994 |
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
995 |
m4_define([_LT_CONFIG_LIBTOOL_INIT], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
996 |
[m4_ifval([$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
997 |
[m4_append([_LT_OUTPUT_LIBTOOL_INIT], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
998 |
[$1 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
999 |
])])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1000 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1001 |
# Initialize. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1002 |
m4_define([_LT_OUTPUT_LIBTOOL_INIT]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1003 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1004 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1005 |
# _LT_CONFIG_LIBTOOL([COMMANDS]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1006 |
# ------------------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1007 |
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1008 |
m4_define([_LT_CONFIG_LIBTOOL], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1009 |
[m4_ifval([$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1010 |
[m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1011 |
[$1 |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1012 |
])])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1013 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1014 |
# Initialize. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1015 |
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1016 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1017 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1018 |
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1019 |
# ----------------------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1020 |
m4_defun([_LT_CONFIG_SAVE_COMMANDS], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1021 |
[_LT_CONFIG_LIBTOOL([$1]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1022 |
_LT_CONFIG_LIBTOOL_INIT([$2]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1023 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1024 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1025 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1026 |
# _LT_FORMAT_COMMENT([COMMENT]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1027 |
# ----------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1028 |
# Add leading comment marks to the start of each line, and a trailing |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1029 |
# full-stop to the whole comment if one is not present already. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1030 |
m4_define([_LT_FORMAT_COMMENT], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1031 |
[m4_ifval([$1], [ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1032 |
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1033 |
[['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1034 |
)]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1035 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1036 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1037 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1038 |
## ------------------------ ## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1039 |
## FIXME: Eliminate VARNAME ## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1040 |
## ------------------------ ## |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1041 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1042 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1043 |
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1044 |
# ------------------------------------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1045 |
# CONFIGNAME is the name given to the value in the libtool script. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1046 |
# VARNAME is the (base) name used in the configure script. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1047 |
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1048 |
# VARNAME. Any other value will be used directly. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1049 |
m4_define([_LT_DECL], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1050 |
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1051 |
[lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1052 |
[m4_ifval([$1], [$1], [$2])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1053 |
lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1054 |
m4_ifval([$4], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1055 |
[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1056 |
lt_dict_add_subkey([lt_decl_dict], [$2], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1057 |
[tagged?], [m4_ifval([$5], [yes], [no])])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1058 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1059 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1060 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1061 |
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1062 |
# -------------------------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1063 |
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1064 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1065 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1066 |
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1067 |
# ------------------------------------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1068 |
m4_define([lt_decl_tag_varnames], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1069 |
[_lt_decl_filter([tagged?], [yes], $@)]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1070 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1071 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1072 |
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1073 |
# --------------------------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1074 |
m4_define([_lt_decl_filter], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1075 |
[m4_case([$#], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1076 |
[0], [m4_fatal([$0: too few arguments: $#])], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1077 |
[1], [m4_fatal([$0: too few arguments: $#: $1])], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1078 |
[2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1079 |
[3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1080 |
[lt_dict_filter([lt_decl_dict], $@)])[]dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1081 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1082 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1083 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1084 |
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1085 |
# -------------------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1086 |
m4_define([lt_decl_quote_varnames], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1087 |
[_lt_decl_filter([value], [1], $@)]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1088 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1089 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1090 |
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1091 |
# --------------------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1092 |
m4_define([lt_decl_dquote_varnames], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1093 |
[_lt_decl_filter([value], [2], $@)]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1094 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1095 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1096 |
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1097 |
# --------------------------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1098 |
m4_define([lt_decl_varnames_tagged], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1099 |
[m4_assert([$# <= 2])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1100 |
_$0(m4_quote(m4_default([$1], [[, ]])), |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1101 |
m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1102 |
m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1103 |
m4_define([_lt_decl_varnames_tagged], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1104 |
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1105 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1106 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1107 |
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1108 |
# ------------------------------------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1109 |
m4_define([lt_decl_all_varnames], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1110 |
[_$0(m4_quote(m4_default([$1], [[, ]])), |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1111 |
m4_if([$2], [], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1112 |
m4_quote(lt_decl_varnames), |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1113 |
m4_quote(m4_shift($@))))[]dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1114 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1115 |
m4_define([_lt_decl_all_varnames], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1116 |
[lt_join($@, lt_decl_varnames_tagged([$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1117 |
lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1118 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1119 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1120 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1121 |
# _LT_CONFIG_STATUS_DECLARE([VARNAME]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1122 |
# ------------------------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1123 |
# Quote a variable value, and forward it to `config.status' so that its |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1124 |
# declaration there will have the same value as in `configure'. VARNAME |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1125 |
# must have a single quote delimited value for this to work. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1126 |
m4_define([_LT_CONFIG_STATUS_DECLARE], |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
1127 |
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1128 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1129 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1130 |
# _LT_CONFIG_STATUS_DECLARATIONS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1131 |
# ------------------------------ |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1132 |
# We delimit libtool config variables with single quotes, so when |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1133 |
# we write them to config.status, we have to be sure to quote all |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1134 |
# embedded single quotes properly. In configure, this macro expands |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1135 |
# each variable declared with _LT_DECL (and _LT_TAGDECL) into: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1136 |
# |
6442
2d3caa191dc4
Updated to the latest versions of autotools and config.guess/config.sub
Sam Lantinga <slouken@libsdl.org>
parents:
5310
diff
changeset
|
1137 |
# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' |
5310
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1138 |
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1139 |
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1140 |
[m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1141 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1142 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1143 |
# _LT_LIBTOOL_TAGS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1144 |
# ---------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1145 |
# Output comment and list of tags supported by the script |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1146 |
m4_defun([_LT_LIBTOOL_TAGS], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1147 |
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1148 |
available_tags="_LT_TAGS"dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1149 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1150 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1151 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1152 |
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1153 |
# ----------------------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1154 |
# Extract the dictionary values for VARNAME (optionally with TAG) and |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1155 |
# expand to a commented shell variable setting: |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1156 |
# |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1157 |
# # Some comment about what VAR is for. |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1158 |
# visible_name=$lt_internal_name |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1159 |
m4_define([_LT_LIBTOOL_DECLARE], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1160 |
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1161 |
[description])))[]dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1162 |
m4_pushdef([_libtool_name], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1163 |
m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1164 |
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1165 |
[0], [_libtool_name=[$]$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1166 |
[1], [_libtool_name=$lt_[]$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1167 |
[2], [_libtool_name=$lt_[]$1], |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1168 |
[_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1169 |
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1170 |
]) |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1171 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1172 |
|
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1173 |
# _LT_LIBTOOL_CONFIG_VARS |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1174 |
# ----------------------- |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any additional steps.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1175 |
# Produce commented declarations of non-tagged libtool config variables |
a9945ce48999
Made it possible to build SDL from a fresh checkout without any |