Mercurial > sdl-ios-xcode
comparison configure.in @ 1353:7ba544e2888d
Started the process of improving configure support, and merging C types
and library support into a single header.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 09 Feb 2006 09:07:13 +0000 |
parents | c643342f3f33 |
children | 22f39393668a |
comparison
equal
deleted
inserted
replaced
1352:c643342f3f33 | 1353:7ba544e2888d |
---|---|
1 dnl Process this file with autoconf to produce a configure script. | 1 dnl Process this file with autoconf to produce a configure script. |
2 AC_INIT(README) | 2 AC_INIT(README) |
3 AC_CONFIG_HEADER(include/SDL_config.h) | 3 AC_CONFIG_HEADER(include/SDL_config.h) |
4 AC_GNU_SOURCE | |
4 | 5 |
5 dnl Set various version strings - taken gratefully from the GTk sources | 6 dnl Set various version strings - taken gratefully from the GTk sources |
6 # | 7 # |
7 # Making releases: | 8 # Making releases: |
8 # Edit include/SDL/SDL_version.h and change the version, then: | 9 # Edit include/SDL/SDL_version.h and change the version, then: |
51 | 52 |
52 AC_LIBTOOL_WIN32_DLL | 53 AC_LIBTOOL_WIN32_DLL |
53 AM_PROG_LIBTOOL | 54 AM_PROG_LIBTOOL |
54 AC_PROG_MAKE_SET | 55 AC_PROG_MAKE_SET |
55 AC_PROG_CC | 56 AC_PROG_CC |
56 AC_C_INLINE | |
57 AC_C_CONST | |
58 AC_PROG_CXX | 57 AC_PROG_CXX |
59 AC_PROG_INSTALL | 58 AC_PROG_INSTALL |
60 AC_FUNC_ALLOCA | |
61 ASFLAGS="" | 59 ASFLAGS="" |
62 AC_SUBST(ASFLAGS) | 60 AC_SUBST(ASFLAGS) |
63 CCAS="$CC" | 61 CCAS="$CC" |
64 AC_SUBST(CCAS) | 62 AC_SUBST(CCAS) |
65 CCASFLAGS="" | 63 CCASFLAGS="" |
120 dnl See whether we are allowed to use the system C library | 118 dnl See whether we are allowed to use the system C library |
121 AC_ARG_ENABLE(libc, | 119 AC_ARG_ENABLE(libc, |
122 [ --enable-libc Use the system C library [default=yes]], | 120 [ --enable-libc Use the system C library [default=yes]], |
123 , AC_DEFINE([HAVE_LIBC])) | 121 , AC_DEFINE([HAVE_LIBC])) |
124 | 122 |
125 dnl Checks for header files. | 123 dnl Check for compiler characteristics |
126 AC_CHECK_HEADERS(alloca.h stdint.h stdlib.h stdarg.h malloc.h) | |
127 AC_CHECK_HEADERS(ctype.h) | |
128 AC_CHECK_HEADERS(string.h) | |
129 AC_CHECK_HEADERS(stdio.h) | |
130 AC_CHECK_HEADERS(signal.h) | |
131 | |
132 dnl Checks for typedefs, structures, and compiler characteristics. | |
133 AC_C_CONST | 124 AC_C_CONST |
134 AC_C_INLINE | 125 AC_C_INLINE |
126 AC_C_VOLATILE | |
127 | |
128 dnl Check for header files | |
129 AC_HEADER_STDC | |
130 AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h stdint.h ctype.h signal.h) | |
131 | |
132 dnl Check for typedefs, structures, etc. | |
135 AC_TYPE_SIZE_T | 133 AC_TYPE_SIZE_T |
136 AC_CHECK_SIZEOF(char, 1) | 134 if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then |
137 AC_CHECK_SIZEOF(short, 2) | 135 AC_CHECK_TYPE(int64_t) |
138 AC_CHECK_SIZEOF(int, 4) | 136 if test x$ac_cv_type_int64_t = xyes; then |
139 AC_CHECK_SIZEOF(long, 4) | 137 AC_DEFINE(SDL_HAS_64BIT_TYPE) |
140 AC_CHECK_SIZEOF(long long, 8) | 138 fi |
139 else | |
140 AC_CHECK_SIZEOF(char, 1) | |
141 AC_CHECK_SIZEOF(short, 2) | |
142 AC_CHECK_SIZEOF(int, 4) | |
143 AC_CHECK_SIZEOF(long, 4) | |
144 AC_CHECK_SIZEOF(long long, 8) | |
145 if test x$ac_cv_sizeof_char = x1; then | |
146 AC_DEFINE(int8_t, signed char) | |
147 AC_DEFINE(uint8_t, unsigned char) | |
148 fi | |
149 if test x$ac_cv_sizeof_short = x2; then | |
150 AC_DEFINE(int16_t, signed short) | |
151 AC_DEFINE(uint16_t, unsigned short) | |
152 else | |
153 if test x$ac_cv_sizeof_int = x2; then | |
154 AC_DEFINE(int16_t, signed int) | |
155 AC_DEFINE(uint16_t, unsigned int) | |
156 fi | |
157 fi | |
158 if test x$ac_cv_sizeof_int = x4; then | |
159 AC_DEFINE(int32_t, signed int) | |
160 AC_DEFINE(uint32_t, unsigned int) | |
161 else | |
162 if test x$ac_cv_sizeof_long = x4; then | |
163 AC_DEFINE(int32_t, signed long) | |
164 AC_DEFINE(uint32_t, unsigned long) | |
165 fi | |
166 fi | |
167 if test x$ac_cv_sizeof_long = x8; then | |
168 AC_DEFINE(int64_t, signed long) | |
169 AC_DEFINE(uint64_t, unsigned long) | |
170 AC_DEFINE(SDL_HAS_64BIT_TYPE) | |
171 else | |
172 if test x$ac_cv_sizeof_long_long = x8; then | |
173 AC_DEFINE(int64_t, signed long long) | |
174 AC_DEFINE(uint64_t, unsigned long long) | |
175 AC_DEFINE(SDL_HAS_64BIT_TYPE) | |
176 fi | |
177 fi | |
178 AC_CHECK_TYPE(uintptr_t, unsigned long) | |
179 fi | |
141 | 180 |
142 dnl Checks for library functions. | 181 dnl Checks for library functions. |
143 AC_FUNC_ALLOCA | 182 AC_FUNC_ALLOCA |
144 AC_CHECK_FUNCS(malloc calloc realloc free) | 183 AC_FUNC_MEMCMP |
145 AC_CHECK_FUNCS(getenv putenv unsetenv qsort abs) | 184 if test x$ac_cv_func_memcmp_working = xyes; then |
146 AC_CHECK_FUNCS(memset memcpy memmove memcmp) | 185 AC_DEFINE(HAVE_MEMCMP) |
147 AC_CHECK_FUNCS(strlen strcpy strncpy strcat strncat strdup) | 186 fi |
148 AC_CHECK_FUNCS(_strrev _strupr _strlwr) | 187 AC_FUNC_STRTOD |
149 AC_CHECK_FUNCS(strchr strrchr strstr) | 188 if test x$ac_cv_func_strtod = xyes; then |
150 AC_CHECK_FUNCS(itoa _ltoa _uitoa _ultoa strtol _i64toa _ui64toa strtoll strtod atoi atof) | 189 AC_DEFINE(HAVE_STRTOD) |
151 AC_CHECK_FUNCS(strcmp strncmp stricmp strcasecmp) | 190 fi |
152 AC_CHECK_FUNCS(sscanf snprintf vsnprintf) | 191 AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strcpy strncpy strcat strncat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol _i64toa _ui64toa strtoll atoi atof strcmp strncmp stricmp strcasecmp sscanf snprintf vsnprint) |
192 | |
153 | 193 |
154 dnl Initialize the compiler and linker flags for SDL applications | 194 dnl Initialize the compiler and linker flags for SDL applications |
155 | 195 |
156 SDL_CFLAGS="" | 196 SDL_CFLAGS="" |
157 SDL_LIBS="-lSDL" | 197 SDL_LIBS="-lSDL" |