comparison configure.in @ 1341:d02b552e5304

Configure dynamically generates SDL_config.h I'm still wrestling with autoheader, but this should work for now... Fixed lots of build problems with C library support disabled
author Sam Lantinga <slouken@libsdl.org>
date Tue, 07 Feb 2006 12:11:33 +0000
parents 450721ad5436
children 905dc98a40fa
comparison
equal deleted inserted replaced
1340:58b114ef50e7 1341:d02b552e5304
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 AH_TOP([/*
4 SDL - Simple DirectMedia Layer
5 Copyright (C) 1997-2006 Sam Lantinga
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
21 Sam Lantinga
22 slouken@libsdl.org
23 */
24
25 #ifndef _SDL_config_h
26 #define _SDL_config_h
27
28 /* This is a set of defines to configure the SDL features */
29
30 /* Comment this if you want to build without any libc requirements */
31 #undef HAVE_LIBC
32 #ifdef HAVE_LIBC
33 ])
34 AC_CONFIG_HEADER(include/SDL_config.h)
35 AH_BOTTOM([
36 #endif /* HAVE_LIBC */
37
38 #endif /* _SDL_config_h */
39 ])
3 40
4 dnl Set various version strings - taken gratefully from the GTk sources 41 dnl Set various version strings - taken gratefully from the GTk sources
5 # 42 #
6 # Making releases: 43 # Making releases:
7 # Edit include/SDL/SDL_version.h and change the version, then: 44 # Edit include/SDL/SDL_version.h and change the version, then:
110 CFLAGS="$CFLAGS -Wall" 147 CFLAGS="$CFLAGS -Wall"
111 if test x$enable_strict_ansi = xyes; then 148 if test x$enable_strict_ansi = xyes; then
112 CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE" 149 CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
113 fi 150 fi
114 fi 151 fi
152
153 dnl See whether we are allowed to use the system C library
154 AC_ARG_ENABLE(libc,
155 [ --enable-libc Use the system C library [default=yes]],
156 , AC_DEFINE(HAVE_LIBC))
157
158 dnl Checks for header files.
159 AC_CHECK_HEADERS(alloca.h stdint.h stdlib.h stdarg.h malloc.h)
160 AC_CHECK_HEADERS(ctype.h)
161 AC_CHECK_HEADERS(string.h)
162 AC_CHECK_HEADERS(stdio.h)
163 AC_CHECK_HEADERS(signal.h)
164
165 dnl Checks for typedefs, structures, and compiler characteristics.
166 AC_C_CONST
167 AC_C_INLINE
168 AC_TYPE_SIZE_T
169 AC_CHECK_SIZEOF(char, 1)
170 AC_CHECK_SIZEOF(short, 2)
171 AC_CHECK_SIZEOF(int, 4)
172 AC_CHECK_SIZEOF(long, 4)
173 AC_CHECK_SIZEOF(long long, 8)
174
175 dnl Checks for library functions.
176 AC_FUNC_ALLOCA
177 AC_CHECK_FUNCS(malloc calloc realloc free)
178 AC_CHECK_FUNCS(getenv putenv qsort abs)
179 AC_CHECK_FUNCS(memset memcpy memmove memcmp)
180 AC_CHECK_FUNCS(strlen strcpy strncpy strcat strncat strdup)
181 AC_CHECK_FUNCS(_strrev _strupr _strlwr)
182 AC_CHECK_FUNCS(strchr strrchr strstr)
183 AC_CHECK_FUNCS(itoa _ltoa _uitoa _ultoa strtol _i64toa _ui64toa strtoll atoi atof)
184 AC_CHECK_FUNCS(strcmp strncmp stricmp strcasecmp)
185 AC_CHECK_FUNCS(sscanf snprintf vsnprintf)
115 186
116 dnl Initialize the compiler and linker flags for SDL applications 187 dnl Initialize the compiler and linker flags for SDL applications
117 188
118 SDL_CFLAGS="" 189 SDL_CFLAGS=""
119 SDL_LIBS="-lSDL" 190 SDL_LIBS="-lSDL"