3193
3190
if test "$enable_sdl" = "yes" ; then
3196
# Check whether --with-sdl-prefix or --without-sdl-prefix was given.
3197
if test "${with_sdl_prefix+set}" = set; then
3198
withval="$with_sdl_prefix"
3199
sdl_prefix="$withval"
3204
# Check whether --with-sdl-exec-prefix or --without-sdl-exec-prefix was given.
3205
if test "${with_sdl_exec_prefix+set}" = set; then
3206
withval="$with_sdl_exec_prefix"
3207
sdl_exec_prefix="$withval"
3211
# Check whether --enable-sdltest or --disable-sdltest was given.
3212
if test "${enable_sdltest+set}" = set; then
3213
enableval="$enable_sdltest"
3219
if test x$sdl_exec_prefix != x ; then
3220
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
3221
if test x${SDL_CONFIG+set} != xset ; then
3222
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
3225
if test x$sdl_prefix != x ; then
3226
sdl_args="$sdl_args --prefix=$sdl_prefix"
3227
if test x${SDL_CONFIG+set} != xset ; then
3228
SDL_CONFIG=$sdl_prefix/bin/sdl-config
3233
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
3234
# Extract the first word of "sdl-config", so it can be a program name with args.
3235
set dummy sdl-config; ac_word=$2
3236
echo "$as_me:$LINENO: checking for $ac_word" >&5
3237
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3238
if test "${ac_cv_path_SDL_CONFIG+set}" = set; then
3192
# AM_PATH_SDL($SDL_VERSION,
3193
# AC_DEFINE([HAVE_SDL], [], [Do we have the SDL library]),
3194
# AC_MSG_WARN([*** SDL version $SDL_VERSION not found. Sound will be disabled])
3196
echo "$as_me:$LINENO: checking for Mix_OpenAudio in -lSDL_mixer" >&5
3197
echo $ECHO_N "checking for Mix_OpenAudio in -lSDL_mixer... $ECHO_C" >&6
3198
if test "${ac_cv_lib_SDL_mixer_Mix_OpenAudio+set}" = set; then
3239
3199
echo $ECHO_N "(cached) $ECHO_C" >&6
3243
ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
3246
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3250
test -z "$as_dir" && as_dir=.
3251
for ac_exec_ext in '' $ac_executable_extensions; do
3252
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3253
ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3254
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3260
test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
3264
SDL_CONFIG=$ac_cv_path_SDL_CONFIG
3266
if test -n "$SDL_CONFIG"; then
3267
echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5
3268
echo "${ECHO_T}$SDL_CONFIG" >&6
3270
echo "$as_me:$LINENO: result: no" >&5
3271
echo "${ECHO_T}no" >&6
3274
min_sdl_version=$SDL_VERSION
3275
echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5
3276
echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6
3278
if test "$SDL_CONFIG" = "no" ; then
3281
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
3282
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
3284
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
3285
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
3286
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
3287
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
3288
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
3289
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
3290
if test "x$enable_sdltest" = "xyes" ; then
3291
ac_save_CFLAGS="$CFLAGS"
3292
ac_save_CXXFLAGS="$CXXFLAGS"
3293
ac_save_LIBS="$LIBS"
3294
CFLAGS="$CFLAGS $SDL_CFLAGS"
3295
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
3296
LIBS="$LIBS $SDL_LIBS"
3298
if test "$cross_compiling" = yes; then
3299
echo $ac_n "cross compiling; assumed OK... $ac_c"
3301
cat >conftest.$ac_ext <<_ACEOF
3201
ac_check_lib_save_LIBS=$LIBS
3202
LIBS="-lSDL_mixer $LIBS"
3203
cat >conftest.$ac_ext <<_ACEOF
3302
3204
#line $LINENO "configure"
3303
3205
/* confdefs.h. */
3306
3208
cat >>conftest.$ac_ext <<_ACEOF
3307
3209
/* end confdefs.h. */
3315
my_strdup (char *str)
3321
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
3322
strcpy (new_str, str);
3330
int main (int argc, char *argv[])
3332
int major, minor, micro;
3335
/* This hangs on some systems (?)
3336
system ("touch conf.sdltest");
3338
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
3340
/* HP/UX 9 (%@#!) writes to sscanf strings */
3341
tmp_version = my_strdup("$min_sdl_version");
3342
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
3343
printf("%s, bad version string\n", "$min_sdl_version");
3347
if (($sdl_major_version > major) ||
3348
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
3349
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
3355
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
3356
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
3357
printf("*** best to upgrade to the required version.\n");
3358
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
3359
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
3360
printf("*** config.cache before re-running configure\n");
3211
/* Override any gcc2 internal prototype to avoid an error. */
3215
/* We use char because int might match the return type of a gcc2
3216
builtin and then its argument prototype would still apply. */
3217
char Mix_OpenAudio ();
3367
rm -f conftest$ac_exeext
3226
rm -f conftest.$ac_objext conftest$ac_exeext
3368
3227
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3369
3228
(eval $ac_link) 2>&5
3371
3230
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3372
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3231
(exit $ac_status); } &&
3232
{ ac_try='test -s conftest$ac_exeext'
3373
3233
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3374
3234
(eval $ac_try) 2>&5
3376
3236
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3377
3237
(exit $ac_status); }; }; then
3238
ac_cv_lib_SDL_mixer_Mix_OpenAudio=yes
3380
echo "$as_me: program exited with status $ac_status" >&5
3381
echo "$as_me: failed program was:" >&5
3240
echo "$as_me: failed program was:" >&5
3382
3241
sed 's/^/| /' conftest.$ac_ext >&5
3387
rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3389
CFLAGS="$ac_save_CFLAGS"
3390
CXXFLAGS="$ac_save_CXXFLAGS"
3391
LIBS="$ac_save_LIBS"
3394
if test "x$no_sdl" = x ; then
3395
echo "$as_me:$LINENO: result: yes" >&5
3396
echo "${ECHO_T}yes" >&6
3243
ac_cv_lib_SDL_mixer_Mix_OpenAudio=no
3245
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3246
LIBS=$ac_check_lib_save_LIBS
3248
echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_mixer_Mix_OpenAudio" >&5
3249
echo "${ECHO_T}$ac_cv_lib_SDL_mixer_Mix_OpenAudio" >&6
3250
if test $ac_cv_lib_SDL_mixer_Mix_OpenAudio = yes; then
3257
if test "$have_SDL_mixer" = "yes" ; then
3258
# CFLAGS="$CFLAGS -DHAVE_SDL"
3398
3260
cat >>confdefs.h <<\_ACEOF
3399
3261
#define HAVE_SDL
3403
echo "$as_me:$LINENO: result: no" >&5
3404
echo "${ECHO_T}no" >&6
3405
if test "$SDL_CONFIG" = "no" ; then
3406
echo "*** The sdl-config script installed by SDL could not be found"
3407
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
3408
echo "*** your path, or set the SDL_CONFIG environment variable to the"
3409
echo "*** full path to sdl-config."
3411
if test -f conf.sdltest ; then
3414
echo "*** Could not run SDL test program, checking why..."
3415
CFLAGS="$CFLAGS $SDL_CFLAGS"
3416
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
3417
LIBS="$LIBS $SDL_LIBS"
3418
cat >conftest.$ac_ext <<_ACEOF
3419
#line $LINENO "configure"
3422
cat confdefs.h >>conftest.$ac_ext
3423
cat >>conftest.$ac_ext <<_ACEOF
3424
/* end confdefs.h. */
3429
int main(int argc, char *argv[])
3432
#define main K_and_R_C_main
3442
rm -f conftest.$ac_objext conftest$ac_exeext
3443
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3444
(eval $ac_link) 2>&5
3446
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3447
(exit $ac_status); } &&
3448
{ ac_try='test -s conftest$ac_exeext'
3449
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3452
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3453
(exit $ac_status); }; }; then
3454
echo "*** The test program compiled, but did not run. This usually means"
3455
echo "*** that the run-time linker is not finding SDL or finding the wrong"
3456
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
3457
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
3458
echo "*** to the installed location Also, make sure you have run ldconfig if that"
3459
echo "*** is required on your system"
3461
echo "*** If you have an old version installed, it is best to remove it, although"
3462
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
3464
echo "$as_me: failed program was:" >&5
3465
sed 's/^/| /' conftest.$ac_ext >&5
3467
echo "*** The test program failed to compile or link. See the file config.log for the"
3468
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
3469
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
3470
echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
3472
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3473
CFLAGS="$ac_save_CFLAGS"
3474
CXXFLAGS="$ac_save_CXXFLAGS"
3475
LIBS="$ac_save_LIBS"
3480
{ echo "$as_me:$LINENO: WARNING: *** SDL version $SDL_VERSION not found. Sound will be disabled" >&5
3481
echo "$as_me: WARNING: *** SDL version $SDL_VERSION not found. Sound will be disabled" >&2;}
3488
CFLAGS="$CFLAGS $SDL_CFLAGS"
3489
LIBS="$LIBS $SDL_LIBS -lSDL_mixer"
3264
LIBS="$LIBS -lSDL_mixer"
3266
echo "*** SDL_mixer not found. Configuring without audio support."
3270
# CFLAGS="$CFLAGS $SDL_CFLAGS"
3271
# LIBS="$LIBS $SDL_LIBS -lSDL_mixer"
5193
4975
s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
5194
4976
s,@GTK_LIBS@,$GTK_LIBS,;t t
5195
4977
s,@GTK_CONFIG@,$GTK_CONFIG,;t t
5196
s,@SDL_CONFIG@,$SDL_CONFIG,;t t
5197
s,@SDL_CFLAGS@,$SDL_CFLAGS,;t t
5198
s,@SDL_LIBS@,$SDL_LIBS,;t t
5199
4978
s,@GNOME_CFLAGS@,$GNOME_CFLAGS,;t t
5200
4979
s,@GNOME_LIBS@,$GNOME_LIBS,;t t
5201
4980
s,@WITH_GNOME_TRUE@,$WITH_GNOME_TRUE,;t t