1
dnl Process this file with autoconf to produce a configure script.
4
dnl Set various version strings - taken gratefully from the GTk sources
10
# if any functions have been added, set INTERFACE_AGE to 0.
11
# if backwards compatibility has been broken,
12
# set BINARY_AGE and INTERFACE_AGE to 0.
19
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
21
AC_SUBST(MAJOR_VERSION)
22
AC_SUBST(MINOR_VERSION)
23
AC_SUBST(MICRO_VERSION)
24
AC_SUBST(INTERFACE_AGE)
31
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
32
LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
33
LT_REVISION=$INTERFACE_AGE
34
LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
41
dnl Detect the canonical build and host environments
44
dnl Setup for automake
45
AM_INIT_AUTOMAKE(SDL2_gfx, $VERSION)
54
if test -z "$host_alias"; then
57
hostaliaswindres="$host_alias-windres"
59
AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
63
ac_default_prefix=/boot/develop/tools/gnupro
65
*-*-cygwin* | *-*-mingw32*)
66
if test "$build" != "$host"; then # cross-compiling
67
# Default cross-compile location
68
ac_default_prefix=/usr/local/cross-tools/i386-mingw32
70
# Look for the location of the tools and install there
71
if test "$BUILD_PREFIX" != ""; then
72
ac_default_prefix=$BUILD_PREFIX
75
if test x$WINDRES != x; then
80
AC_ARG_ENABLE([imageio], [AC_HELP_STRING([--enable-imageio], [use native Mac OS X frameworks for loading images [default=yes]])],
81
[], [enable_imageio=yes])
82
if test x$enable_imageio = xyes; then
83
IMG_LIBS="-Wl,-framework,ApplicationServices $IMG_LIBS"
85
CFLAGS="$CFLAGS -DSDL_IMAGE_USE_COMMON_BACKEND"
90
dnl set this to use on systems that use lib64 instead of lib
91
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
93
dnl Function to find a library in the compiler search path
96
gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
97
gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
98
env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
99
if test "$cross_compiling" = yes; then
102
host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
104
for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
105
lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
106
if test x$lib != x; then
113
dnl Check for NASM (for x86 assembly blit routines)
114
AC_ARG_ENABLE(mmx,[ --enable-mmx use mmx assembly on x86 [default=yes], disable this on non-x86 platforms],, enable_mmx=yes)
116
if test x$enable_mmx = xyes; then
117
CFLAGS="$CFLAGS -O -DUSE_MMX"
118
dnl MMX enabled by default in GCC on x86_64, but not i386:
119
AC_CHECK_SIZEOF([long])
120
if test "$ac_cv_sizeof_long" = "4"; then
121
CFLAGS="$CFLAGS -mmmx"
127
AC_SUBST(SDL_VERSION)
128
AM_PATH_SDL2($SDL_VERSION,
130
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
132
CFLAGS="$CFLAGS $SDL_CFLAGS"
133
LIBS="$LIBS $SDL_LIBS"
140
# Finally create all the generated files
146
echo "Options summary:"
147
echo "* --enable-mmx: $enable_mmx"