annotate configure.in @ 5283:a3bfe8657cde

merged
author Eric Wing <ewing . public |-at-| gmail . com>
date Sat, 12 Feb 2011 21:34:36 -0800
parents 6a65c1fc07af
children
rev   line source
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 dnl Process this file with autoconf to produce a configure script.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2 AC_INIT(README)
1341
d02b552e5304 Configure dynamically generates SDL_config.h
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
3 AC_CONFIG_HEADER(include/SDL_config.h)
1353
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
4 AC_GNU_SOURCE
3085
4800979de337 Updated libtool from version 1.5.22 to 2.2.6a, so it works on current QNX
Sam Lantinga <slouken@libsdl.org>
parents: 3083
diff changeset
5 AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
6
3382
294fb5e6f301 A better solution to making the default build optimization -O3
Sam Lantinga <slouken@libsdl.org>
parents: 3372
diff changeset
7 dnl Save the CFLAGS to see whether they were passed in or generated
294fb5e6f301 A better solution to making the default build optimization -O3
Sam Lantinga <slouken@libsdl.org>
parents: 3372
diff changeset
8 orig_CFLAGS="$CFLAGS"
294fb5e6f301 A better solution to making the default build optimization -O3
Sam Lantinga <slouken@libsdl.org>
parents: 3372
diff changeset
9
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
10 dnl Set various version strings - taken gratefully from the GTk sources
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
11 #
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
12 # Making releases:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
13 # Edit include/SDL/SDL_version.h and change the version, then:
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14 # SDL_MICRO_VERSION += 1;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
15 # SDL_INTERFACE_AGE += 1;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
16 # SDL_BINARY_AGE += 1;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
17 # if any functions have been added, set SDL_INTERFACE_AGE to 0.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
18 # if backwards compatibility has been broken,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
19 # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
20 #
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
21 SDL_MAJOR_VERSION=1
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
22 SDL_MINOR_VERSION=3
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
23 SDL_MICRO_VERSION=0
1886
44635227a939 Updated the version to 1.2.11
Sam Lantinga <slouken@libsdl.org>
parents: 1879
diff changeset
24 SDL_INTERFACE_AGE=0
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
25 SDL_BINARY_AGE=0
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
26 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
27
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
28 AC_SUBST(SDL_MAJOR_VERSION)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
29 AC_SUBST(SDL_MINOR_VERSION)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
30 AC_SUBST(SDL_MICRO_VERSION)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
31 AC_SUBST(SDL_INTERFACE_AGE)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
32 AC_SUBST(SDL_BINARY_AGE)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
33 AC_SUBST(SDL_VERSION)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
34
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
35 # libtool versioning
3085
4800979de337 Updated libtool from version 1.5.22 to 2.2.6a, so it works on current QNX
Sam Lantinga <slouken@libsdl.org>
parents: 3083
diff changeset
36 LT_INIT([win32-dll])
4800979de337 Updated libtool from version 1.5.22 to 2.2.6a, so it works on current QNX
Sam Lantinga <slouken@libsdl.org>
parents: 3083
diff changeset
37
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
38 LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
39 LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
40 LT_REVISION=$SDL_INTERFACE_AGE
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
41 LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
3368
ca6f355e44b2 Fixed bug #833
Sam Lantinga <slouken@libsdl.org>
parents: 3358
diff changeset
42 m4_pattern_allow([^LT_])
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
43
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
44 AC_SUBST(LT_RELEASE)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
45 AC_SUBST(LT_CURRENT)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
46 AC_SUBST(LT_REVISION)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
47 AC_SUBST(LT_AGE)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
48
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
49 dnl Detect the canonical build and host environments
3368
ca6f355e44b2 Fixed bug #833
Sam Lantinga <slouken@libsdl.org>
parents: 3358
diff changeset
50 dnl AC_CANONICAL_HOST
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
51
3332
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
52 dnl Check for tools
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
53 AC_PROG_LIBTOOL
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
54 AC_PROG_CC
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
55 AC_PROG_CXX
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
56 AC_PROG_INSTALL
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
57 AC_PROG_MAKE_SET
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
58 if test -z "$host_alias"; then
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
59 hostaliaswindres=
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
60 else
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
61 hostaliaswindres="$host_alias-windres"
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
62 fi
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
63 AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
da1cb54d74ef You should check for the C compiler before you set CFLAGS. :)
Sam Lantinga <slouken@libsdl.org>
parents: 3307
diff changeset
64
1389
ce65f014190a Fixed X11 library detection
Sam Lantinga <slouken@libsdl.org>
parents: 1384
diff changeset
65 dnl Set up the compiler and linker flags
1571
0160eb7cccee Add /usr/local to the build paths by default
Sam Lantinga <slouken@libsdl.org>
parents: 1569
diff changeset
66 INCLUDE="-I$srcdir/include"
1373
04499d3e1b6b *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 1370
diff changeset
67 if test x$srcdir != x.; then
1742
af4352da64d8 Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents: 1648
diff changeset
68 # Remove SDL_config.h from the source directory, since it's the
af4352da64d8 Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents: 1648
diff changeset
69 # default one, and we want to include the one that we generate.
af4352da64d8 Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents: 1648
diff changeset
70 if test -f $srcdir/include/SDL_config.h; then
af4352da64d8 Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents: 1648
diff changeset
71 rm $srcdir/include/SDL_config.h
af4352da64d8 Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents: 1648
diff changeset
72 fi
1571
0160eb7cccee Add /usr/local to the build paths by default
Sam Lantinga <slouken@libsdl.org>
parents: 1569
diff changeset
73 INCLUDE="-Iinclude $INCLUDE"
1373
04499d3e1b6b *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 1370
diff changeset
74 fi
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
75 case "$host" in
1389
ce65f014190a Fixed X11 library detection
Sam Lantinga <slouken@libsdl.org>
parents: 1384
diff changeset
76 *-*-cygwin*)
ce65f014190a Fixed X11 library detection
Sam Lantinga <slouken@libsdl.org>
parents: 1384
diff changeset
77 # We build SDL on cygwin without the UNIX emulation layer
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
78 BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
79 BASE_LDFLAGS="-mno-cygwin"
1389
ce65f014190a Fixed X11 library detection
Sam Lantinga <slouken@libsdl.org>
parents: 1384
diff changeset
80 ;;
ce65f014190a Fixed X11 library detection
Sam Lantinga <slouken@libsdl.org>
parents: 1384
diff changeset
81 *)
3604
e569bbb266eb Fixed bug #915
Sam Lantinga <slouken@libsdl.org>
parents: 3586
diff changeset
82 BASE_CFLAGS=""
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
83 BASE_LDFLAGS=""
1389
ce65f014190a Fixed X11 library detection
Sam Lantinga <slouken@libsdl.org>
parents: 1384
diff changeset
84 ;;
ce65f014190a Fixed X11 library detection
Sam Lantinga <slouken@libsdl.org>
parents: 1384
diff changeset
85 esac
5030
6a0803e47c7b Greg Jandl to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 5029
diff changeset
86 # Uncomment the following line if you want to force SDL and applications
6a0803e47c7b Greg Jandl to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 5029
diff changeset
87 # built with it to be compiled for a particular architecture.
6a0803e47c7b Greg Jandl to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 5029
diff changeset
88 #AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]")
1648
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
89 BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
3382
294fb5e6f301 A better solution to making the default build optimization -O3
Sam Lantinga <slouken@libsdl.org>
parents: 3372
diff changeset
90 # The default optimization for SDL 1.3 is -O3 (Bug #31)
294fb5e6f301 A better solution to making the default build optimization -O3
Sam Lantinga <slouken@libsdl.org>
parents: 3372
diff changeset
91 if test x$orig_CFLAGS = x; then
294fb5e6f301 A better solution to making the default build optimization -O3
Sam Lantinga <slouken@libsdl.org>
parents: 3372
diff changeset
92 BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`
294fb5e6f301 A better solution to making the default build optimization -O3
Sam Lantinga <slouken@libsdl.org>
parents: 3372
diff changeset
93 fi
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
94 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
95 BUILD_LDFLAGS="$LDFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
96 EXTRA_LDFLAGS="$BASE_LDFLAGS"
2163
5f96cf74b782 NAS dynamic loading is going to be have to looked at... *sigh*
Sam Lantinga <slouken@libsdl.org>
parents: 2158
diff changeset
97 ## These are common directories to find software packages
5f96cf74b782 NAS dynamic loading is going to be have to looked at... *sigh*
Sam Lantinga <slouken@libsdl.org>
parents: 2158
diff changeset
98 #for path in /usr/freeware /usr/pkg /usr/X11R6 /usr/local; do
1823
d2b0f8b18ab8 Whoops, need a space after dnl to make it meaningful. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1822
diff changeset
99 # if test -d $path/include; then
d2b0f8b18ab8 Whoops, need a space after dnl to make it meaningful. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1822
diff changeset
100 # EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
d2b0f8b18ab8 Whoops, need a space after dnl to make it meaningful. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1822
diff changeset
101 # fi
d2b0f8b18ab8 Whoops, need a space after dnl to make it meaningful. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1822
diff changeset
102 # if test -d $path/lib; then
d2b0f8b18ab8 Whoops, need a space after dnl to make it meaningful. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1822
diff changeset
103 # EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
d2b0f8b18ab8 Whoops, need a space after dnl to make it meaningful. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1822
diff changeset
104 # fi
d2b0f8b18ab8 Whoops, need a space after dnl to make it meaningful. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1822
diff changeset
105 #done
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
106 SDL_CFLAGS="$BASE_CFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
107 SDL_LIBS="-lSDL $BASE_LDFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
108 CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
109 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
110 LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
1373
04499d3e1b6b *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 1370
diff changeset
111
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
112 dnl set this to use on systems that use lib64 instead of lib
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
113 base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
114
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
115 dnl Function to find a library in the compiler search path
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
116 find_lib()
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
117 {
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
118 gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
119 gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
120 env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
121 if test "$cross_compiling" = yes; then
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
122 host_lib_path=""
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
123 else
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
124 host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
125 fi
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
126 for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
127 lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
128 if test x$lib != x; then
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
129 echo $lib
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
130 return
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
131 fi
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
132 done
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
133 }
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
134
1353
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
135 dnl Check for compiler characteristics
1341
d02b552e5304 Configure dynamically generates SDL_config.h
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
136 AC_C_CONST
d02b552e5304 Configure dynamically generates SDL_config.h
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
137 AC_C_INLINE
1353
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
138 AC_C_VOLATILE
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
139
3647
c5925cd41955 First pass at Ryan's assertion code, minor tweaks to come.
Sam Lantinga <slouken@libsdl.org>
parents: 3639
diff changeset
140 dnl See whether we want assertions for debugging/sanity checking SDL itself.
c5925cd41955 First pass at Ryan's assertion code, minor tweaks to come.
Sam Lantinga <slouken@libsdl.org>
parents: 3639
diff changeset
141 AC_ARG_ENABLE(assertions,
c5925cd41955 First pass at Ryan's assertion code, minor tweaks to come.
Sam Lantinga <slouken@libsdl.org>
parents: 3639
diff changeset
142 AC_HELP_STRING([--enable-assertions],
3654
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
143 [Enable internal sanity checks (auto/disabled/release/enabled/paranoid) [[default=auto]]]),
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
144 , enable_assertions=auto)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
145 case "$enable_assertions" in
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
146 auto) # Use optimization settings to determine assertion level
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
147 ;;
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
148 disabled)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
149 AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 0)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
150 ;;
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
151 release)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
152 AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 1)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
153 ;;
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
154 enabled)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
155 AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 2)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
156 ;;
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
157 paranoid)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
158 AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 3)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
159 ;;
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
160 *)
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
161 AC_MSG_ERROR([*** unknown assertion level. stop.])
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
162 ;;
336f3df1578d Allow configure to override assertion settings, but by default this comes from the build optimization level.
Sam Lantinga <slouken@libsdl.org>
parents: 3649
diff changeset
163 esac
3647
c5925cd41955 First pass at Ryan's assertion code, minor tweaks to come.
Sam Lantinga <slouken@libsdl.org>
parents: 3639
diff changeset
164
3354
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
165 dnl See whether we can use gcc style dependency tracking
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
166 AC_ARG_ENABLE(dependency-tracking,
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
167 AC_HELP_STRING([--enable-dependency-tracking],
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
168 [Use gcc -MMD -MT dependency tracking [[default=yes]]]),
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
169 , enable_dependency_tracking=yes)
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
170 if test x$enable_dependency_tracking = xyes; then
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
171 have_gcc_mmd_mt=no
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
172 AC_MSG_CHECKING(for GCC -MMD -MT option)
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
173 AC_TRY_COMPILE([
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
174 #if !defined(__GNUC__) || __GNUC__ < 3
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
175 #error Dependency tracking requires GCC 3.0 or newer
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
176 #endif
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
177 ],[
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
178 ],[
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
179 have_gcc_mmd_mt=yes
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
180 ])
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
181 AC_MSG_RESULT($have_gcc_mmd_mt)
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
182
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
183 if test x$have_gcc_mmd_mt = xyes; then
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
184 DEPENDENCY_TRACKING_OPTIONS="-MMD -MT \$@"
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
185 fi
98c5b421426e Fixed bug #828
Sam Lantinga <slouken@libsdl.org>
parents: 3351
diff changeset
186 fi
5004
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
187
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
188 dnl See whether we are allowed to use the system C library
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
189 AC_ARG_ENABLE(libc,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
190 AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
191 , enable_libc=yes)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
192 if test x$enable_libc = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
193 AC_DEFINE(HAVE_LIBC)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
194
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
195 dnl Check for C library headers
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
196 AC_HEADER_STDC
1501
73dc5d39bbf8 Added UTF-8 <-> UTF-16 <-> UTF-32 <-> UCS-2 <-> UCS-4 conversion capability
Sam Lantinga <slouken@libsdl.org>
parents: 1477
diff changeset
197 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 math.h iconv.h signal.h)
1353
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
198
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
199 dnl Check for typedefs, structures, etc.
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
200 AC_TYPE_SIZE_T
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
201 if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
202 AC_CHECK_TYPE(int64_t)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
203 if test x$ac_cv_type_int64_t = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
204 AC_DEFINE(SDL_HAS_64BIT_TYPE)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
205 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
206 have_inttypes=yes
1353
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
207 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
208
3012
7e30c2dc7783 Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents: 3007
diff changeset
209 dnl Check for defines
7e30c2dc7783 Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents: 3007
diff changeset
210 AC_CHECK_DEFINE(M_PI, math.h)
7e30c2dc7783 Fixed Visual C++ release build for Visual C++ 2005
Sam Lantinga <slouken@libsdl.org>
parents: 3007
diff changeset
211
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
212 dnl Checks for library functions.
2079
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
213 case "$host" in
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
214 *-*-cygwin* | *-*-mingw32*)
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
215 ;;
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
216 *)
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
217 AC_FUNC_ALLOCA
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
218 ;;
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
219 esac
1ed2155b7ee4 From: Torsten Giebl
Ryan C. Gordon <icculus@icculus.org>
parents: 2070
diff changeset
220
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
221 AC_FUNC_MEMCMP
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
222 if test x$ac_cv_func_memcmp_working = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
223 AC_DEFINE(HAVE_MEMCMP)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
224 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
225 AC_FUNC_STRTOD
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
226 if test x$ac_cv_func_strtod = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
227 AC_DEFINE(HAVE_STRTOD)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
228 fi
3405
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
229 AC_CHECK_FUNC(mprotect,
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
230 AC_TRY_COMPILE([
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
231 #include <sys/types.h>
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
232 #include <sys/mman.h>
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
233 ],[
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
234 ],[
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
235 AC_DEFINE(HAVE_MPROTECT)
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
236 ]),
d5f2dd33f4eb Merged improvements to SDL_SoftStretch() from SDL 1.2
Sam Lantinga <slouken@libsdl.org>
parents: 3394
diff changeset
237 )
3586
b6758aee0dd4 Added support for querying the number of CPUs available on Linux. This also happens to work on Mac OS X.
Sam Lantinga <slouken@libsdl.org>
parents: 3581
diff changeset
238 AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf sigaction setjmp nanosleep sysconf sysctlbyname)
1373
04499d3e1b6b *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 1370
diff changeset
239
3014
cacb282192a1 Check for functions after including the libraries that they might be in.
Sam Lantinga <slouken@libsdl.org>
parents: 3012
diff changeset
240 AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
4873
67ad1c88dda0 Added atan implementation from uClibc
Sam Lantinga <slouken@libsdl.org>
parents: 4870
diff changeset
241 AC_CHECK_FUNCS(atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt)
3014
cacb282192a1 Check for functions after including the libraries that they might be in.
Sam Lantinga <slouken@libsdl.org>
parents: 3012
diff changeset
242
5040
ff8873816c30 Fixed test for libiconv
Sam Lantinga <slouken@libsdl.org>
parents: 5030
diff changeset
243 AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
3014
cacb282192a1 Check for functions after including the libraries that they might be in.
Sam Lantinga <slouken@libsdl.org>
parents: 3012
diff changeset
244 AC_CHECK_FUNCS(iconv)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
245 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
246
3180
77d6336711fc First commit for SDL atomic operations.
Bob Pendleton <bob@pendleton.com>
parents: 3173
diff changeset
247 AC_CHECK_SIZEOF(void*)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
248 if test x$have_inttypes != xyes; then
1353
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
249 AC_CHECK_SIZEOF(char, 1)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
250 AC_CHECK_SIZEOF(short, 2)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
251 AC_CHECK_SIZEOF(int, 4)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
252 AC_CHECK_SIZEOF(long, 4)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
253 AC_CHECK_SIZEOF(long long, 8)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
254 if test x$ac_cv_sizeof_char = x1; then
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
255 AC_DEFINE(int8_t, signed char)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
256 AC_DEFINE(uint8_t, unsigned char)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
257 fi
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
258 if test x$ac_cv_sizeof_short = x2; then
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
259 AC_DEFINE(int16_t, signed short)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
260 AC_DEFINE(uint16_t, unsigned short)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
261 else
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
262 if test x$ac_cv_sizeof_int = x2; then
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
263 AC_DEFINE(int16_t, signed int)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
264 AC_DEFINE(uint16_t, unsigned int)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
265 fi
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
266 fi
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
267 if test x$ac_cv_sizeof_int = x4; then
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
268 AC_DEFINE(int32_t, signed int)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
269 AC_DEFINE(uint32_t, unsigned int)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
270 else
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
271 if test x$ac_cv_sizeof_long = x4; then
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
272 AC_DEFINE(int32_t, signed long)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
273 AC_DEFINE(uint32_t, unsigned long)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
274 fi
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
275 fi
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
276 if test x$ac_cv_sizeof_long = x8; then
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
277 AC_DEFINE(int64_t, signed long)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
278 AC_DEFINE(uint64_t, unsigned long)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
279 AC_DEFINE(SDL_HAS_64BIT_TYPE)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
280 else
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
281 if test x$ac_cv_sizeof_long_long = x8; then
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
282 AC_DEFINE(int64_t, signed long long)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
283 AC_DEFINE(uint64_t, unsigned long long)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
284 AC_DEFINE(SDL_HAS_64BIT_TYPE)
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
285 fi
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
286 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
287 AC_DEFINE(size_t, unsigned int)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
288 AC_DEFINE(uintptr_t, unsigned long)
1353
7ba544e2888d Started the process of improving configure support, and merging C types
Sam Lantinga <slouken@libsdl.org>
parents: 1352
diff changeset
289 fi
1341
d02b552e5304 Configure dynamically generates SDL_config.h
Sam Lantinga <slouken@libsdl.org>
parents: 1330
diff changeset
290
5004
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
291 dnl See whether we can use gcc atomic operations on this architecture
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
292 AC_ARG_ENABLE(gcc-atomics,
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
293 AC_HELP_STRING([--enable-gcc-atomics],
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
294 [Use gcc builtin atomics [[default=yes]]]),
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
295 , enable_gcc_atomics=yes)
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
296 if test x$enable_gcc_atomics = xyes; then
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
297 have_gcc_atomics=no
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
298 AC_MSG_CHECKING(for GCC builtin atomic operations)
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
299 AC_TRY_LINK([
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
300 ],[
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
301 int a;
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
302 void *x, *y, *z;
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
303 __sync_lock_test_and_set(&a, 4);
5097
dceec93471e7 Improvements based on feedback from Anthony Williams
Sam Lantinga <slouken@libsdl.org>
parents: 5095
diff changeset
304 __sync_lock_test_and_set(&x, y);
5004
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
305 __sync_fetch_and_add(&a, 1);
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
306 __sync_bool_compare_and_swap(&a, 5, 10);
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
307 __sync_bool_compare_and_swap(&x, y, z);
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
308 ],[
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
309 have_gcc_atomics=yes
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
310 ])
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
311 AC_MSG_RESULT($have_gcc_atomics)
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
312
5068
231dbbc3e31c Fixed atomic intrinsic test
Sam Lantinga <slouken@libsdl.org>
parents: 5066
diff changeset
313 if test x$have_gcc_atomics = xyes; then
5004
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
314 AC_DEFINE(HAVE_GCC_ATOMICS)
5071
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
315 else
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
316 # See if we have the minimum operation needed for GCC atomics
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
317 AC_TRY_LINK([
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
318 ],[
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
319 int a;
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
320 __sync_lock_test_and_set(&a, 1);
5097
dceec93471e7 Improvements based on feedback from Anthony Williams
Sam Lantinga <slouken@libsdl.org>
parents: 5095
diff changeset
321 __sync_lock_release(&a);
5071
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
322 ],[
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
323 have_gcc_sync_lock_test_and_set=yes
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
324 ])
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
325 if test x$have_gcc_sync_lock_test_and_set = xyes; then
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
326 AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
55ff76cdbbb8 HAVE_GCC_ATOMICS covers the test and set
Sam Lantinga <slouken@libsdl.org>
parents: 5069
diff changeset
327 fi
5069
fd125217f00c Separated out the minimum functionality that we need from gcc for our spinlock fallback.
Sam Lantinga <slouken@libsdl.org>
parents: 5068
diff changeset
328 fi
5004
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
329 fi
0c72ae7b7cb2 Added native atomic operations for Windows, Mac OS X, and gcc compiler intrinsics.
Sam Lantinga <slouken@libsdl.org>
parents: 5003
diff changeset
330
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
331 # Standard C sources
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
332 SOURCES="$SOURCES $srcdir/src/*.c"
5157
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5153
diff changeset
333 SOURCES="$SOURCES $srcdir/src/atomic/*.c"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
334 SOURCES="$SOURCES $srcdir/src/audio/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
335 SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
336 SOURCES="$SOURCES $srcdir/src/events/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
337 SOURCES="$SOURCES $srcdir/src/file/*.c"
5157
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5153
diff changeset
338 SOURCES="$SOURCES $srcdir/src/render/*.c"
fb424691cfc7 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
Sam Lantinga <slouken@libsdl.org>
parents: 5153
diff changeset
339 SOURCES="$SOURCES $srcdir/src/render/*/*.c"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
340 SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
341 SOURCES="$SOURCES $srcdir/src/thread/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
342 SOURCES="$SOURCES $srcdir/src/timer/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
343 SOURCES="$SOURCES $srcdir/src/video/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
344
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
345 dnl Enable/disable various subsystems of the SDL library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
346
3199
3e1bf2b8bd81 This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
Bob Pendleton <bob@pendleton.com>
parents: 3180
diff changeset
347 AC_ARG_ENABLE(atomic,
3e1bf2b8bd81 This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
Bob Pendleton <bob@pendleton.com>
parents: 3180
diff changeset
348 AC_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [[default=yes]]]),
3e1bf2b8bd81 This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
Bob Pendleton <bob@pendleton.com>
parents: 3180
diff changeset
349 , enable_atomic=yes)
3e1bf2b8bd81 This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
Bob Pendleton <bob@pendleton.com>
parents: 3180
diff changeset
350 if test x$enable_atomic != xyes; then
3e1bf2b8bd81 This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
Bob Pendleton <bob@pendleton.com>
parents: 3180
diff changeset
351 AC_DEFINE(SDL_ATOMIC_DISABLED)
3e1bf2b8bd81 This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
Bob Pendleton <bob@pendleton.com>
parents: 3180
diff changeset
352 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
353 AC_ARG_ENABLE(audio,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
354 AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
355 , enable_audio=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
356 if test x$enable_audio != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
357 AC_DEFINE(SDL_AUDIO_DISABLED)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
358 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
359 AC_ARG_ENABLE(video,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
360 AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
361 , enable_video=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
362 if test x$enable_video != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
363 AC_DEFINE(SDL_VIDEO_DISABLED)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
364 fi
5231
710d00cb3a6a Made it possible to disable the rendering subsystem with configure --disable-render
Sam Lantinga <slouken@libsdl.org>
parents: 5230
diff changeset
365 AC_ARG_ENABLE(render,
710d00cb3a6a Made it possible to disable the rendering subsystem with configure --disable-render
Sam Lantinga <slouken@libsdl.org>
parents: 5230
diff changeset
366 AC_HELP_STRING([--enable-render], [Enable the render subsystem [[default=yes]]]),
710d00cb3a6a Made it possible to disable the rendering subsystem with configure --disable-render
Sam Lantinga <slouken@libsdl.org>
parents: 5230
diff changeset
367 , enable_render=yes)
710d00cb3a6a Made it possible to disable the rendering subsystem with configure --disable-render
Sam Lantinga <slouken@libsdl.org>
parents: 5230
diff changeset
368 if test x$enable_render != xyes; then
710d00cb3a6a Made it possible to disable the rendering subsystem with configure --disable-render
Sam Lantinga <slouken@libsdl.org>
parents: 5230
diff changeset
369 AC_DEFINE(SDL_RENDER_DISABLED)
710d00cb3a6a Made it possible to disable the rendering subsystem with configure --disable-render
Sam Lantinga <slouken@libsdl.org>
parents: 5230
diff changeset
370 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
371 AC_ARG_ENABLE(events,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
372 AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
373 , enable_events=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
374 if test x$enable_events != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
375 AC_DEFINE(SDL_EVENTS_DISABLED)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
376 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
377 AC_ARG_ENABLE(joystick,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
378 AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
379 , enable_joystick=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
380 if test x$enable_joystick != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
381 AC_DEFINE(SDL_JOYSTICK_DISABLED)
2103
4a010418f3b9 Merged r3009:3011 from branches/SDL-1.2: Skip subsystem on --disable-joysticks.
Ryan C. Gordon <icculus@icculus.org>
parents: 2093
diff changeset
382 else
4a010418f3b9 Merged r3009:3011 from branches/SDL-1.2: Skip subsystem on --disable-joysticks.
Ryan C. Gordon <icculus@icculus.org>
parents: 2093
diff changeset
383 SOURCES="$SOURCES $srcdir/src/joystick/*.c"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
384 fi
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
385 AC_ARG_ENABLE(haptic,
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
386 AC_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
387 , enable_haptic=yes)
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
388 if test x$enable_haptic != xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
389 AC_DEFINE(SDL_HAPTIC_DISABLED)
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
390 else
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
391 SOURCES="$SOURCES $srcdir/src/haptic/*.c"
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
392 fi
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
393 AC_ARG_ENABLE(power,
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
394 AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
395 , enable_power=yes)
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
396 if test x$enable_power != xyes; then
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
397 AC_DEFINE(SDL_POWER_DISABLED)
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
398 else
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
399 SOURCES="$SOURCES $srcdir/src/power/*.c"
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
400 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
401 AC_ARG_ENABLE(threads,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
402 AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
403 , enable_threads=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
404 if test x$enable_threads != xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
405 AC_DEFINE(SDL_THREADS_DISABLED)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
406 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
407 AC_ARG_ENABLE(timers,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
408 AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
409 , enable_timers=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
410 if test x$enable_timers != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
411 AC_DEFINE(SDL_TIMERS_DISABLED)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
412 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
413 AC_ARG_ENABLE(file,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
414 AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
415 , enable_file=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
416 if test x$enable_file != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
417 AC_DEFINE(SDL_FILE_DISABLED)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
418 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
419 AC_ARG_ENABLE(loadso,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
420 AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
421 , enable_loadso=yes)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
422 if test x$enable_loadso != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
423 AC_DEFINE(SDL_LOADSO_DISABLED)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
424 fi
740
e70f80e98f60 Actually hook the cpuinfo module into the library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 739
diff changeset
425 AC_ARG_ENABLE(cpuinfo,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
426 AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
740
e70f80e98f60 Actually hook the cpuinfo module into the library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 739
diff changeset
427 , enable_cpuinfo=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
428 if test x$enable_cpuinfo != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
429 AC_DEFINE(SDL_CPUINFO_DISABLED)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
430 fi
5230
5d01d426f2ea It's now possible to disable the fast atomic operations, at a huge performance penalty.
Sam Lantinga <slouken@libsdl.org>
parents: 5202
diff changeset
431 AC_ARG_ENABLE(atomic,
5d01d426f2ea It's now possible to disable the fast atomic operations, at a huge performance penalty.
Sam Lantinga <slouken@libsdl.org>
parents: 5202
diff changeset
432 AC_HELP_STRING([--enable-atomic], [Enable the atomic operations [[default=yes]]]),
5d01d426f2ea It's now possible to disable the fast atomic operations, at a huge performance penalty.
Sam Lantinga <slouken@libsdl.org>
parents: 5202
diff changeset
433 , enable_atomic=yes)
5d01d426f2ea It's now possible to disable the fast atomic operations, at a huge performance penalty.
Sam Lantinga <slouken@libsdl.org>
parents: 5202
diff changeset
434 if test x$enable_atomic != xyes; then
5d01d426f2ea It's now possible to disable the fast atomic operations, at a huge performance penalty.
Sam Lantinga <slouken@libsdl.org>
parents: 5202
diff changeset
435 AC_DEFINE(SDL_ATOMIC_DISABLED)
5d01d426f2ea It's now possible to disable the fast atomic operations, at a huge performance penalty.
Sam Lantinga <slouken@libsdl.org>
parents: 5202
diff changeset
436 fi
1402
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1399
diff changeset
437 AC_ARG_ENABLE(assembly,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
438 AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
1402
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1399
diff changeset
439 , enable_assembly=yes)
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1399
diff changeset
440 if test x$enable_assembly = xyes; then
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1399
diff changeset
441 AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
442
2856
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
443 # Make sure that we don't generate floating point code that would
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
444 # cause illegal instruction exceptions on older processors
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
445 case "$host" in
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
446 *-*-darwin*)
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
447 # Don't need to worry about Apple hardware, it's all SSE capable
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
448 default_ssemath=yes
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
449 ;;
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
450 *64-*-*)
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
451 # x86 64-bit architectures all have SSE instructions
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
452 default_ssemath=yes
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
453 ;;
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
454 *)
2856
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
455 default_ssemath=no
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
456 ;;
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
457 esac
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
458 AC_ARG_ENABLE(ssemath,
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
459 AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=no]]]),
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
460 , enable_ssemath=$default_ssemath)
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
461 if test x$enable_ssemath = xno; then
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
462 if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes; then
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
463 EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
464 fi
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
465 fi
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
466
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
467 dnl Check for various instruction support
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
468 AC_ARG_ENABLE(mmx,
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
469 AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
470 , enable_mmx=yes)
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
471 if test x$enable_mmx = xyes; then
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
472 save_CFLAGS="$CFLAGS"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
473 have_gcc_mmx=no
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
474 AC_MSG_CHECKING(for GCC -mmmx option)
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
475 mmx_CFLAGS="-mmmx"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
476 CFLAGS="$save_CFLAGS $mmx_CFLAGS"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
477
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
478 AC_TRY_COMPILE([
4426
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
479 #ifdef __MINGW32__
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
480 #include <_mingw.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
481 #ifdef __MINGW64_VERSION_MAJOR
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
482 #include <intrin.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
483 #else
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
484 #include <mmintrin.h>
4426
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
485 #endif
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
486 #else
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
487 #include <mmintrin.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
488 #endif
2261
c20476d7d7b3 Enabled 3DNow! intrinsic support
Sam Lantinga <slouken@libsdl.org>
parents: 2247
diff changeset
489 #ifndef __MMX__
c20476d7d7b3 Enabled 3DNow! intrinsic support
Sam Lantinga <slouken@libsdl.org>
parents: 2247
diff changeset
490 #error Assembler CPP flag not enabled
c20476d7d7b3 Enabled 3DNow! intrinsic support
Sam Lantinga <slouken@libsdl.org>
parents: 2247
diff changeset
491 #endif
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
492 ],[
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
493 ],[
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
494 have_gcc_mmx=yes
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
495 ])
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
496 AC_MSG_RESULT($have_gcc_mmx)
2290
323a5af2924b Christian Walther fixed bug #530
Sam Lantinga <slouken@libsdl.org>
parents: 2271
diff changeset
497 CFLAGS="$save_CFLAGS"
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
498
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
499 if test x$have_gcc_mmx = xyes; then
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
500 EXTRA_CFLAGS="$EXTRA_CFLAGS $mmx_CFLAGS"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
501 fi
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
502 fi
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
503
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
504 AC_ARG_ENABLE(sse,
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
505 AC_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
506 , enable_sse=yes)
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
507 if test x$enable_sse = xyes; then
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
508 save_CFLAGS="$CFLAGS"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
509 have_gcc_sse=no
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
510 AC_MSG_CHECKING(for GCC -msse option)
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
511 sse_CFLAGS="-msse"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
512 CFLAGS="$save_CFLAGS $sse_CFLAGS"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
513
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
514 AC_TRY_COMPILE([
4426
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
515 #ifdef __MINGW32__
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
516 #include <_mingw.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
517 #ifdef __MINGW64_VERSION_MAJOR
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
518 #include <intrin.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
519 #else
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
520 #include <xmmintrin.h>
4426
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
521 #endif
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
522 #else
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
523 #include <xmmintrin.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
524 #endif
2261
c20476d7d7b3 Enabled 3DNow! intrinsic support
Sam Lantinga <slouken@libsdl.org>
parents: 2247
diff changeset
525 #ifndef __SSE__
c20476d7d7b3 Enabled 3DNow! intrinsic support
Sam Lantinga <slouken@libsdl.org>
parents: 2247
diff changeset
526 #error Assembler CPP flag not enabled
c20476d7d7b3 Enabled 3DNow! intrinsic support
Sam Lantinga <slouken@libsdl.org>
parents: 2247
diff changeset
527 #endif
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
528 ],[
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
529 ],[
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
530 have_gcc_sse=yes
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
531 ])
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
532 AC_MSG_RESULT($have_gcc_sse)
2290
323a5af2924b Christian Walther fixed bug #530
Sam Lantinga <slouken@libsdl.org>
parents: 2271
diff changeset
533 CFLAGS="$save_CFLAGS"
2247
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
534
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
535 if test x$have_gcc_sse = xyes; then
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
536 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse_CFLAGS"
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
537 fi
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
538 fi
93994f65c74c Removed hermes since it's LGPL and not compatible with a commercial license.
Sam Lantinga <slouken@libsdl.org>
parents: 2238
diff changeset
539
2264
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
540 AC_ARG_ENABLE(sse2,
2856
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
541 AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=no]]]),
c765f5fa4a2c Default SSE2 off on iX86, since gcc will use it for floating point operations
Sam Lantinga <slouken@libsdl.org>
parents: 2820
diff changeset
542 , enable_sse2=$default_ssemath)
2264
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
543 if test x$enable_sse2 = xyes; then
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
544 save_CFLAGS="$CFLAGS"
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
545 have_gcc_sse2=no
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
546 AC_MSG_CHECKING(for GCC -msse2 option)
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
547 sse2_CFLAGS="-msse2"
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
548 CFLAGS="$save_CFLAGS $sse2_CFLAGS"
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
549
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
550 AC_TRY_COMPILE([
4426
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
551 #ifdef __MINGW32__
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
552 #include <_mingw.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
553 #ifdef __MINGW64_VERSION_MAJOR
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
554 #include <intrin.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
555 #else
2264
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
556 #include <emmintrin.h>
4426
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
557 #endif
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
558 #else
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
559 #include <emmintrin.h>
1bceff8f008f Fixed bug #943
Sam Lantinga <slouken@libsdl.org>
parents: 3696
diff changeset
560 #endif
2264
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
561 #ifndef __SSE2__
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
562 #error Assembler CPP flag not enabled
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
563 #endif
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
564 ],[
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
565 ],[
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
566 have_gcc_sse2=yes
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
567 ])
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
568 AC_MSG_RESULT($have_gcc_sse2)
2290
323a5af2924b Christian Walther fixed bug #530
Sam Lantinga <slouken@libsdl.org>
parents: 2271
diff changeset
569 CFLAGS="$save_CFLAGS"
2264
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
570
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
571 if test x$have_gcc_sse2 = xyes; then
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
572 EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
573 fi
f7f80b822c1f Enabled SSE2 intrinsics
Sam Lantinga <slouken@libsdl.org>
parents: 2261
diff changeset
574 fi
740
e70f80e98f60 Actually hook the cpuinfo module into the library. :)
Sam Lantinga <slouken@libsdl.org>
parents: 739
diff changeset
575 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
576
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
577 dnl See if the OSS audio interface is supported
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
578 CheckOSS()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
579 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
580 AC_ARG_ENABLE(oss,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
581 AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
582 , enable_oss=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
583 if test x$enable_audio = xyes -a x$enable_oss = xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
584 AC_MSG_CHECKING(for OSS audio support)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
585 have_oss=no
94
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
586 if test x$have_oss != xyes; then
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
587 AC_TRY_COMPILE([
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
588 #include <sys/soundcard.h>
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
589 ],[
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
590 int arg = SNDCTL_DSP_SETFRAGMENT;
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
591 ],[
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
592 have_oss=yes
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
593 ])
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
594 fi
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
595 if test x$have_oss != xyes; then
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
596 AC_TRY_COMPILE([
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
597 #include <soundcard.h>
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
598 ],[
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
599 int arg = SNDCTL_DSP_SETFRAGMENT;
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
600 ],[
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
601 have_oss=yes
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
602 AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
94
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
603 ])
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
604 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
605 AC_MSG_RESULT($have_oss)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
606 if test x$have_oss = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
607 AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
608 SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
609 SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
610 have_audio=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
611
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
612 # We may need to link with ossaudio emulation library
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
613 case "$host" in
1383
1736c5e2173f NetBSD support
Sam Lantinga <slouken@libsdl.org>
parents: 1380
diff changeset
614 *-*-openbsd*|*-*-netbsd*)
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
615 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
616 esac
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
617 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
618 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
619 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
620
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
621 dnl See if the ALSA audio interface is supported
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
622 CheckALSA()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
623 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
624 AC_ARG_ENABLE(alsa,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
625 AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
626 , enable_alsa=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
627 if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
948
ac488ad4ef1d Don't fail if we don't have ALSA available
Sam Lantinga <slouken@libsdl.org>
parents: 939
diff changeset
628 AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
1009
027688378762 No really, don't link with the ALSA library!
Sam Lantinga <slouken@libsdl.org>
parents: 991
diff changeset
629 # Restore all flags from before the ALSA detection runs
027688378762 No really, don't link with the ALSA library!
Sam Lantinga <slouken@libsdl.org>
parents: 991
diff changeset
630 CFLAGS="$alsa_save_CFLAGS"
027688378762 No really, don't link with the ALSA library!
Sam Lantinga <slouken@libsdl.org>
parents: 991
diff changeset
631 LDFLAGS="$alsa_save_LDFLAGS"
027688378762 No really, don't link with the ALSA library!
Sam Lantinga <slouken@libsdl.org>
parents: 991
diff changeset
632 LIBS="$alsa_save_LIBS"
354
30935e76acb5 Updated ALSA audio support for ALSA 0.9
Sam Lantinga <slouken@libsdl.org>
parents: 350
diff changeset
633 if test x$have_alsa = xyes; then
865
92615154bb68 Date: Sun, 29 Feb 2004 15:14:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 856
diff changeset
634 AC_ARG_ENABLE(alsa-shared,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
635 AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
636 , enable_alsa_shared=yes)
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
637 alsa_lib=[`find_lib "libasound.so.*" "$ALSA_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
638
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
639 AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
640 SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
641 EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
642 if test x$have_loadso != xyes && \
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
643 test x$enable_alsa_shared = xyes; then
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
644 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
645 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
646 if test x$have_loadso = xyes && \
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
647 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
648 echo "-- dynamic libasound -> $alsa_lib"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
649 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
650 else
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
651 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
652 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
653 have_audio=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
654 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
655 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
656 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
657
148
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
658 dnl Check whether we want to use IRIX 6.5+ native audio or not
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
659 CheckDMEDIA()
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
660 {
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
661 if test x$enable_audio = xyes; then
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
662 AC_MSG_CHECKING(for dmedia audio support)
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
663 have_dmedia=no
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
664 AC_TRY_COMPILE([
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
665 #include <dmedia/audio.h>
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
666 ],[
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
667 ALport audio_port;
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
668 ],[
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
669 have_dmedia=yes
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
670 ])
935
f8d5ddc7aef1 Audio improvements from Max Horn, including a new CoreAudio driver for MacOSX
Sam Lantinga <slouken@libsdl.org>
parents: 886
diff changeset
671 AC_MSG_RESULT($have_dmedia)
148
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
672 # Set up files for the audio library
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
673 if test x$have_dmedia = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
674 AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
675 SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
676 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
677 have_audio=yes
148
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
678 fi
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
679 fi
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
680 }
8758b8d42cd9 Audio subsystem no longer assumes sun audio API on UNIX systems
Sam Lantinga <slouken@libsdl.org>
parents: 144
diff changeset
681
1438
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
682 dnl Check whether we want to use Tru64 UNIX native audio or not
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
683 CheckMME()
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
684 {
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
685 dnl Make sure we are running on an Tru64 UNIX
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
686 case $ARCH in
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
687 osf)
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
688 ;;
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
689 *)
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
690 return
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
691 ;;
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
692 esac
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
693 if test x$enable_audio = xyes; then
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
694 AC_MSG_CHECKING(for MME audio support)
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
695 MME_CFLAGS="-I/usr/include/mme"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
696 MME_LIBS="-lmme"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
697 have_mme=no
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
698 save_CFLAGS="$CFLAGS"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
699 CFLAGS="$CFLAGS $MME_CFLAGS"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
700 AC_TRY_COMPILE([
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
701 #include <mme_api.h>
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
702 ],[
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
703 HWAVEOUT sound;
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
704 ],[
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
705 have_mme=yes
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
706 ])
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
707 CFLAGS="$save_CFLAGS"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
708 AC_MSG_RESULT($have_mme)
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
709 # Set up files for the audio library
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
710 if test x$have_mme = xyes; then
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
711 AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
712 SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
713 EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
714 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
1438
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
715 have_audio=yes
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
716 fi
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
717 fi
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
718 }
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
719
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
720 dnl Find the ESD includes and libraries
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
721 CheckESD()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
722 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
723 AC_ARG_ENABLE(esd,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
724 AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
725 , enable_esd=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
726 if test x$enable_audio = xyes -a x$enable_esd = xyes; then
948
ac488ad4ef1d Don't fail if we don't have ALSA available
Sam Lantinga <slouken@libsdl.org>
parents: 939
diff changeset
727 AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
ac488ad4ef1d Don't fail if we don't have ALSA available
Sam Lantinga <slouken@libsdl.org>
parents: 939
diff changeset
728 if test x$have_esd = xyes; then
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
729 AC_ARG_ENABLE(esd-shared,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
730 AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]),
678
7f691fa4c1c7 Turn dynamic loading of esd and arts on by default
Sam Lantinga <slouken@libsdl.org>
parents: 675
diff changeset
731 , enable_esd_shared=yes)
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
732 esd_lib=[`find_lib "libesd.so.*" "$ESD_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
733
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
734 AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
735 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
736 EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
1173
e9cf8c1b4590 Split up src/SDL_loadso.c into platform directories.
Ryan C. Gordon <icculus@icculus.org>
parents: 1170
diff changeset
737 if test x$have_loadso != xyes && \
296
fab1ddc4d7bf Removed the API changes to preserve SDL 1.2 stability
Sam Lantinga <slouken@libsdl.org>
parents: 295
diff changeset
738 test x$enable_esd_shared = xyes; then
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
739 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading])
296
fab1ddc4d7bf Removed the API changes to preserve SDL 1.2 stability
Sam Lantinga <slouken@libsdl.org>
parents: 295
diff changeset
740 fi
1173
e9cf8c1b4590 Split up src/SDL_loadso.c into platform directories.
Ryan C. Gordon <icculus@icculus.org>
parents: 1170
diff changeset
741 if test x$have_loadso = xyes && \
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
742 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
743 echo "-- dynamic libesd -> $esd_lib"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
744 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
745 else
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
746 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
747 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
748 have_audio=yes
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
749 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
750 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
751 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
752
2271
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
753 dnl Find PulseAudio
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
754 CheckPulseAudio()
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
755 {
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
756 AC_ARG_ENABLE(pulseaudio,
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
757 AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
758 , enable_pulseaudio=yes)
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
759 if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
760 audio_pulseaudio=no
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
761
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
762 PULSEAUDIO_REQUIRED_VERSION=0.9
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
763
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
764 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
765 AC_MSG_CHECKING(for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support)
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
766 if test x$PKG_CONFIG != xno; then
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
767 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
768 PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
769 PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
770 audio_pulseaudio=yes
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
771 fi
2271
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
772 fi
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
773 AC_MSG_RESULT($audio_pulseaudio)
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
774
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
775 if test x$audio_pulseaudio = xyes; then
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
776 AC_ARG_ENABLE(pulseaudio-shared,
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
777 AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
778 , enable_pulseaudio_shared=yes)
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
779 pulseaudio_lib=[`find_lib "libpulse-simple.so.*" "$PULSEAUDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
2271
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
780
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
781 AC_DEFINE(SDL_AUDIO_DRIVER_PULSEAUDIO)
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
782 SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
783 EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSEAUDIO_CFLAGS"
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
784 if test x$have_loadso != xyes && \
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
785 test x$enable_pulseaudio_shared = xyes; then
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
786 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading])
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
787 fi
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
788 if test x$have_loadso = xyes && \
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
789 test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
790 echo "-- dynamic libpulse-simple -> $pulseaudio_lib"
2271
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
791 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC, "$pulseaudio_lib")
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
792 else
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
793 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSEAUDIO_LIBS"
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
794 fi
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
795 have_audio=yes
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
796 fi
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
797 fi
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
798 }
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
799
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
800 CheckARTSC()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
801 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
802 AC_ARG_ENABLE(arts,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
803 AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
804 , enable_arts=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
805 if test x$enable_audio = xyes -a x$enable_arts = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
806 AC_PATH_PROG(ARTSCONFIG, artsc-config)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
807 if test x$ARTSCONFIG = x -o x$ARTSCONFIG = x'"$ARTSCONFIG"'; then
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
808 : # arts isn't installed
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
809 else
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
810 ARTS_CFLAGS=`$ARTSCONFIG --cflags`
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
811 ARTS_LIBS=`$ARTSCONFIG --libs`
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
812 AC_MSG_CHECKING(for aRts development environment)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
813 audio_arts=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
814 save_CFLAGS="$CFLAGS"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
815 CFLAGS="$CFLAGS $ARTS_CFLAGS"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
816 AC_TRY_COMPILE([
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
817 #include <artsc.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
818 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
819 arts_stream_t stream;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
820 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
821 audio_arts=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
822 ])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
823 CFLAGS="$save_CFLAGS"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
824 AC_MSG_RESULT($audio_arts)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
825 if test x$audio_arts = xyes; then
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
826 AC_ARG_ENABLE(arts-shared,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
827 AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
678
7f691fa4c1c7 Turn dynamic loading of esd and arts on by default
Sam Lantinga <slouken@libsdl.org>
parents: 675
diff changeset
828 , enable_arts_shared=yes)
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
829 arts_lib=[`find_lib "libartsc.so.*" "$ARTS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
830
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
831 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
832 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
833 EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
1173
e9cf8c1b4590 Split up src/SDL_loadso.c into platform directories.
Ryan C. Gordon <icculus@icculus.org>
parents: 1170
diff changeset
834 if test x$have_loadso != xyes && \
296
fab1ddc4d7bf Removed the API changes to preserve SDL 1.2 stability
Sam Lantinga <slouken@libsdl.org>
parents: 295
diff changeset
835 test x$enable_arts_shared = xyes; then
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
836 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading])
296
fab1ddc4d7bf Removed the API changes to preserve SDL 1.2 stability
Sam Lantinga <slouken@libsdl.org>
parents: 295
diff changeset
837 fi
1173
e9cf8c1b4590 Split up src/SDL_loadso.c into platform directories.
Ryan C. Gordon <icculus@icculus.org>
parents: 1170
diff changeset
838 if test x$have_loadso = xyes && \
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
839 test x$enable_arts_shared = xyes && test x$arts_lib != x; then
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
840 echo "-- dynamic libartsc -> $arts_lib"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
841 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
842 else
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
843 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
844 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
845 have_audio=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
846 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
847 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
848 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
849 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
850
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
851 dnl See if the NAS audio interface is supported
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
852 CheckNAS()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
853 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
854 AC_ARG_ENABLE(nas,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
855 AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
41
8de9e8baaecc *** empty log message ***
Sam Lantinga <slouken@lokigames.com>
parents: 39
diff changeset
856 , enable_nas=yes)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
857 if test x$enable_audio = xyes -a x$enable_nas = xyes; then
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
858 AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
859 AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
860
41
8de9e8baaecc *** empty log message ***
Sam Lantinga <slouken@lokigames.com>
parents: 39
diff changeset
861 AC_MSG_CHECKING(for NAS audio support)
8de9e8baaecc *** empty log message ***
Sam Lantinga <slouken@lokigames.com>
parents: 39
diff changeset
862 have_nas=no
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
863
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
864 if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
865 have_nas=yes
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
866 NAS_LIBS="-laudio"
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
867
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
868 elif test -r /usr/X11R6/include/audio/audiolib.h; then
41
8de9e8baaecc *** empty log message ***
Sam Lantinga <slouken@lokigames.com>
parents: 39
diff changeset
869 have_nas=yes
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
870 NAS_CFLAGS="-I/usr/X11R6/include/"
1520
5d264facfd03 Add the NAS library directory, since X11 is dynamically loaded now...
Sam Lantinga <slouken@libsdl.org>
parents: 1512
diff changeset
871 NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
605
6399f4e90211 IRIX patches from Andrea Suatoni
Sam Lantinga <slouken@libsdl.org>
parents: 599
diff changeset
872
6399f4e90211 IRIX patches from Andrea Suatoni
Sam Lantinga <slouken@libsdl.org>
parents: 599
diff changeset
873 dnl On IRIX, the NAS includes are in a different directory,
6399f4e90211 IRIX patches from Andrea Suatoni
Sam Lantinga <slouken@libsdl.org>
parents: 599
diff changeset
874 dnl and libnas must be explicitly linked in
6399f4e90211 IRIX patches from Andrea Suatoni
Sam Lantinga <slouken@libsdl.org>
parents: 599
diff changeset
875
6399f4e90211 IRIX patches from Andrea Suatoni
Sam Lantinga <slouken@libsdl.org>
parents: 599
diff changeset
876 elif test -r /usr/freeware/include/nas/audiolib.h; then
6399f4e90211 IRIX patches from Andrea Suatoni
Sam Lantinga <slouken@libsdl.org>
parents: 599
diff changeset
877 have_nas=yes
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
878 NAS_LIBS="-lnas -lXt"
41
8de9e8baaecc *** empty log message ***
Sam Lantinga <slouken@lokigames.com>
parents: 39
diff changeset
879 fi
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
880
605
6399f4e90211 IRIX patches from Andrea Suatoni
Sam Lantinga <slouken@libsdl.org>
parents: 599
diff changeset
881 AC_MSG_RESULT($have_nas)
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
882
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
883 if test x$have_nas = xyes; then
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
884 AC_ARG_ENABLE(nas-shared,
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
885 AC_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]),
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
886 , enable_nas_shared=yes)
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
887 nas_lib=[`find_lib "libaudio.so.*" "$NAS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
888
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
889 if test x$have_loadso != xyes && \
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
890 test x$enable_nas_shared = xyes; then
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
891 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic NAS loading])
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
892 fi
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
893 if test x$have_loadso = xyes && \
2163
5f96cf74b782 NAS dynamic loading is going to be have to looked at... *sigh*
Sam Lantinga <slouken@libsdl.org>
parents: 2158
diff changeset
894 test x$enable_nas_shared = xyes && test x$nas_lib != x; then
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
895 echo "-- dynamic libaudio -> $nas_lib"
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
896 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_NAS_DYNAMIC, "$nas_lib")
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
897 else
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
898 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
899 fi
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
900
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
901 AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
902 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
903 EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
904 have_audio=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
905 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
906 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
907 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
908
68
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
909 dnl rcg07142001 See if the user wants the disk writer audio driver...
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
910 CheckDiskAudio()
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
911 {
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
912 AC_ARG_ENABLE(diskaudio,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
913 AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
86
13e4c612098d Dummy audio and video drivers are enabled (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 76
diff changeset
914 , enable_diskaudio=yes)
68
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
915 if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
916 AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
917 SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
68
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
918 fi
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
919 }
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
920
1532
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
921 dnl rcg03142006 See if the user wants the dummy audio driver...
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
922 CheckDummyAudio()
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
923 {
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
924 AC_ARG_ENABLE(dummyaudio,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
925 AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
1532
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
926 , enable_dummyaudio=yes)
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
927 if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
928 AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
929 SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
930 fi
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
931 }
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
932
1573
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
933 dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
934 dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
935 CheckVisibilityHidden()
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
936 {
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
937 AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
938 have_gcc_fvisibility=no
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
939
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
940 visibility_CFLAGS="-fvisibility=hidden"
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
941 save_CFLAGS="$CFLAGS"
2292
4845eb8d4221 Merged -fvisibility detection fix from SDL 1.2 revision 3500
Sam Lantinga <slouken@libsdl.org>
parents: 2290
diff changeset
942 CFLAGS="$save_CFLAGS $visibility_CFLAGS -Werror"
1573
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
943 AC_TRY_COMPILE([
1745
741dc4e89f3a Only use -fvisibility=hidden if SDL will define some symbols as available. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1742
diff changeset
944 #if !defined(__GNUC__) || __GNUC__ < 4
741dc4e89f3a Only use -fvisibility=hidden if SDL will define some symbols as available. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1742
diff changeset
945 #error SDL only uses visibility attributes in GCC 4 or newer
741dc4e89f3a Only use -fvisibility=hidden if SDL will define some symbols as available. :)
Sam Lantinga <slouken@libsdl.org>
parents: 1742
diff changeset
946 #endif
1573
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
947 ],[
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
948 ],[
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
949 have_gcc_fvisibility=yes
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
950 ])
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
951 AC_MSG_RESULT($have_gcc_fvisibility)
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
952 CFLAGS="$save_CFLAGS"
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
953
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
954 if test x$have_gcc_fvisibility = xyes; then
1574
0fd72308659e Default to use the visibility attribute, on gcc (is this okay?)
Sam Lantinga <slouken@libsdl.org>
parents: 1573
diff changeset
955 EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
1573
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
956 fi
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
957 }
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
958
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
959
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
960 dnl Find the X11 include and library directories
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
961 CheckX11()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
962 {
4681
5378f2d0754f Fixed some Gesture bugs
Jim Grandpre <jim.tla@gmail.com>
parents: 4669
diff changeset
963
5378f2d0754f Fixed some Gesture bugs
Jim Grandpre <jim.tla@gmail.com>
parents: 4669
diff changeset
964
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
965 AC_ARG_ENABLE(video-x11,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
966 AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
967 , enable_video_x11=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
968 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
1806
8baf6641cd57 Added hardcoded /usr/X11R6 path so GLX detection works on Mac OS X.
Sam Lantinga <slouken@libsdl.org>
parents: 1799
diff changeset
969 case "$host" in
1807
Sam Lantinga <slouken@libsdl.org>
parents: 1806
diff changeset
970 *-*-darwin*)
Sam Lantinga <slouken@libsdl.org>
parents: 1806
diff changeset
971 # This isn't necessary for X11, but fixes GLX detection
1808
3e5029051a6d Only set Mac OS X default if both parameters are left default
Sam Lantinga <slouken@libsdl.org>
parents: 1807
diff changeset
972 if test "x$x_includes" = xNONE && test "x$x_libraries" = xNONE; then
1806
8baf6641cd57 Added hardcoded /usr/X11R6 path so GLX detection works on Mac OS X.
Sam Lantinga <slouken@libsdl.org>
parents: 1799
diff changeset
973 x_includes="/usr/X11R6/include"
8baf6641cd57 Added hardcoded /usr/X11R6 path so GLX detection works on Mac OS X.
Sam Lantinga <slouken@libsdl.org>
parents: 1799
diff changeset
974 x_libraries="/usr/X11R6/lib"
8baf6641cd57 Added hardcoded /usr/X11R6 path so GLX detection works on Mac OS X.
Sam Lantinga <slouken@libsdl.org>
parents: 1799
diff changeset
975 fi
8baf6641cd57 Added hardcoded /usr/X11R6 path so GLX detection works on Mac OS X.
Sam Lantinga <slouken@libsdl.org>
parents: 1799
diff changeset
976 ;;
8baf6641cd57 Added hardcoded /usr/X11R6 path so GLX detection works on Mac OS X.
Sam Lantinga <slouken@libsdl.org>
parents: 1799
diff changeset
977 esac
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
978 AC_PATH_X
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
979 AC_PATH_XTRA
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
980 if test x$have_x = xyes; then
1879
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
981 # Only allow dynamically loaded X11 if the X11 function pointers
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
982 # will not end up in the global namespace, which causes problems
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
983 # with other libraries calling X11 functions.
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
984 x11_symbols_private=$have_gcc_fvisibility
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
985
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 1162
diff changeset
986 AC_ARG_ENABLE(x11-shared,
1879
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
987 AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
988 , enable_x11_shared=maybe)
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 1162
diff changeset
989
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
990 case "$host" in
1589
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
991 *-*-darwin*) # Latest Mac OS X actually ships with Xrandr/Xrender libs...
1879
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
992 x11_symbols_private=yes
1174
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
993 x11_lib='/usr/X11R6/lib/libX11.6.dylib'
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
994 x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
1592
802de24df8d9 Lines swapped to match ordering elsewhere
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
995 xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
1589
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
996 xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
2763
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
997 xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
998 xss_lib='/usr/X11R6/lib/libXss.6.dylib'
4626
2cfd55c58cd9 For consistency, swapped line order
Sam Lantinga <slouken@libsdl.org>
parents: 4625
diff changeset
999 xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
4625
1c562caa9123 Added dynamic loading of XFixes and XDamage on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents: 4618
diff changeset
1000 xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
1174
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
1001 ;;
1384
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1383
diff changeset
1002 *-*-osf*)
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1383
diff changeset
1003 x11_lib='libX11.so'
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1383
diff changeset
1004 x11ext_lib='libXext.so'
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1383
diff changeset
1005 ;;
6fd39b50dd91 build fixes for IRIX 6.5 - dynamic X11 loading works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1383
diff changeset
1006 *-*-irix*) # IRIX 6.5 requires that we use /usr/lib32
1299
2bf9dda618e5 Corrects dynamic X11 code on Tru64 systems.
Ryan C. Gordon <icculus@icculus.org>
parents: 1251
diff changeset
1007 x11_lib='libX11.so'
2bf9dda618e5 Corrects dynamic X11 code on Tru64 systems.
Ryan C. Gordon <icculus@icculus.org>
parents: 1251
diff changeset
1008 x11ext_lib='libXext.so'
2bf9dda618e5 Corrects dynamic X11 code on Tru64 systems.
Ryan C. Gordon <icculus@icculus.org>
parents: 1251
diff changeset
1009 ;;
1174
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
1010 *)
3391
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
1011 x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
1012 x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
1013 xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
1014 xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
1015 xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
188fc5ecc58c Simplify and improve dynamic library detection, taken from SDL_image
Sam Lantinga <slouken@libsdl.org>
parents: 3390
diff changeset
1016 xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
4604
d7535d7a40ea Integrate XFixes and XDamage into the build system.
Sunny Sachanandani <sunnysachanandani@gmail.com>
parents: 4577
diff changeset
1017 xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
d7535d7a40ea Integrate XFixes and XDamage into the build system.
Sunny Sachanandani <sunnysachanandani@gmail.com>
parents: 4577
diff changeset
1018 xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
1174
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
1019 ;;
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
1020 esac
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 1162
diff changeset
1021
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1022 if test x$ac_cv_func_shmat != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1023 X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1024 fi
1799
50e9cca3fe7b Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents: 1783
diff changeset
1025 CFLAGS="$CFLAGS $X_CFLAGS"
50e9cca3fe7b Fixed X11 support on Mac OS X Universal build
Sam Lantinga <slouken@libsdl.org>
parents: 1783
diff changeset
1026 LDFLAGS="$LDFLAGS $X_LIBS"
1468
fecfef92fc94 Don't put X_LIBS in the linker flags if we're dynamically loading X11
Sam Lantinga <slouken@libsdl.org>
parents: 1467
diff changeset
1027
fecfef92fc94 Don't put X_LIBS in the linker flags if we're dynamically loading X11
Sam Lantinga <slouken@libsdl.org>
parents: 1467
diff changeset
1028 AC_DEFINE(SDL_VIDEO_DRIVER_X11)
fecfef92fc94 Don't put X_LIBS in the linker flags if we're dynamically loading X11
Sam Lantinga <slouken@libsdl.org>
parents: 1467
diff changeset
1029 SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1030 EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
1879
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
1031
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
1032 if test x$enable_x11_shared = xmaybe; then
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
1033 enable_x11_shared=$x11_symbols_private
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
1034 fi
1173
e9cf8c1b4590 Split up src/SDL_loadso.c into platform directories.
Ryan C. Gordon <icculus@icculus.org>
parents: 1170
diff changeset
1035 if test x$have_loadso != xyes && \
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 1162
diff changeset
1036 test x$enable_x11_shared = xyes; then
1467
b69f2b0309a0 Removed accidentally copied/pasted script for ALSA detection
Sam Lantinga <slouken@libsdl.org>
parents: 1459
diff changeset
1037 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
1875
4627eca2c02b Only allow dynamic X11 if gcc4 (-fvisibility=hidden) is used.
Ryan C. Gordon <icculus@icculus.org>
parents: 1871
diff changeset
1038 enable_x11_shared=no
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 1162
diff changeset
1039 fi
1879
cb232e63552c Default the X11 dynamically loading on if the OS loader loads libraries
Sam Lantinga <slouken@libsdl.org>
parents: 1875
diff changeset
1040 if test x$x11_symbols_private != xyes && \
1875
4627eca2c02b Only allow dynamic X11 if gcc4 (-fvisibility=hidden) is used.
Ryan C. Gordon <icculus@icculus.org>
parents: 1871
diff changeset
1041 test x$enable_x11_shared = xyes; then
4627eca2c02b Only allow dynamic X11 if gcc4 (-fvisibility=hidden) is used.
Ryan C. Gordon <icculus@icculus.org>
parents: 1871
diff changeset
1042 AC_MSG_WARN([You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading])
4627eca2c02b Only allow dynamic X11 if gcc4 (-fvisibility=hidden) is used.
Ryan C. Gordon <icculus@icculus.org>
parents: 1871
diff changeset
1043 enable_x11_shared=no
4627eca2c02b Only allow dynamic X11 if gcc4 (-fvisibility=hidden) is used.
Ryan C. Gordon <icculus@icculus.org>
parents: 1871
diff changeset
1044 fi
4627eca2c02b Only allow dynamic X11 if gcc4 (-fvisibility=hidden) is used.
Ryan C. Gordon <icculus@icculus.org>
parents: 1871
diff changeset
1045
1173
e9cf8c1b4590 Split up src/SDL_loadso.c into platform directories.
Ryan C. Gordon <icculus@icculus.org>
parents: 1170
diff changeset
1046 if test x$have_loadso = xyes && \
1170
bb1a52a8d3d6 Use the right libs in dynamic X11 loading.
Ryan C. Gordon <icculus@icculus.org>
parents: 1168
diff changeset
1047 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
1174
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
1048 echo "-- dynamic libX11 -> $x11_lib"
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
1049 echo "-- dynamic libX11ext -> $x11ext_lib"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1050 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1051 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 1162
diff changeset
1052 else
1589
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1053 enable_x11_shared=no
2763
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1054 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1055 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1056 have_video=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1057
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1058 AC_ARG_ENABLE(video-x11-vm,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1059 AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1060 , enable_video_x11_vm=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1061 if test x$enable_video_x11_vm = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1062 AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1063 SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1064 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1065 AC_ARG_ENABLE(video-x11-xv,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1066 AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1067 , enable_video_x11_xv=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1068 if test x$enable_video_x11_xv = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1069 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1070 SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1071 fi
227
24878c14b391 Added X11 Xinerama support - fullscreen starts on screen 0
Sam Lantinga <slouken@libsdl.org>
parents: 222
diff changeset
1072 AC_ARG_ENABLE(video-x11-xinerama,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1073 AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
227
24878c14b391 Added X11 Xinerama support - fullscreen starts on screen 0
Sam Lantinga <slouken@libsdl.org>
parents: 222
diff changeset
1074 , enable_video_x11_xinerama=yes)
24878c14b391 Added X11 Xinerama support - fullscreen starts on screen 0
Sam Lantinga <slouken@libsdl.org>
parents: 222
diff changeset
1075 if test x$enable_video_x11_xinerama = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1076 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1077 SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
227
24878c14b391 Added X11 Xinerama support - fullscreen starts on screen 0
Sam Lantinga <slouken@libsdl.org>
parents: 222
diff changeset
1078 fi
4793
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1079 AC_ARG_ENABLE(video-x11-xshape,
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1080 AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1081 , enable_video_x11_xshape=yes)
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1082 if test x$enable_video_x11_xshape = xyes; then
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1083 AC_CHECK_HEADER(X11/extensions/shape.h,
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1084 have_shape_h_hdr=yes,
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1085 have_shape_h_hdr=no,
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1086 [#include <X11/Xlib.h>
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1087 ])
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1088 if test x$have_shape_h_hdr = xyes; then
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1089 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1090 fi
cb31d2fdbe61 Add XShape test to configure scripts.
Ryan C. Gordon <icculus@icculus.org>
parents: 4454
diff changeset
1091 fi
1589
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1092 AC_ARG_ENABLE(video-x11-xrandr,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1093 AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
1589
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1094 , enable_video_x11_xrandr=yes)
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1095 if test x$enable_video_x11_xrandr = xyes; then
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1096 definitely_enable_video_x11_xrandr=no
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1097 AC_CHECK_HEADER(X11/extensions/Xrandr.h,
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1098 have_xrandr_h_hdr=yes,
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1099 have_xrandr_h_hdr=no,
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1100 [#include <X11/Xlib.h>
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1101 ])
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1102 if test x$have_xrandr_h_hdr = xyes; then
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1103 if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1104 echo "-- dynamic libXrandr -> $xrandr_lib"
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1105 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1106 definitely_enable_video_x11_xrandr=yes
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1107 else
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1108 AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
4577
87a2d87786d4 Modified configure.in to allow building with Xrender. Fixed all problems that prevented compilation.
Sunny Sachanandani <sunnysachanandani@gmail.com>
parents: 4454
diff changeset
1109 if test x$have_xrandr_lib = xyes ; then
87a2d87786d4 Modified configure.in to allow building with Xrender. Fixed all problems that prevented compilation.
Sunny Sachanandani <sunnysachanandani@gmail.com>
parents: 4454
diff changeset
1110 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
1589
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1111 definitely_enable_video_x11_xrandr=yes
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1112 fi
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1113 fi
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1114 fi
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1115 fi
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1116 if test x$definitely_enable_video_x11_xrandr = xyes; then
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1117 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1588
diff changeset
1118 fi
2763
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1119 AC_ARG_ENABLE(video-x11-xinput,
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1120 AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1121 , enable_video_x11_xinput=yes)
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1122 if test x$enable_video_x11_xinput = xyes; then
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1123 definitely_enable_video_x11_xinput=no
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1124 AC_CHECK_HEADER(X11/extensions/XInput.h,
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1125 have_xinput_h_hdr=yes,
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1126 have_xinput_h_hdr=no,
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1127 [#include <X11/Xlib.h>
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1128 ])
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1129 if test x$have_xinput_h_hdr = xyes; then
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1130 if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1131 echo "-- dynamic libXi -> $xinput_lib"
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1132 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT, "$xinput_lib")
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1133 definitely_enable_video_x11_xinput=yes
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1134 else
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1135 AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1136 if test x$have_xinput_lib = xyes ; then
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1137 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1138 definitely_enable_video_x11_xinput=yes
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1139 fi
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1140 fi
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1141 fi
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1142 fi
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1143 if test x$definitely_enable_video_x11_xinput = xyes; then
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1144 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
6fc50bdd88c0 Some cleanups on the new XInput code.
Ryan C. Gordon <icculus@icculus.org>
parents: 2717
diff changeset
1145 fi
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1146 AC_ARG_ENABLE(video-x11-scrnsaver,
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1147 AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1148 , enable_video_x11_scrnsaver=yes)
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1149 if test x$enable_video_x11_scrnsaver = xyes; then
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1150 AC_CHECK_HEADER(X11/extensions/scrnsaver.h,
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1151 have_scrnsaver_h_hdr=yes,
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1152 have_scrnsaver_h_hdr=no,
1783
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1745
diff changeset
1153 [#include <X11/Xlib.h>
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1745
diff changeset
1154 ])
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1155 if test x$have_scrnsaver_h_hdr = xyes; then
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1156 if test x$enable_x11_shared = xyes && test x$xss_lib != x ; then
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1157 echo "-- dynamic libXss -> $xss_lib"
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1158 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS, "$xss_lib")
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1159 definitely_enable_video_x11_scrnsaver=yes
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1160 else
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1161 AC_CHECK_LIB(Xss, XScreenSaverSuspend, have_xss_lib=yes)
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1162 if test x$have_xss_lib = xyes ; then
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1163 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXss"
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1164 definitely_enable_video_x11_scrnsaver=yes
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1165 fi
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1166 fi
1783
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1745
diff changeset
1167 fi
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1745
diff changeset
1168 fi
3025
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1169 if test x$definitely_enable_video_x11_scrnsaver = xyes; then
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1170 AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
54fac87e1f34 Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents: 3014
diff changeset
1171 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1172 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1173 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1174 }
279
04351f59b051 Mike Gorchak added some QNX tweaks, including OpenGL support
Sam Lantinga <slouken@libsdl.org>
parents: 278
diff changeset
1175
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1176 dnl Set up the BWindow video driver if enabled
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1177 CheckBWINDOW()
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1178 {
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1179 if test x$enable_video = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1180 AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1181 SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1182 have_video=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1183 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1184 }
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1185
1931
103c6fec2a60 The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents: 1910
diff changeset
1186 dnl Set up the Cocoa video driver for Mac OS X (but not Darwin)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1187 CheckCOCOA()
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1188 {
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1189 AC_ARG_ENABLE(video-cocoa,
1931
103c6fec2a60 The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents: 1910
diff changeset
1190 AC_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]]),
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1191 , enable_video_cocoa=yes)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1192 if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1193 save_CFLAGS="$CFLAGS"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1194 dnl work around that we don't have Objective-C support in autoconf
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1195 CFLAGS="$CFLAGS -x objective-c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1196 AC_MSG_CHECKING(for Cocoa framework)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1197 have_cocoa=no
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1198 AC_TRY_COMPILE([
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1199 #import <Cocoa/Cocoa.h>
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1200 ],[
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1201 ],[
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1202 have_cocoa=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1203 ])
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1204 AC_MSG_RESULT($have_cocoa)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1205 CFLAGS="$save_CFLAGS"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1206 if test x$have_cocoa = xyes; then
1931
103c6fec2a60 The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents: 1910
diff changeset
1207 AC_DEFINE(SDL_VIDEO_DRIVER_COCOA)
103c6fec2a60 The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents: 1910
diff changeset
1208 SOURCES="$SOURCES $srcdir/src/video/cocoa/*.m"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1209 have_video=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1210 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1211 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1212 }
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1213
167
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1214 dnl Find DirectFB
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1215 CheckDirectFB()
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1216 {
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1217 AC_ARG_ENABLE(video-directfb,
2314
33052794de27 Disable DirectFB by default, since it hasn't been updated for the 1.3 API yet.
Sam Lantinga <slouken@libsdl.org>
parents: 2293
diff changeset
1218 AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=no]]]),
33052794de27 Disable DirectFB by default, since it hasn't been updated for the 1.3 API yet.
Sam Lantinga <slouken@libsdl.org>
parents: 2293
diff changeset
1219 , enable_video_directfb=no)
167
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1220 if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1221 video_directfb=no
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1222
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1223 DIRECTFB_REQUIRED_VERSION=1.0.0
5202
164f20ba08eb Updated the DirectFB support, from Couriersud
Sam Lantinga <slouken@libsdl.org>
parents: 5186
diff changeset
1224 AC_PATH_PROGS(DIRECTFBCONFIG, directfb-config, no, [$prefix/bin:$PATH])
1602
cd97a8e39874 Fixed DirectFB detection
Sam Lantinga <slouken@libsdl.org>
parents: 1601
diff changeset
1225 if test x$DIRECTFBCONFIG = xno; then
1588
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1226 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
1602
cd97a8e39874 Fixed DirectFB detection
Sam Lantinga <slouken@libsdl.org>
parents: 1601
diff changeset
1227 if test x$PKG_CONFIG != xno; then
cd97a8e39874 Fixed DirectFB detection
Sam Lantinga <slouken@libsdl.org>
parents: 1601
diff changeset
1228 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
1588
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1229 DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1230 DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1231 DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
1588
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1232 video_directfb=yes
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1233 fi
167
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1234 fi
1588
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1235 else
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1236 set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1237 NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1238 set -- `directfb-config --version | sed 's/\./ /g'`
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1239 HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1240 if test $HAVE_VERSION -ge $NEED_VERSION; then
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1241 DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
e20dcef5647c Improved DirectFB install detection
Sam Lantinga <slouken@libsdl.org>
parents: 1574
diff changeset
1242 DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1243 DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
167
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1244 video_directfb=yes
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1245 fi
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1246 fi
3351
8e0182c236d8 SuSE 11.1 installs directfb-config without directfb-devel, so check to
Sam Lantinga <slouken@libsdl.org>
parents: 3334
diff changeset
1247 if test x$video_directfb = xyes; then
8e0182c236d8 SuSE 11.1 installs directfb-config without directfb-devel, so check to
Sam Lantinga <slouken@libsdl.org>
parents: 3334
diff changeset
1248 # SuSE 11.1 installs directfb-config without directfb-devel
3639
6f4c5b0aba7c Fix detection of directfb.h
Couriersud <couriersud@arcor.de>
parents: 3623
diff changeset
1249 save_CPPFLAGS="$CPPFLAGS"
6f4c5b0aba7c Fix detection of directfb.h
Couriersud <couriersud@arcor.de>
parents: 3623
diff changeset
1250 CPPFLAGS="$CPPFLAGS $DIRECTFB_CFLAGS"
3351
8e0182c236d8 SuSE 11.1 installs directfb-config without directfb-devel, so check to
Sam Lantinga <slouken@libsdl.org>
parents: 3334
diff changeset
1251 AC_CHECK_HEADER(directfb.h, have_directfb_hdr=yes, have_directfb_hdr=no)
3639
6f4c5b0aba7c Fix detection of directfb.h
Couriersud <couriersud@arcor.de>
parents: 3623
diff changeset
1252 CPPFLAGS="$save_CPPFLAGS"
3351
8e0182c236d8 SuSE 11.1 installs directfb-config without directfb-devel, so check to
Sam Lantinga <slouken@libsdl.org>
parents: 3334
diff changeset
1253 video_directfb=$have_directfb_hdr
8e0182c236d8 SuSE 11.1 installs directfb-config without directfb-devel, so check to
Sam Lantinga <slouken@libsdl.org>
parents: 3334
diff changeset
1254 fi
8e0182c236d8 SuSE 11.1 installs directfb-config without directfb-devel, so check to
Sam Lantinga <slouken@libsdl.org>
parents: 3334
diff changeset
1255 AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
8e0182c236d8 SuSE 11.1 installs directfb-config without directfb-devel, so check to
Sam Lantinga <slouken@libsdl.org>
parents: 3334
diff changeset
1256 AC_MSG_RESULT($video_directfb)
167
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1257
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1258 if test x$video_directfb = xyes; then
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1259 AC_ARG_ENABLE(directfb-shared,
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1260 AC_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]),
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1261 , enable_directfb_shared=yes)
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1262
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1263 AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
5202
164f20ba08eb Updated the DirectFB support, from Couriersud
Sam Lantinga <slouken@libsdl.org>
parents: 5186
diff changeset
1264 AC_DEFINE(SDL_VIDEO_RENDER_DIRECTFB)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1265 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1266 EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1267
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1268 AC_MSG_CHECKING(for directfb dynamic loading support)
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1269 directfb_shared=no
5202
164f20ba08eb Updated the DirectFB support, from Couriersud
Sam Lantinga <slouken@libsdl.org>
parents: 5186
diff changeset
1270 directfb_lib=[`find_lib "libdirectfb.so.*" "$DIRECTFB_LIBS"`]
164f20ba08eb Updated the DirectFB support, from Couriersud
Sam Lantinga <slouken@libsdl.org>
parents: 5186
diff changeset
1271 # | sed 's/.*\/\(.*\)/\1/; q'`]
164f20ba08eb Updated the DirectFB support, from Couriersud
Sam Lantinga <slouken@libsdl.org>
parents: 5186
diff changeset
1272 AC_MSG_WARN("directfb $directfb_lib")
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1273 if test x$have_loadso != xyes && \
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1274 test x$enable_directfb_shared = xyes; then
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1275 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic directfb loading])
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1276 fi
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1277 if test x$have_loadso = xyes && \
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1278 test x$enable_directfb_shared = xyes && test x$directfb_lib != x; then
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1279 directfb_shared=yes
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1280 echo "-- $directfb_lib_spec -> $directfb_lib"
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1281 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC, "$directfb_lib")
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1282 else
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1283 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
2998
d364ee9b9c15 Date: Sun, 04 Jan 2009 20:53:30 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2947
diff changeset
1284 fi
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1285 AC_MSG_RESULT($directfb_shared)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1286 have_video=yes
167
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1287 fi
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1288 fi
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1289 }
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1290
2947
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1291 dnl Find FusionSound
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1292 CheckFusionSound()
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1293 {
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1294 AC_ARG_ENABLE(fusionsound,
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1295 AC_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1296 , enable_fusionsound=no)
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1297 if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1298 fusionsound=no
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1299
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1300 FUSIONSOUND_REQUIRED_VERSION=1.1.1
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1301
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1302 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1303 AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support)
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1304 if test x$PKG_CONFIG != xno; then
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1305 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1306 FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1307 FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1308 fusionsound=yes
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1309 fi
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1310 fi
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1311 AC_MSG_RESULT($fusionsound)
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1312
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1313 if test x$fusionsound = xyes; then
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1314 AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND)
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1315 SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1316 EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1317
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1318 AC_ARG_ENABLE(fusionsound-shared,
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1319 AC_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1320 , enable_fusionsound_shared=yes)
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1321 fusionsound_shared=no
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1322 AC_MSG_CHECKING(for FusionSound dynamic loading support)
2947
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1323 if test x$have_loadso != xyes && \
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1324 test x$enable_fusionsound_shared = xyes; then
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1325 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic fusionsound loading])
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1326 fi
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1327 if test x$have_loadso = xyes && \
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1328 test x$enable_fusionsound_shared = xyes; then
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1329 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC, "libfusionsound.so")
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1330 fusionsound_shared=yes
2947
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1331 else
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1332 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
2947
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1333 fi
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1334 AC_MSG_RESULT($fusionsound_shared)
2947
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1335
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1336 have_audio=yes
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1337 fi
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1338 fi
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1339 }
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1340
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1341 dnl rcg04172001 Set up the Null video driver.
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1342 CheckDummyVideo()
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1343 {
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1344 AC_ARG_ENABLE(video-dummy,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1345 AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
86
13e4c612098d Dummy audio and video drivers are enabled (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 76
diff changeset
1346 , enable_video_dummy=yes)
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1347 if test x$enable_video_dummy = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1348 AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1349 SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1350 have_video=yes
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1351 fi
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1352 }
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1353
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1354 dnl Check to see if OpenGL support is desired
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1355 AC_ARG_ENABLE(video-opengl,
1952
420716272158 Implemented X11 OpenGL support.
Sam Lantinga <slouken@libsdl.org>
parents: 1945
diff changeset
1356 AC_HELP_STRING([--enable-video-opengl], [include OpenGL support [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1357 , enable_video_opengl=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1358
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1359 dnl Find OpenGL
1191
2bd4cec0de63 Seperate glX from HAVE_OPENGL, for platforms that have both an X server and
Ryan C. Gordon <icculus@icculus.org>
parents: 1187
diff changeset
1360 CheckOpenGLX11()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1361 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1362 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1363 AC_MSG_CHECKING(for OpenGL (GLX) support)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1364 video_opengl=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1365 AC_TRY_COMPILE([
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1366 #include <GL/gl.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1367 #include <GL/glx.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1368 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1369 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1370 video_opengl=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1371 ])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1372 AC_MSG_RESULT($video_opengl)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1373 if test x$video_opengl = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1374 AC_DEFINE(SDL_VIDEO_OPENGL)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1375 AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
1952
420716272158 Implemented X11 OpenGL support.
Sam Lantinga <slouken@libsdl.org>
parents: 1945
diff changeset
1376 AC_DEFINE(SDL_VIDEO_RENDER_OGL)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1377 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1378 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1379 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1380
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1381 dnl Check for Windows OpenGL
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1382 CheckWINDOWSGL()
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1383 {
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1384 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1385 AC_DEFINE(SDL_VIDEO_OPENGL)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1386 AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
1952
420716272158 Implemented X11 OpenGL support.
Sam Lantinga <slouken@libsdl.org>
parents: 1945
diff changeset
1387 AC_DEFINE(SDL_VIDEO_RENDER_OGL)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1388 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1389 }
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1390
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1391 dnl Check for BeOS OpenGL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1392 CheckBeGL()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1393 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1394 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1395 AC_DEFINE(SDL_VIDEO_OPENGL)
1952
420716272158 Implemented X11 OpenGL support.
Sam Lantinga <slouken@libsdl.org>
parents: 1945
diff changeset
1396 AC_DEFINE(SDL_VIDEO_OPENGL_BGL)
420716272158 Implemented X11 OpenGL support.
Sam Lantinga <slouken@libsdl.org>
parents: 1945
diff changeset
1397 AC_DEFINE(SDL_VIDEO_RENDER_OGL)
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1398 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1399 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1400 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1401
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1402 dnl Check for MacOS OpenGL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1403 CheckMacGL()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1404 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1405 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1406 AC_DEFINE(SDL_VIDEO_OPENGL)
1952
420716272158 Implemented X11 OpenGL support.
Sam Lantinga <slouken@libsdl.org>
parents: 1945
diff changeset
1407 AC_DEFINE(SDL_VIDEO_OPENGL_CGL)
420716272158 Implemented X11 OpenGL support.
Sam Lantinga <slouken@libsdl.org>
parents: 1945
diff changeset
1408 AC_DEFINE(SDL_VIDEO_RENDER_OGL)
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
1409 case "$host" in
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1410 *-*-darwin*)
1625
7e89aa7843c5 Fixed bug #193
Sam Lantinga <slouken@libsdl.org>
parents: 1624
diff changeset
1411 if test x$enable_video_cocoa = xyes; then
3623
9a73fecd9181 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
Ryan C. Gordon <icculus@icculus.org>
parents: 3622
diff changeset
1412 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
1625
7e89aa7843c5 Fixed bug #193
Sam Lantinga <slouken@libsdl.org>
parents: 1624
diff changeset
1413 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1414 esac
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1415 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1416 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1417
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1418 dnl See if we can use the new unified event interface in Linux 2.4
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1419 CheckInputEvents()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1420 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1421 dnl Check for Linux 2.4 unified input event interface support
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1422 AC_ARG_ENABLE(input-events,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1423 AC_HELP_STRING([--enable-input-events], [use Linux 2.4 unified input interface [[default=yes]]]),
211
0cc95f442f3a If we're looking at the /dev/input event devices, and we found
Sam Lantinga <slouken@libsdl.org>
parents: 200
diff changeset
1424 , enable_input_events=yes)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1425 if test x$enable_input_events = xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1426 AC_MSG_CHECKING(for Linux 2.4 unified input interface)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1427 use_input_events=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1428 AC_TRY_COMPILE([
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1429 #include <linux/input.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1430 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1431 #ifndef EVIOCGNAME
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1432 #error EVIOCGNAME() ioctl not available
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1433 #endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1434 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1435 use_input_events=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1436 ])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1437 AC_MSG_RESULT($use_input_events)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1438 if test x$use_input_events = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1439 AC_DEFINE(SDL_INPUT_LINUXEV)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1440 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1441 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1442 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1443
1201
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1444 dnl See if we can use the Touchscreen input library
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1445 CheckTslib()
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1446 {
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1447 AC_ARG_ENABLE(input-tslib,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1448 AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
1201
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1449 , enable_input_tslib=yes)
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1450 if test x$enable_input_tslib = xyes; then
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1451 AC_MSG_CHECKING(for Touchscreen library support)
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1452 enable_input_tslib=no
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1453 AC_TRY_COMPILE([
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1454 #include "tslib.h"
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1455 ],[
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1456 ],[
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1457 enable_input_tslib=yes
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1458 ])
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1459 AC_MSG_RESULT($enable_input_tslib)
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1460 if test x$enable_input_tslib = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1461 AC_DEFINE(SDL_INPUT_TSLIB)
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1462 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
1201
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1463 fi
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1464 fi
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1465 }
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1466
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1467 dnl See what type of thread model to use on Linux and Solaris
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1468 CheckPTHREAD()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1469 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1470 dnl Check for pthread support
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1471 AC_ARG_ENABLE(pthreads,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1472 AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1473 , enable_pthreads=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1474 dnl This is used on Linux for glibc binary compatibility (Doh!)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1475 AC_ARG_ENABLE(pthread-sem,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1476 AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1477 , enable_pthread_sem=yes)
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
1478 case "$host" in
1820
133d55b02d51 Date: Thu, 11 May 2006 17:09:17 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1813
diff changeset
1479 *-*-linux*|*-*-uclinux*)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1480 pthread_cflags="-D_REENTRANT"
1324
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1481 pthread_lib="-lpthread"
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1482 ;;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1483 *-*-bsdi*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1484 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1485 pthread_lib=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1486 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1487 *-*-darwin*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1488 pthread_cflags="-D_THREAD_SAFE"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1489 # causes Carbon.p complaints?
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1490 # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1491 ;;
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1492 *-*-freebsd*|*-*-dragonfly*)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1493 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1494 pthread_lib="-pthread"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1495 ;;
43
8cc154626be9 I found the pthread package for NetBSD
Sam Lantinga <slouken@lokigames.com>
parents: 42
diff changeset
1496 *-*-netbsd*)
1383
1736c5e2173f NetBSD support
Sam Lantinga <slouken@libsdl.org>
parents: 1380
diff changeset
1497 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
2158
eff395617ed8 Merged part of NetBSD pkgsrc patch-aj:
Sam Lantinga <slouken@libsdl.org>
parents: 2148
diff changeset
1498 pthread_lib="-lpthread"
43
8cc154626be9 I found the pthread package for NetBSD
Sam Lantinga <slouken@lokigames.com>
parents: 42
diff changeset
1499 ;;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1500 *-*-openbsd*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1501 pthread_cflags="-D_REENTRANT"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1502 pthread_lib="-pthread"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1503 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1504 *-*-solaris*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1505 pthread_cflags="-D_REENTRANT"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1506 pthread_lib="-lpthread -lposix4"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1507 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1508 *-*-sysv5*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1509 pthread_cflags="-D_REENTRANT -Kthread"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1510 pthread_lib=""
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1511 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1512 *-*-irix*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1513 pthread_cflags="-D_SGI_MP_SOURCE"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1514 pthread_lib="-lpthread"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1515 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1516 *-*-aix*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1517 pthread_cflags="-D_REENTRANT -mthreads"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1518 pthread_lib="-lpthread"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1519 ;;
425
edbbe5775244 Fixed (?) semaphore support on HPUX 11.x ...
Ryan C. Gordon <icculus@icculus.org>
parents: 419
diff changeset
1520 *-*-hpux11*)
edbbe5775244 Fixed (?) semaphore support on HPUX 11.x ...
Ryan C. Gordon <icculus@icculus.org>
parents: 419
diff changeset
1521 pthread_cflags="-D_REENTRANT"
edbbe5775244 Fixed (?) semaphore support on HPUX 11.x ...
Ryan C. Gordon <icculus@icculus.org>
parents: 419
diff changeset
1522 pthread_lib="-L/usr/lib -lpthread"
edbbe5775244 Fixed (?) semaphore support on HPUX 11.x ...
Ryan C. Gordon <icculus@icculus.org>
parents: 419
diff changeset
1523 ;;
873
89666943c598 Date: Sun, 07 Mar 2004 22:54:11 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 868
diff changeset
1524 *-*-osf*)
1019
e3b3130f3af8 Date: Fri, 31 Dec 2004 04:14:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1009
diff changeset
1525 pthread_cflags="-D_REENTRANT"
873
89666943c598 Date: Sun, 07 Mar 2004 22:54:11 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 868
diff changeset
1526 if test x$ac_cv_prog_gcc = xyes; then
89666943c598 Date: Sun, 07 Mar 2004 22:54:11 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 868
diff changeset
1527 pthread_lib="-lpthread -lrt"
89666943c598 Date: Sun, 07 Mar 2004 22:54:11 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 868
diff changeset
1528 else
1019
e3b3130f3af8 Date: Fri, 31 Dec 2004 04:14:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1009
diff changeset
1529 pthread_lib="-lpthread -lexc -lrt"
873
89666943c598 Date: Sun, 07 Mar 2004 22:54:11 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 868
diff changeset
1530 fi
89666943c598 Date: Sun, 07 Mar 2004 22:54:11 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 868
diff changeset
1531 ;;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1532 *)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1533 pthread_cflags="-D_REENTRANT"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1534 pthread_lib="-lpthread"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1535 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1536 esac
3268
82ce350be859 Removed outdated iPodLinux support
Sam Lantinga <slouken@libsdl.org>
parents: 3257
diff changeset
1537 if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
415
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1538 # Save the original compiler flags and libraries
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1539 ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1540 # Add the pthread compiler flags and libraries
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1541 CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1542 # Check to see if we have pthread support on this system
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1543 AC_MSG_CHECKING(for pthreads)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1544 use_pthreads=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1545 AC_TRY_LINK([
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1546 #include <pthread.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1547 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1548 pthread_attr_t type;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1549 pthread_attr_init(&type);
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1550 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1551 use_pthreads=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1552 ])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1553 AC_MSG_RESULT($use_pthreads)
415
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1554 # Restore the compiler flags and libraries
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1555 CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1556
415
104f32d04cd1 Fixed building with pthreads and the pth library
Sam Lantinga <slouken@libsdl.org>
parents: 413
diff changeset
1557 # Do futher testing if we have pthread support...
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1558 if test x$use_pthreads = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1559 AC_DEFINE(SDL_THREAD_PTHREAD)
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1560 EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1561 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1562 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1563 SDL_LIBS="$SDL_LIBS $pthread_lib"
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1564
1438
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1565 # Save the original compiler flags and libraries
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1566 ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1567 # Add the pthread compiler flags and libraries
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1568 CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1569
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1570 # Check to see if recursive mutexes are available
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1571 AC_MSG_CHECKING(for recursive mutexes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1572 has_recursive_mutexes=no
1324
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1573 if test x$has_recursive_mutexes = xno; then
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1574 AC_TRY_COMPILE([
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1575 #include <pthread.h>
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1576 ],[
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1577 pthread_mutexattr_t attr;
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1578 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1579 ],[
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1580 has_recursive_mutexes=yes
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1581 AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
1324
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1582 ])
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1583 fi
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1584 if test x$has_recursive_mutexes = xno; then
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1585 AC_TRY_COMPILE([
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1586 #include <pthread.h>
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1587 ],[
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1588 pthread_mutexattr_t attr;
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1589 pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1590 ],[
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1591 has_recursive_mutexes=yes
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1592 AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
1324
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1593 ])
42e95163d553 Favor using pthread_mutexattr_settype() on Linux.
Sam Lantinga <slouken@libsdl.org>
parents: 1311
diff changeset
1594 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1595 AC_MSG_RESULT($has_recursive_mutexes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1596
94
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1597 # Check to see if pthread semaphore support is missing
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1598 if test x$enable_pthread_sem = xyes; then
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1599 AC_MSG_CHECKING(for pthread semaphores)
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1600 have_pthread_sem=no
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1601 AC_TRY_COMPILE([
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1602 #include <pthread.h>
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1603 #include <semaphore.h>
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1604 ],[
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1605 ],[
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1606 have_pthread_sem=yes
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1607 ])
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1608 AC_MSG_RESULT($have_pthread_sem)
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1609 fi
ae6e6b73333f Cleaned up the OpenBSD port, thanks to Peter Valchev
Sam Lantinga <slouken@lokigames.com>
parents: 86
diff changeset
1610
1438
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1611 # Restore the compiler flags and libraries
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1612 CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1613
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1614 # Basic thread creation functions
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1615 SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1616
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1617 # Semaphores
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1618 # We can fake these with mutexes and condition variables if necessary
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1619 if test x$have_pthread_sem = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1620 SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syssem.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1621 else
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1622 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1623 fi
399
cfcf6bf1640c Unified the thread detection code for UNIX platforms
Sam Lantinga <slouken@libsdl.org>
parents: 398
diff changeset
1624
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1625 # Mutexes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1626 # We can fake these with semaphores if necessary
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1627 SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
399
cfcf6bf1640c Unified the thread detection code for UNIX platforms
Sam Lantinga <slouken@libsdl.org>
parents: 398
diff changeset
1628
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1629 # Condition variables
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1630 # We can fake these with semaphores and mutexes if necessary
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1631 SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
185
34d316d5e744 Added support for the GNU Pth thread lib (thanks Mandin!)
Sam Lantinga <slouken@libsdl.org>
parents: 178
diff changeset
1632
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1633 have_threads=yes
814
5a417d2a8603 Use sigaction instead of signal to preserve handler flags (thanks Matthew!)
Sam Lantinga <slouken@libsdl.org>
parents: 807
diff changeset
1634 fi
5a417d2a8603 Use sigaction instead of signal to preserve handler flags (thanks Matthew!)
Sam Lantinga <slouken@libsdl.org>
parents: 807
diff changeset
1635 fi
5a417d2a8603 Use sigaction instead of signal to preserve handler flags (thanks Matthew!)
Sam Lantinga <slouken@libsdl.org>
parents: 807
diff changeset
1636 }
5a417d2a8603 Use sigaction instead of signal to preserve handler flags (thanks Matthew!)
Sam Lantinga <slouken@libsdl.org>
parents: 807
diff changeset
1637
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1638 dnl Determine whether the compiler can produce Windows executables
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1639 CheckWINDOWS()
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1640 {
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1641 AC_MSG_CHECKING(Windows compiler)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1642 have_win32_gcc=no
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1643 AC_TRY_COMPILE([
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1644 #include <windows.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1645 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1646 ],[
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1647 have_win32_gcc=yes
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1648 ])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1649 AC_MSG_RESULT($have_win32_gcc)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1650 if test x$have_win32_gcc != xyes; then
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1651 AC_MSG_ERROR([
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1652 *** Your compiler ($CC) does not produce Windows executables!
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1653 ])
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1654 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1655
3168
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1656 AC_MSG_CHECKING(Windows CE)
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1657 have_wince=no
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1658 AC_TRY_COMPILE([
4569
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
1659 #if !defined(_WIN32_WCE) && !defined(__MINGW32CE__)
3168
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1660 #error This is not Windows CE
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1661 #endif
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1662 ],[
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1663 ],[
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1664 have_wince=yes
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1665 ])
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1666 AC_MSG_RESULT($have_wince)
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1667
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1668 dnl See if the user wants to redirect standard output to files
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1669 AC_ARG_ENABLE(stdio-redirect,
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1670 AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Windows [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1671 , enable_stdio_redirect=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1672 if test x$enable_stdio_redirect != xyes; then
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1673 EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1674 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1675 }
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1676
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1677 dnl Find the DirectX includes and libraries
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1678 CheckDIRECTX()
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1679 {
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1680 AC_ARG_ENABLE(directx,
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
1681 AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[default=yes]]]),
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1682 , enable_directx=yes)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1683 if test x$enable_directx = xyes; then
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
1684 AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
3168
Sam Lantinga <slouken@libsdl.org>
parents: 3113
diff changeset
1685 AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1686 AC_CHECK_HEADER(dsound.h, have_dsound=yes)
2714
1d1be6137875 Merged last minute fixes from force feedback branch (r4031, r4033, r4034)
Sam Lantinga <slouken@libsdl.org>
parents: 2713
diff changeset
1687 AC_CHECK_HEADER(dinput.h, have_dinput=yes)
1187
19d8949b4584 To: sdl@libsdl.org
Ryan C. Gordon <icculus@icculus.org>
parents: 1175
diff changeset
1688 fi
19d8949b4584 To: sdl@libsdl.org
Ryan C. Gordon <icculus@icculus.org>
parents: 1175
diff changeset
1689 }
19d8949b4584 To: sdl@libsdl.org
Ryan C. Gordon <icculus@icculus.org>
parents: 1175
diff changeset
1690
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1691 dnl Check for the dlfcn.h interface for dynamically loading objects
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1692 CheckDLOPEN()
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1693 {
731
faaa676b20ef *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 724
diff changeset
1694 AC_ARG_ENABLE(sdl-dlopen,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1695 AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[default=yes]]]),
731
faaa676b20ef *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 724
diff changeset
1696 , enable_sdl_dlopen=yes)
faaa676b20ef *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 724
diff changeset
1697 if test x$enable_sdl_dlopen = xyes; then
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1698 AC_MSG_CHECKING(for dlopen)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1699 have_dlopen=no
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1700 AC_TRY_COMPILE([
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1701 #include <dlfcn.h>
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1702 ],[
1638
ebd1aedb1292 Miscellaneous Mac OS X fixes
Sam Lantinga <slouken@libsdl.org>
parents: 1637
diff changeset
1703 #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
ebd1aedb1292 Miscellaneous Mac OS X fixes
Sam Lantinga <slouken@libsdl.org>
parents: 1637
diff changeset
1704 #error Use dlcompat for Mac OS X 10.2 compatibility
ebd1aedb1292 Miscellaneous Mac OS X fixes
Sam Lantinga <slouken@libsdl.org>
parents: 1637
diff changeset
1705 #endif
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1706 ],[
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1707 have_dlopen=yes
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1708 ])
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1709 AC_MSG_RESULT($have_dlopen)
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1710
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1711 if test x$have_dlopen = xyes; then
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1712 AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1713 AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1714 AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1715 AC_DEFINE(SDL_LOADSO_DLOPEN)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1716 SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1717 have_loadso=yes
294
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1718 fi
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1719 fi
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1720 }
d2d48e10f370 Added a new header file: SDL_loadso.h
Sam Lantinga <slouken@libsdl.org>
parents: 292
diff changeset
1721
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1722 dnl Check for the usbhid(3) library on *BSD
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1723 CheckUSBHID()
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1724 {
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1725 if test x$enable_joystick = xyes; then
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1726 AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1727 if test x$have_libusbhid = xyes; then
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1728 AC_CHECK_HEADER(usbhid.h, [USB_CFLAGS="-DHAVE_USBHID_H"])
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1729 AC_CHECK_HEADER(libusbhid.h, [USB_CFLAGS="-DHAVE_LIBUSBHID_H"])
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1730 USB_LIBS="$USB_LIBS -lusbhid"
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1731 else
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1732 AC_CHECK_HEADER(usb.h, [USB_CFLAGS="-DHAVE_USB_H"])
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1733 AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1734 AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1735 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1736
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1737 save_CFLAGS="$CFLAGS"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1738 CFLAGS="$CFLAGS $USB_CFLAGS"
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1739
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1740 AC_MSG_CHECKING(for usbhid)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1741 have_usbhid=no
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1742 AC_TRY_COMPILE([
404
cbb346aca05d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 403
diff changeset
1743 #include <sys/types.h>
403
8d431937739d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 402
diff changeset
1744 #if defined(HAVE_USB_H)
8d431937739d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 402
diff changeset
1745 #include <usb.h>
8d431937739d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 402
diff changeset
1746 #endif
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1747 #ifdef __DragonFly__
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1748 # include <bus/usb/usb.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1749 # include <bus/usb/usbhid.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1750 #else
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1751 # include <dev/usb/usb.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1752 # include <dev/usb/usbhid.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1753 #endif
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1754 #if defined(HAVE_USBHID_H)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1755 #include <usbhid.h>
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1756 #elif defined(HAVE_LIBUSB_H)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1757 #include <libusb.h>
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1758 #elif defined(HAVE_LIBUSBHID_H)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1759 #include <libusbhid.h>
404
cbb346aca05d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 403
diff changeset
1760 #endif
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1761 ],[
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1762 struct report_desc *repdesc;
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1763 struct usb_ctl_report *repbuf;
402
7efee6e36f00 *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 401
diff changeset
1764 hid_kind_t hidkind;
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1765 ],[
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1766 have_usbhid=yes
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1767 ])
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1768 AC_MSG_RESULT($have_usbhid)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1769
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1770 if test x$have_usbhid = xyes; then
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1771 AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1772 have_usbhid_ucr_data=no
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1773 AC_TRY_COMPILE([
404
cbb346aca05d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 403
diff changeset
1774 #include <sys/types.h>
cbb346aca05d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 403
diff changeset
1775 #if defined(HAVE_USB_H)
cbb346aca05d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 403
diff changeset
1776 #include <usb.h>
cbb346aca05d *** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents: 403
diff changeset
1777 #endif
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1778 #ifdef __DragonFly__
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1779 # include <bus/usb/usb.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1780 # include <bus/usb/usbhid.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1781 #else
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1782 # include <dev/usb/usb.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1783 # include <dev/usb/usbhid.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1784 #endif
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1785 #if defined(HAVE_USBHID_H)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1786 #include <usbhid.h>
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1787 #elif defined(HAVE_LIBUSB_H)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1788 #include <libusb.h>
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1789 #elif defined(HAVE_LIBUSBHID_H)
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1790 #include <libusbhid.h>
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1791 #endif
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1792 ],[
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1793 struct usb_ctl_report buf;
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1794 if (buf.ucr_data) { }
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1795 ],[
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1796 have_usbhid_ucr_data=yes
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1797 ])
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1798 if test x$have_usbhid_ucr_data = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1799 USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1800 fi
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1801 AC_MSG_RESULT($have_usbhid_ucr_data)
407
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1802
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1803 AC_MSG_CHECKING(for new usbhid API)
407
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1804 have_usbhid_new=no
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1805 AC_TRY_COMPILE([
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1806 #include <sys/types.h>
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1807 #if defined(HAVE_USB_H)
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1808 #include <usb.h>
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1809 #endif
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1810 #ifdef __DragonFly__
2158
eff395617ed8 Merged part of NetBSD pkgsrc patch-aj:
Sam Lantinga <slouken@libsdl.org>
parents: 2148
diff changeset
1811 #include <bus/usb/usb.h>
eff395617ed8 Merged part of NetBSD pkgsrc patch-aj:
Sam Lantinga <slouken@libsdl.org>
parents: 2148
diff changeset
1812 #include <bus/usb/usbhid.h>
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1813 #else
407
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1814 #include <dev/usb/usb.h>
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1815 #include <dev/usb/usbhid.h>
3392
efc22582afc5 Only show the dynamic audio libraries if we'll be dynamically loading them
Sam Lantinga <slouken@libsdl.org>
parents: 3391
diff changeset
1816 #endif
407
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1817 #if defined(HAVE_USBHID_H)
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1818 #include <usbhid.h>
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1819 #elif defined(HAVE_LIBUSB_H)
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1820 #include <libusb.h>
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1821 #elif defined(HAVE_LIBUSBHID_H)
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1822 #include <libusbhid.h>
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1823 #endif
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1824 ],[
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1825 report_desc_t d;
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1826 hid_start_parse(d, 1, 1);
407
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1827 ],[
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1828 have_usbhid_new=yes
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1829 ])
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1830 if test x$have_usbhid_new = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1831 USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
407
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1832 fi
173909e17b7f API changes on OpenBSD and FreeBSD...
Sam Lantinga <slouken@libsdl.org>
parents: 404
diff changeset
1833 AC_MSG_RESULT($have_usbhid_new)
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1834
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1835 AC_MSG_CHECKING(for struct joystick in machine/joystick.h)
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1836 have_machine_joystick=no
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1837 AC_TRY_COMPILE([
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1838 #include <machine/joystick.h>
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1839 ],[
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1840 struct joystick t;
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1841 ],[
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1842 have_machine_joystick=yes
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1843 ])
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1844 if test x$have_machine_joystick = xyes; then
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1845 AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H)
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1846 fi
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1847 AC_MSG_RESULT($have_machine_joystick)
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1848
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1849 AC_DEFINE(SDL_JOYSTICK_USBHID)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1850 SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1851 EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1852 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1853 have_joystick=yes
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1854 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1855 CFLAGS="$save_CFLAGS"
381
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1856 fi
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1857 }
bc1401311390 Wilbern Cobb submitted a fix for building BSD joystick support that should work on all BSD flavors.
Sam Lantinga <slouken@libsdl.org>
parents: 378
diff changeset
1858
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1859 dnl Check for clock_gettime()
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1860 CheckClockGettime()
795
275708f2e838 Check for altivec assembly support before trying to use it. :)
Sam Lantinga <slouken@libsdl.org>
parents: 780
diff changeset
1861 {
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1862 AC_ARG_ENABLE(clock_gettime,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1863 AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [[default=no]]]),
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1864 , enable_clock_gettime=no)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1865 if test x$enable_clock_gettime = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1866 AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1867 if test x$have_clock_gettime = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1868 AC_DEFINE(HAVE_CLOCK_GETTIME)
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1869 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
3087
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 3085
diff changeset
1870 else
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 3085
diff changeset
1871 AC_CHECK_LIB(c, clock_gettime, have_clock_gettime=yes)
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 3085
diff changeset
1872 if test x$have_clock_gettime = xyes; then
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 3085
diff changeset
1873 AC_DEFINE(HAVE_CLOCK_GETTIME)
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 3085
diff changeset
1874 EXTRA_LDFLAGS="$EXTRA_LDFLAGS"
0b6f51c29267 Date: Wed, 4 Mar 2009 15:38:22 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 3085
diff changeset
1875 fi
1175
867f521591e5 Fixed Altivec support on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1174
diff changeset
1876 fi
795
275708f2e838 Check for altivec assembly support before trying to use it. :)
Sam Lantinga <slouken@libsdl.org>
parents: 780
diff changeset
1877 fi
275708f2e838 Check for altivec assembly support before trying to use it. :)
Sam Lantinga <slouken@libsdl.org>
parents: 780
diff changeset
1878 }
275708f2e838 Check for altivec assembly support before trying to use it. :)
Sam Lantinga <slouken@libsdl.org>
parents: 780
diff changeset
1879
1062
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1880 dnl Check for a valid linux/version.h
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1881 CheckLinuxVersion()
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1882 {
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1883 AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes)
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1884 if test x$have_linux_version_h = xyes; then
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
1885 EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_LINUX_VERSION_H"
1062
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1886 fi
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1887 }
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1888
1127
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1889 dnl Check if we want to use RPATH
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1890 CheckRPATH()
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1891 {
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1892 AC_ARG_ENABLE(rpath,
1637
9ba366b919c7 Date: Fri, 31 Mar 2006 18:28:55 -0500
Sam Lantinga <slouken@libsdl.org>
parents: 1632
diff changeset
1893 AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]),
1127
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1894 , enable_rpath=yes)
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1895 }
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1896
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
1897 dnl Set up the configuration based on the host platform!
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
1898 case "$host" in
2775
6d7baec32718 We'd never port SDL to Minix... would we? :)
Sam Lantinga <slouken@libsdl.org>
parents: 2763
diff changeset
1899 *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*|*-*-minix*)
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
1900 case "$host" in
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1901 *-*-linux*) ARCH=linux ;;
1820
133d55b02d51 Date: Thu, 11 May 2006 17:09:17 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1813
diff changeset
1902 *-*-uclinux*) ARCH=linux ;;
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1903 *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1904 *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1905 *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1906 *-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1907 *-*-bsdi*) ARCH=bsdi ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1908 *-*-freebsd*) ARCH=freebsd ;;
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1909 *-*-dragonfly*) ARCH=freebsd ;;
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1910 *-*-netbsd*) ARCH=netbsd ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1911 *-*-openbsd*) ARCH=openbsd ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1912 *-*-sysv5*) ARCH=sysv5 ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1913 *-*-solaris*) ARCH=solaris ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1914 *-*-hpux*) ARCH=hpux ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1915 *-*-irix*) ARCH=irix ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1916 *-*-aix*) ARCH=aix ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1917 *-*-osf*) ARCH=osf ;;
2775
6d7baec32718 We'd never port SDL to Minix... would we? :)
Sam Lantinga <slouken@libsdl.org>
parents: 2763
diff changeset
1918 *-*-minix*) ARCH=minix ;;
795
275708f2e838 Check for altivec assembly support before trying to use it. :)
Sam Lantinga <slouken@libsdl.org>
parents: 780
diff changeset
1919 esac
1573
2422ca15ba42 Added support for gcc4's -fvisibility=hidden option.
Ryan C. Gordon <icculus@icculus.org>
parents: 1571
diff changeset
1920 CheckVisibilityHidden
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
1921 CheckDummyVideo
68
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
1922 CheckDiskAudio
1532
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
1923 CheckDummyAudio
371
db0cc6034336 Added David Hedbor's Qtopia patches
Sam Lantinga <slouken@libsdl.org>
parents: 360
diff changeset
1924 CheckDLOPEN
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1925 CheckOSS
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1926 CheckDMEDIA
1438
1f4f09641645 Date: Sun, 26 Feb 2006 11:25:09 +0900
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
1927 CheckMME
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1928 CheckALSA
2271
60b4c52a7906 Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2264
diff changeset
1929 CheckPulseAudio
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1930 CheckARTSC
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1931 CheckESD
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1932 CheckNAS
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1933 CheckX11
167
cb384ef627f6 Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents: 166
diff changeset
1934 CheckDirectFB
2947
fec0db6c44b7 Date: Thu, 01 Jan 2009 21:32:12 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 2857
diff changeset
1935 CheckFusionSound
1191
2bd4cec0de63 Seperate glX from HAVE_OPENGL, for platforms that have both an X server and
Ryan C. Gordon <icculus@icculus.org>
parents: 1187
diff changeset
1936 CheckOpenGLX11
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1937 CheckInputEvents
1201
718d00094f82 Date: Sat, 10 Dec 2005 18:29:41 +0100
Ryan C. Gordon <icculus@icculus.org>
parents: 1200
diff changeset
1938 CheckTslib
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1939 CheckUSBHID
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1940 CheckPTHREAD
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1941 CheckClockGettime
1062
3e637850c02b Date: Tue, 22 Mar 2005 23:50:20 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 1047
diff changeset
1942 CheckLinuxVersion
1127
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
1943 CheckRPATH
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1944 # Set up files for the audio library
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1945 if test x$enable_audio = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1946 case $ARCH in
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1947 sysv5|solaris|hpux)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1948 AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1949 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1950 have_audio=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1951 ;;
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
1952 netbsd|openbsd)
1567
12b6d331d82a Good idea, renaming OpenBSD audio to BSD audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1566
diff changeset
1953 AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
12b6d331d82a Good idea, renaming OpenBSD audio to BSD audio.
Sam Lantinga <slouken@libsdl.org>
parents: 1566
diff changeset
1954 SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1955 have_audio=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1956 ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1957 aix)
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
1958 AC_DEFINE(SDL_AUDIO_DRIVER_PAUDIO)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1959 SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1960 have_audio=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1961 ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1962 esac
371
db0cc6034336 Added David Hedbor's Qtopia patches
Sam Lantinga <slouken@libsdl.org>
parents: 360
diff changeset
1963 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1964 # Set up files for the joystick library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1965 if test x$enable_joystick = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1966 case $ARCH in
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1967 linux)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1968 AC_DEFINE(SDL_JOYSTICK_LINUX)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1969 SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1970 have_joystick=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1971 ;;
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1972 esac
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1973 fi
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1974 # Set up files for the haptic library
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1975 if test x$enable_haptic = xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1976 if test x$use_input_events = xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1977 case $ARCH in
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1978 linux)
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1979 AC_DEFINE(SDL_HAPTIC_LINUX)
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1980 SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1981 have_haptic=yes
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1982 ;;
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1983 esac
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1984 fi
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
1985 fi
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1986 # Set up files for the power library
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1987 if test x$enable_power = xyes; then
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1988 case $ARCH in
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1989 linux)
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1990 AC_DEFINE(SDL_POWER_LINUX)
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1991 SOURCES="$SOURCES $srcdir/src/power/linux/*.c"
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1992 have_power=yes
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1993 ;;
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1994 esac
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
1995 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1996 # Set up files for the thread library
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1997 if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1998 AC_DEFINE(SDL_THREAD_SPROC)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
1999 SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2000 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2001 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2002 have_threads=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2003 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2004 # Set up files for the timer library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2005 if test x$enable_timers = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2006 AC_DEFINE(SDL_TIMER_UNIX)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2007 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2008 have_timers=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2009 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2010 ;;
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2011 *-wince* | *-mingw32ce)
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2012 ARCH=win32
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2013 CheckDummyVideo
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2014 CheckDiskAudio
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2015 CheckDummyAudio
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2016 CheckWINDOWS
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2017 if test x$enable_video = xyes; then
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2018 AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS)
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2019 SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2020 have_video=yes
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2021 AC_ARG_ENABLE(render-d3d,
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2022 AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2023 , enable_render_d3d=yes)
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2024 enable_render_d3d=no
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2025 if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2026 AC_DEFINE(SDL_VIDEO_RENDER_D3D)
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2027 fi
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2028 fi
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2029 # Set up files for the audio library
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2030 if test x$enable_audio = xyes; then
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2031 AC_DEFINE(SDL_AUDIO_DRIVER_WINWAVEOUT)
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2032 SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2033 if test x$have_dsound = xyes; then
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2034 AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2035 SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2036 fi
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2037 have_audio=yes
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2038 fi
4569
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2039 # Set up dummy files for the joystick for now
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2040 if test x$enable_joystick = xyes; then
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2041 AC_DEFINE(SDL_JOYSTICK_DUMMY)
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2042 SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2043 have_joystick=yes
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2044 fi
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2045 # Set up files for the thread library
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2046 if test x$enable_threads = xyes; then
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2047 AC_DEFINE(SDL_THREAD_WINDOWS)
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2048 SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_sysmutex.c"
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2049 SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_syssem.c"
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2050 SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_systhread.c"
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2051 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2052 have_threads=yes
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2053 fi
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2054 # Set up files for the timer library
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2055 if test x$enable_timers = xyes; then
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2056 AC_DEFINE(SDL_TIMER_WINCE)
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2057 SOURCES="$SOURCES $srcdir/src/timer/wince/*.c"
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2058 have_timers=yes
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2059 fi
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2060 # Set up files for the shared object loading library
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2061 if test x$enable_loadso = xyes; then
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2062 AC_DEFINE(SDL_LOADSO_WINDOWS)
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2063 SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2064 have_loadso=yes
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2065 fi
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2066 # Set up the system libraries we need
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2067 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer"
4569
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2068
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2069 # mingw32ce library
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2070 case "$host" in
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2071 *-mingw32ce)
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2072 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmingwex"
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2073 ;;
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2074 *)
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2075 ;;
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2076 esac
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2077
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2078 # The Windows platform requires special setup
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2079 SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
4569
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2080 EXTRA_CFLAGS="$EXTRA_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
e1664f94f026 Andrey A.
Sam Lantinga <slouken@libsdl.org>
parents: 4476
diff changeset
2081 EXTRA_LDFLAGS="-lSDLmain $EXTRA_LDFLAGS"
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2082 ;;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2083 *-*-cygwin* | *-*-mingw32*)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2084 ARCH=win32
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
2085 if test "$build" != "$host"; then # cross-compiling
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2086 # Default cross-compile location
4476
890fe3b85890 Make sure SDL gets installed to the correct prefix for the new cross-compiler tools.
Sam Lantinga <slouken@libsdl.org>
parents: 4454
diff changeset
2087 ac_default_prefix=/usr/local/cross-tools/$host
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2088 else
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2089 # Look for the location of the tools and install there
750
ce48d14ca5bf Date: Mon, 24 Nov 2003 20:11:31 +0000
Sam Lantinga <slouken@libsdl.org>
parents: 742
diff changeset
2090 if test "$BUILD_PREFIX" != ""; then
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
2091 ac_default_prefix=$BUILD_PREFIX
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
2092 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2093 fi
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
2094 CheckDummyVideo
68
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
2095 CheckDiskAudio
1532
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
2096 CheckDummyAudio
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2097 CheckWINDOWS
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2098 CheckWINDOWSGL
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2099 CheckDIRECTX
5095
817064595222 Fixed cross-compiling for Windows
Sam Lantinga <slouken@libsdl.org>
parents: 5071
diff changeset
2100
817064595222 Fixed cross-compiling for Windows
Sam Lantinga <slouken@libsdl.org>
parents: 5071
diff changeset
2101 # Set up the core platform files
817064595222 Fixed cross-compiling for Windows
Sam Lantinga <slouken@libsdl.org>
parents: 5071
diff changeset
2102 SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
817064595222 Fixed cross-compiling for Windows
Sam Lantinga <slouken@libsdl.org>
parents: 5071
diff changeset
2103
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2104 # Set up files for the video library
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2105 if test x$enable_video = xyes; then
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2106 AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS)
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2107 SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2108 have_video=yes
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2109 AC_ARG_ENABLE(render-d3d,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2110 AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2111 , enable_render_d3d=yes)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2112 if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2113 AC_DEFINE(SDL_VIDEO_RENDER_D3D)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2114 fi
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2115 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2116 # Set up files for the audio library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2117 if test x$enable_audio = xyes; then
2070
dbfa1ebd73b0 Fixed building of Windows waveout audio.
Ryan C. Gordon <icculus@icculus.org>
parents: 2066
diff changeset
2118 AC_DEFINE(SDL_AUDIO_DRIVER_WINWAVEOUT)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2119 SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2120 if test x$have_dsound = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2121 AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2122 SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2123 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2124 have_audio=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2125 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2126 # Set up files for the joystick library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2127 if test x$enable_joystick = xyes; then
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2128 if test x$have_dinput = xyes; then
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2129 AC_DEFINE(SDL_JOYSTICK_DINPUT)
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2130 SOURCES="$SOURCES $srcdir/src/joystick/windows/SDL_dxjoystick.c"
4894
ac19d74e2a47 Fixed compiling with mingw32/64
Sam Lantinga <slouken@libsdl.org>
parents: 4873
diff changeset
2131 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2132 else
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2133 AC_DEFINE(SDL_JOYSTICK_WINMM)
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2134 SOURCES="$SOURCES $srcdir/src/joystick/windows/SDL_mmjoystick.c"
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1891
diff changeset
2135 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2136 have_joystick=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2137 fi
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2138 if test x$enable_haptic = xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2139 if test x$have_dinput = xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2140 AC_DEFINE(SDL_HAPTIC_DINPUT)
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2141 SOURCES="$SOURCES $srcdir/src/haptic/windows/SDL_syshaptic.c"
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2142 have_haptic=yes
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2143 fi
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2144 fi
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2145 if test x$enable_power = xyes; then
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2146 AC_DEFINE(SDL_POWER_WINDOWS)
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2147 SOURCES="$SOURCES $srcdir/src/power/windows/SDL_syspower.c"
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2148 have_power=yes
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2149 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2150 # Set up files for the thread library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2151 if test x$enable_threads = xyes; then
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2152 AC_DEFINE(SDL_THREAD_WINDOWS)
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2153 SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_sysmutex.c"
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2154 SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_syssem.c"
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2155 SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_systhread.c"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2156 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2157 have_threads=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2158 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2159 # Set up files for the timer library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2160 if test x$enable_timers = xyes; then
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2161 AC_DEFINE(SDL_TIMER_WINDOWS)
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2162 SOURCES="$SOURCES $srcdir/src/timer/windows/*.c"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2163 have_timers=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2164 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2165 # Set up files for the shared object loading library
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2166 if test x$enable_loadso = xyes; then
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2167 AC_DEFINE(SDL_LOADSO_WINDOWS)
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2168 SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2169 have_loadso=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2170 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2171 # Set up the system libraries we need
3082
1c85c44557de Removed unicows dependency, at least for now...
Sam Lantinga <slouken@libsdl.org>
parents: 3049
diff changeset
2172 # SDL 1.3 is unicode, and unicows emulates this on Windows 98/ME
1c85c44557de Removed unicows dependency, at least for now...
Sam Lantinga <slouken@libsdl.org>
parents: 3049
diff changeset
2173 # You can get this here: http://libunicows.sourceforge.net/
1c85c44557de Removed unicows dependency, at least for now...
Sam Lantinga <slouken@libsdl.org>
parents: 3049
diff changeset
2174 #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
4894
ac19d74e2a47 Fixed compiling with mingw32/64
Sam Lantinga <slouken@libsdl.org>
parents: 4873
diff changeset
2175 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid"
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2176 # The Windows platform requires special setup
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2177 VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 5050
diff changeset
2178 SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2179 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1363
dc623bb58c9a Fixed building with cygwin
Sam Lantinga <slouken@libsdl.org>
parents: 1361
diff changeset
2180 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2181 ;;
3292
245a7d79577c Fixed bug #615
Sam Lantinga <slouken@libsdl.org>
parents: 3288
diff changeset
2182 *-*-beos* | *-*-haiku*)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2183 ARCH=beos
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2184 ac_default_prefix=/boot/develop/tools/gnupro
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
2185 CheckDummyVideo
68
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
2186 CheckDiskAudio
1532
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
2187 CheckDummyAudio
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2188 CheckBWINDOW
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2189 CheckBeGL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2190 # Set up files for the audio library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2191 if test x$enable_audio = xyes; then
2049
5f6550e5184f Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
Ryan C. Gordon <icculus@icculus.org>
parents: 2040
diff changeset
2192 AC_DEFINE(SDL_AUDIO_DRIVER_BEOSAUDIO)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2193 SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2194 have_audio=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2195 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2196 # Set up files for the joystick library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2197 if test x$enable_joystick = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2198 AC_DEFINE(SDL_JOYSTICK_BEOS)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2199 SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2200 have_joystick=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2201 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2202 # Set up files for the thread library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2203 if test x$enable_threads = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2204 AC_DEFINE(SDL_THREAD_BEOS)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2205 SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2206 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2207 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2208 have_threads=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2209 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2210 # Set up files for the timer library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2211 if test x$enable_timers = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2212 AC_DEFINE(SDL_TIMER_BEOS)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2213 SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2214 have_timers=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2215 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2216 # Set up files for the shared object loading library
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2217 if test x$enable_loadso = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2218 AC_DEFINE(SDL_LOADSO_BEOS)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2219 SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2220 have_loadso=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2221 fi
3173
510e3f36c04a BeOS support for power subsystem.
Ryan C. Gordon <icculus@icculus.org>
parents: 3170
diff changeset
2222 # Set up files for the system power library
510e3f36c04a BeOS support for power subsystem.
Ryan C. Gordon <icculus@icculus.org>
parents: 3170
diff changeset
2223 if test x$enable_power = xyes; then
510e3f36c04a BeOS support for power subsystem.
Ryan C. Gordon <icculus@icculus.org>
parents: 3170
diff changeset
2224 AC_DEFINE(SDL_POWER_BEOS)
510e3f36c04a BeOS support for power subsystem.
Ryan C. Gordon <icculus@icculus.org>
parents: 3170
diff changeset
2225 SOURCES="$SOURCES $srcdir/src/power/beos/*.c"
510e3f36c04a BeOS support for power subsystem.
Ryan C. Gordon <icculus@icculus.org>
parents: 3170
diff changeset
2226 have_power=yes
510e3f36c04a BeOS support for power subsystem.
Ryan C. Gordon <icculus@icculus.org>
parents: 3170
diff changeset
2227 fi
1367
e440d5c488c1 Fixes for BeOS and Solaris builds
Sam Lantinga <slouken@libsdl.org>
parents: 1366
diff changeset
2228 # The BeOS platform requires special setup.
e440d5c488c1 Fixes for BeOS and Solaris builds
Sam Lantinga <slouken@libsdl.org>
parents: 1366
diff changeset
2229 SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
2230 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2231 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2232 *-*-darwin* )
1133
609c060fd2a2 The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
Ryan C. Gordon <icculus@icculus.org>
parents: 1127
diff changeset
2233 # This could be either full "Mac OS X", or plain "Darwin" which is
158
4382c38dfbee Date: Tue, 21 Aug 2001 03:50:01 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 153
diff changeset
2234 # just the OS X kernel sans upper layers like Carbon and Cocoa.
1133
609c060fd2a2 The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
Ryan C. Gordon <icculus@icculus.org>
parents: 1127
diff changeset
2235 # Next line is broken, and a few files below require Mac OS X (full)
158
4382c38dfbee Date: Tue, 21 Aug 2001 03:50:01 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 153
diff changeset
2236 ARCH=macosx
1624
8208ae96bb2d Fixed bug #192
Sam Lantinga <slouken@libsdl.org>
parents: 1621
diff changeset
2237
1628
10b4827452a8 Fixed bug #185
Sam Lantinga <slouken@libsdl.org>
parents: 1625
diff changeset
2238 # Mac OS X builds with both the Carbon and OSX APIs at the moment
1638
ebd1aedb1292 Miscellaneous Mac OS X fixes
Sam Lantinga <slouken@libsdl.org>
parents: 1637
diff changeset
2239 EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
ebd1aedb1292 Miscellaneous Mac OS X fixes
Sam Lantinga <slouken@libsdl.org>
parents: 1637
diff changeset
2240 EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
1628
10b4827452a8 Fixed bug #185
Sam Lantinga <slouken@libsdl.org>
parents: 1625
diff changeset
2241
1742
af4352da64d8 Fixed bug #206, fatbuild.sh works flawlessly on Intel Macs
Sam Lantinga <slouken@libsdl.org>
parents: 1648
diff changeset
2242 CheckVisibilityHidden
1
cf2af46e9e2a Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents: 0
diff changeset
2243 CheckDummyVideo
68
ac6645260d31 Added an audio driver that writes to disk (thanks Ryan!)
Sam Lantinga <slouken@lokigames.com>
parents: 53
diff changeset
2244 CheckDiskAudio
1532
30f189cdd82b Implemented dummy audio driver.
Ryan C. Gordon <icculus@icculus.org>
parents: 1521
diff changeset
2245 CheckDummyAudio
1638
ebd1aedb1292 Miscellaneous Mac OS X fixes
Sam Lantinga <slouken@libsdl.org>
parents: 1637
diff changeset
2246 CheckDLOPEN
1889
5225a9cc25a2 Almost added Mac OS X nasm support
Sam Lantinga <slouken@libsdl.org>
parents: 1886
diff changeset
2247
1648
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2248 # Set up files for the shared object loading library
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2249 # (this needs to be done before the dynamic X11 check)
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2250 if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2251 AC_DEFINE(SDL_LOADSO_DLCOMPAT)
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2252 SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2253 have_loadso=yes
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2254 fi
9f59d4c5aaea Mac OS X fat build works! :)
Sam Lantinga <slouken@libsdl.org>
parents: 1640
diff changeset
2255
1133
609c060fd2a2 The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
Ryan C. Gordon <icculus@icculus.org>
parents: 1127
diff changeset
2256 CheckCOCOA
1174
8c43aceeed81 Enable dynamic X11 on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 1173
diff changeset
2257 CheckX11
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2258 CheckMacGL
1191
2bd4cec0de63 Seperate glX from HAVE_OPENGL, for platforms that have both an X server and
Ryan C. Gordon <icculus@icculus.org>
parents: 1187
diff changeset
2259 CheckOpenGLX11
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2260 CheckPTHREAD
1445
0133f0ca5de7 Need this or things might misbuild on G3 Mac OS, I think.
Ryan C. Gordon <icculus@icculus.org>
parents: 1438
diff changeset
2261
2238
93ea84f77d83 Shark rules!
Sam Lantinga <slouken@libsdl.org>
parents: 2206
diff changeset
2262 # Good optimization on Mac OS X, yes...
93ea84f77d83 Shark rules!
Sam Lantinga <slouken@libsdl.org>
parents: 2206
diff changeset
2263 EXTRA_CFLAGS="$EXTRA_CFLAGS -falign-loops=16"
93ea84f77d83 Shark rules!
Sam Lantinga <slouken@libsdl.org>
parents: 2206
diff changeset
2264
1445
0133f0ca5de7 Need this or things might misbuild on G3 Mac OS, I think.
Ryan C. Gordon <icculus@icculus.org>
parents: 1438
diff changeset
2265 # Need this or things might misbuild on a G3.
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
2266 EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
1445
0133f0ca5de7 Need this or things might misbuild on G3 Mac OS, I think.
Ryan C. Gordon <icculus@icculus.org>
parents: 1438
diff changeset
2267
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2268 # Set up files for the audio library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2269 if test x$enable_audio = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2270 AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2271 SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2272 have_audio=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2273 fi
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2274 # Set up files for the joystick library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2275 if test x$enable_joystick = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2276 AC_DEFINE(SDL_JOYSTICK_IOKIT)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2277 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2278 have_joystick=yes
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2279 fi
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2280 # Set up files for the haptic library
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2281 if test x$enable_haptic = xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2282 AC_DEFINE(SDL_HAPTIC_IOKIT)
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2283 SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2284 have_haptic=yes
3623
9a73fecd9181 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
Ryan C. Gordon <icculus@icculus.org>
parents: 3622
diff changeset
2285 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2286 fi
3170
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2287 # Set up files for the power library
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2288 if test x$enable_power = xyes; then
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2289 AC_DEFINE(SDL_POWER_MACOSX)
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2290 SOURCES="$SOURCES $srcdir/src/power/macosx/*.c"
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2291 have_power=yes
b7a48f533966 Initial work on power subsystem for SDL 1.3.
Ryan C. Gordon <icculus@icculus.org>
parents: 3168
diff changeset
2292 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2293 # Set up files for the timer library
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2294 if test x$enable_timers = xyes; then
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2295 AC_DEFINE(SDL_TIMER_UNIX)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2296 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2297 have_timers=yes
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2298 fi
4454
be387681d876 Fixed Eric's changes to allow building from the command line.
Sam Lantinga <slouken@libsdl.org>
parents: 4428
diff changeset
2299 # Set up additional files for the file library
be387681d876 Fixed Eric's changes to allow building from the command line.
Sam Lantinga <slouken@libsdl.org>
parents: 4428
diff changeset
2300 if test x$enable_file = xyes; then
be387681d876 Fixed Eric's changes to allow building from the command line.
Sam Lantinga <slouken@libsdl.org>
parents: 4428
diff changeset
2301 SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
be387681d876 Fixed Eric's changes to allow building from the command line.
Sam Lantinga <slouken@libsdl.org>
parents: 4428
diff changeset
2302 fi
1621
f12379c41042 Fixes bug #195:
Sam Lantinga <slouken@libsdl.org>
parents: 1611
diff changeset
2303 # The Mac OS X platform requires special setup.
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
2304 EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
3049
ed67e93944b1 More Mac OS X 10.3.9 fixes
Sam Lantinga <slouken@libsdl.org>
parents: 3032
diff changeset
2305 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
3623
9a73fecd9181 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
Ryan C. Gordon <icculus@icculus.org>
parents: 3622
diff changeset
2306 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
9a73fecd9181 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
Ryan C. Gordon <icculus@icculus.org>
parents: 3622
diff changeset
2307 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
9a73fecd9181 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
Ryan C. Gordon <icculus@icculus.org>
parents: 3622
diff changeset
2308 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
3621
2fbe6995b2a2 Made the comment more readable
Sam Lantinga <slouken@libsdl.org>
parents: 3619
diff changeset
2309 # If audio is used, add the AudioUnit framework
3243
5db962a9a991 CD-ROM support is so passé :)
Sam Lantinga <slouken@libsdl.org>
parents: 3242
diff changeset
2310 if test x$enable_audio = xyes; then
3623
9a73fecd9181 Reverted r5460 ... this was merged from 1.2, but was later reverted there.
Ryan C. Gordon <icculus@icculus.org>
parents: 3622
diff changeset
2311 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2312 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2313 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2314 *)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2315 AC_MSG_ERROR([
1550
31c2b8e4885e Fixed bug #166
Sam Lantinga <slouken@libsdl.org>
parents: 1548
diff changeset
2316 *** Unsupported host: Please add to configure.in
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2317 ])
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2318 ;;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2319 esac
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2320
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2321 # Verify that we have all the platform specific files we need
2066
8f8066b84b3e Use dummy joystick backend if subsystem is enabled but no better driver was
Ryan C. Gordon <icculus@icculus.org>
parents: 2049
diff changeset
2322
3104
86ea6c073d87 Fixed undefined references to joystick code
Sam Lantinga <slouken@libsdl.org>
parents: 3099
diff changeset
2323 if test x$have_joystick != xyes; then
86ea6c073d87 Fixed undefined references to joystick code
Sam Lantinga <slouken@libsdl.org>
parents: 3099
diff changeset
2324 if test x$enable_joystick = xyes; then
3097
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2325 AC_DEFINE(SDL_JOYSTICK_DISABLED)
0d12e8f1de3c Date: Thu, 05 Feb 2009 18:07:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents: 3087
diff changeset
2326 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2327 SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2328 fi
2713
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2329 if test x$have_haptic != xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2330 if test x$enable_haptic = xyes; then
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2331 AC_DEFINE(SDL_HAPTIC_DISABLED)
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2332 fi
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2333 SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
0906692aa6a4 Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents: 2710
diff changeset
2334 fi
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2335 if test x$have_threads != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2336 if test x$enable_threads = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2337 AC_DEFINE(SDL_THREADS_DISABLED)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2338 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2339 SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2340 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2341 if test x$have_timers != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2342 if test x$enable_timers = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2343 AC_DEFINE(SDL_TIMERS_DISABLED)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2344 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2345 SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2346 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2347 if test x$have_loadso != xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2348 if test x$enable_loadso = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2349 AC_DEFINE(SDL_LOADSO_DISABLED)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2350 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2351 SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2352 fi
1397
b189a73aa335 Added rules to build libSDLmain.a
Sam Lantinga <slouken@libsdl.org>
parents: 1396
diff changeset
2353 if test x$SDLMAIN_SOURCES = x; then
b189a73aa335 Added rules to build libSDLmain.a
Sam Lantinga <slouken@libsdl.org>
parents: 1396
diff changeset
2354 SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
b189a73aa335 Added rules to build libSDLmain.a
Sam Lantinga <slouken@libsdl.org>
parents: 1396
diff changeset
2355 fi
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2356
3334
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2357 OBJECTS=`echo $SOURCES`
5114
39772ccf7ddd This patch fixes the issue of configure generating broken Makefile
Sam Lantinga <slouken@libsdl.org>
parents: 5105
diff changeset
2358 DEPENDS=`echo $SOURCES | tr ' ' '\n'`
3334
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2359 for EXT in asm cc m c S; do
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2360 OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
5114
39772ccf7ddd This patch fixes the issue of configure generating broken Makefile
Sam Lantinga <slouken@libsdl.org>
parents: 5105
diff changeset
2361 DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
3415
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2362 \\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2363 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
3334
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2364 done
5066
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2365 DEPENDS=`echo "$DEPENDS" | sed 's,\\$,\\\\$,g'`
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2366
3334
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2367 VERSION_OBJECTS=`echo $VERSION_SOURCES`
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2368 VERSION_DEPENDS=`echo $VERSION_SOURCES`
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2369 VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
3415
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2370 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2371 \\$(objects)/\\2.o: \\1/\\2.rc\\\\
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2372 \\$(WINDRES) \\$< \\$@,g"`
5066
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2373 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\\$,\\\\$,g'`
3334
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2374
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2375 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2376 SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2377 SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
3415
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2378 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2379 \\$(objects)/\\2.o: \\1/\\2.c\\\\
1756b9569141 Adam Strzelecki to SDL
Sam Lantinga <slouken@libsdl.org>
parents: 3405
diff changeset
2380 \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
5066
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2381 SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\\$,\\\\$,g'`
1397
b189a73aa335 Added rules to build libSDLmain.a
Sam Lantinga <slouken@libsdl.org>
parents: 1396
diff changeset
2382
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2383 # Set runtime shared library paths as needed
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2384
1127
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
2385 if test "x$enable_rpath" = "xyes"; then
1565
57431b199aed Fixed bug #52
Sam Lantinga <slouken@libsdl.org>
parents: 1556
diff changeset
2386 if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then
2040
be848c07f0b9 Fixed bug #321
Sam Lantinga <slouken@libsdl.org>
parents: 2021
diff changeset
2387 SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
1127
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
2388 fi
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
2389 if test $ARCH = solaris; then
2040
be848c07f0b9 Fixed bug #321
Sam Lantinga <slouken@libsdl.org>
parents: 2021
diff changeset
2390 SDL_RLD_FLAGS="-R\${libdir}"
1127
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
2391 fi
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
2392 else
fb8818ee9112 Date: Mon, 22 Aug 2005 04:22:46 -0400
Sam Lantinga <slouken@libsdl.org>
parents: 1062
diff changeset
2393 SDL_RLD_FLAGS=""
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2394 fi
387
469d5c0da01d Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 382
diff changeset
2395
469d5c0da01d Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 382
diff changeset
2396 case "$ARCH" in
469d5c0da01d Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 382
diff changeset
2397 macosx)
807
674df5617bba Fixed static linking on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 802
diff changeset
2398 # Evil hack to allow static linking on Mac OS X
2040
be848c07f0b9 Fixed bug #321
Sam Lantinga <slouken@libsdl.org>
parents: 2021
diff changeset
2399 SDL_STATIC_LIBS="\${libdir}/libSDL.a $EXTRA_LDFLAGS"
807
674df5617bba Fixed static linking on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 802
diff changeset
2400 ;;
674df5617bba Fixed static linking on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 802
diff changeset
2401 *)
2293
824f6dee6648 Merged fix for bug #531 from SDL 1.2 revision 3511
Sam Lantinga <slouken@libsdl.org>
parents: 2292
diff changeset
2402 SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
807
674df5617bba Fixed static linking on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 802
diff changeset
2403 ;;
674df5617bba Fixed static linking on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 802
diff changeset
2404 esac
674df5617bba Fixed static linking on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 802
diff changeset
2405
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2406 dnl Expand the cflags and libraries needed by apps using SDL
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2407 AC_SUBST(SDL_CFLAGS)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2408 AC_SUBST(SDL_LIBS)
807
674df5617bba Fixed static linking on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents: 802
diff changeset
2409 AC_SUBST(SDL_STATIC_LIBS)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2410 AC_SUBST(SDL_RLD_FLAGS)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2411 if test x$enable_shared = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2412 ENABLE_SHARED_TRUE=
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2413 ENABLE_SHARED_FALSE="#"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2414 else
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2415 ENABLE_SHARED_TRUE="#"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2416 ENABLE_SHARED_FALSE=
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2417 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2418 if test x$enable_static = xyes; then
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2419 ENABLE_STATIC_TRUE=
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2420 ENABLE_STATIC_FALSE="#"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2421 else
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2422 ENABLE_STATIC_TRUE="#"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2423 ENABLE_STATIC_FALSE=
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2424 fi
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2425 AC_SUBST(ENABLE_SHARED_TRUE)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2426 AC_SUBST(ENABLE_SHARED_FALSE)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2427 AC_SUBST(ENABLE_STATIC_TRUE)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2428 AC_SUBST(ENABLE_STATIC_FALSE)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2429
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2430 dnl Expand the sources and objects needed to build the library
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2431 AC_SUBST(ac_aux_dir)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2432 AC_SUBST(INCLUDE)
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2433 AC_SUBST(OBJECTS)
3334
61ea9005fddf Use gcc's built-in dependency generation, thanks to Adam Strzelecki
Sam Lantinga <slouken@libsdl.org>
parents: 3332
diff changeset
2434 AC_SUBST(VERSION_OBJECTS)
1397
b189a73aa335 Added rules to build libSDLmain.a
Sam Lantinga <slouken@libsdl.org>
parents: 1396
diff changeset
2435 AC_SUBST(SDLMAIN_OBJECTS)
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2436 AC_SUBST(BUILD_CFLAGS)
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
2437 AC_SUBST(EXTRA_CFLAGS)
1393
cd3362657144 Pass LDFLAGS to the build system
Sam Lantinga <slouken@libsdl.org>
parents: 1389
diff changeset
2438 AC_SUBST(BUILD_LDFLAGS)
1521
9b9212e4810c CFLAGS are separate from EXTRA_CFLAGS
Sam Lantinga <slouken@libsdl.org>
parents: 1520
diff changeset
2439 AC_SUBST(EXTRA_LDFLAGS)
2204
9f64d06fa168 Added support for building version.rc in Windows build.
Sam Lantinga <slouken@libsdl.org>
parents: 2185
diff changeset
2440 AC_SUBST(WINDRES)
158
4382c38dfbee Date: Tue, 21 Aug 2001 03:50:01 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 153
diff changeset
2441
5066
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2442 AC_CONFIG_FILES([
3083
0bc41e0361d3 Date: Mon, 2 Mar 2009 16:27:42 +0200
Sam Lantinga <slouken@libsdl.org>
parents: 3082
diff changeset
2443 Makefile sdl-config SDL.spec sdl.pc
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1354
diff changeset
2444 ])
5066
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2445 AC_CONFIG_COMMANDS([default],
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2446 [cat >>Makefile <<__EOF__
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2447
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2448 # Build rules for objects
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2449 -include \$(OBJECTS:.lo=.d)
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2450 $DEPENDS
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2451 $VERSION_DEPENDS
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2452 $SDLMAIN_DEPENDS
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2453 __EOF__
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2454 ], [
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2455 DEPENDS="$DEPENDS"
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2456 VERSION_DEPENDS="$VERSION_DEPENDS"
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2457 SDLMAIN_DEPENDS="$SDLMAIN_DEPENDS"
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2458 ])
3afb71c202b2 Fixed bug #945
Sam Lantinga <slouken@libsdl.org>
parents: 5062
diff changeset
2459 AC_OUTPUT