comparison configure.in @ 1521:9b9212e4810c

CFLAGS are separate from EXTRA_CFLAGS Fixed iconv.h detection on Cygwin32
author Sam Lantinga <slouken@libsdl.org>
date Tue, 14 Mar 2006 02:46:26 +0000
parents 5d264facfd03
children 30f189cdd82b
comparison
equal deleted inserted replaced
1520:5d264facfd03 1521:9b9212e4810c
55 INCLUDE="-Iinclude $INCLUDE" 55 INCLUDE="-Iinclude $INCLUDE"
56 fi 56 fi
57 case "$target" in 57 case "$target" in
58 *-*-cygwin*) 58 *-*-cygwin*)
59 # We build SDL on cygwin without the UNIX emulation layer 59 # We build SDL on cygwin without the UNIX emulation layer
60 CFLAGS="$CFLAGS -I/usr/include/mingw -mno-cygwin" 60 BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
61 BUILD_CFLAGS="$CFLAGS \$(INCLUDE)" 61 BASE_LDFLAGS="-mno-cygwin"
62 BUILD_LDFLAGS="$LDFLAGS -mno-cygwin"
63 SDL_CFLAGS="-I/usr/include/mingw -mno-cygwin"
64 SDL_LIBS="-lSDL -mno-cygwin"
65 ;; 62 ;;
66 *) 63 *)
67 CFLAGS="$CFLAGS -D_GNU_SOURCE=1" 64 BASE_CFLAGS="-D_GNU_SOURCE=1"
68 BUILD_CFLAGS="$CFLAGS \$(INCLUDE)" 65 BASE_LDFLAGS=""
69 BUILD_LDFLAGS="$LDFLAGS"
70 SDL_CFLAGS=""
71 SDL_LIBS="-lSDL"
72 ;; 66 ;;
73 esac 67 esac
68 BUILD_CFLAGS="$CFLAGS"
69 EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
70 BUILD_LDFLAGS="$LDFLAGS"
71 EXTRA_LDFLAGS="$BASE_LDFLAGS"
72 SDL_CFLAGS="$BASE_CFLAGS"
73 SDL_LIBS="-lSDL $BASE_LDFLAGS"
74 CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
75 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
76 LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
74 77
75 dnl Check for tools 78 dnl Check for tools
76 AC_LIBTOOL_WIN32_DLL 79 AC_LIBTOOL_WIN32_DLL
77 AC_PROG_LIBTOOL 80 AC_PROG_LIBTOOL
78 AC_PROG_CC 81 AC_PROG_CC
116 if test x$ac_cv_func_strtod = xyes; then 119 if test x$ac_cv_func_strtod = xyes; then
117 AC_DEFINE(HAVE_STRTOD) 120 AC_DEFINE(HAVE_STRTOD)
118 fi 121 fi
119 AC_CHECK_FUNCS(malloc calloc realloc free getenv 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 iconv sigaction setjmp nanosleep) 122 AC_CHECK_FUNCS(malloc calloc realloc free getenv 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 iconv sigaction setjmp nanosleep)
120 123
121 AC_CHECK_LIB(m, pow, [BUILD_LDFLAGS="$BUILD_LDFLAGS -lm"]) 124 AC_CHECK_LIB(m, pow, [EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
122 fi 125 fi
123 126
124 if test x$have_inttypes != xyes; then 127 if test x$have_inttypes != xyes; then
125 AC_CHECK_SIZEOF(char, 1) 128 AC_CHECK_SIZEOF(char, 1)
126 AC_CHECK_SIZEOF(short, 2) 129 AC_CHECK_SIZEOF(short, 2)
282 have_audio=yes 285 have_audio=yes
283 286
284 # OpenBSD needs linking with ossaudio emulation library 287 # OpenBSD needs linking with ossaudio emulation library
285 case "$target" in 288 case "$target" in
286 *-*-openbsd*|*-*-netbsd*) 289 *-*-openbsd*|*-*-netbsd*)
287 BUILD_LDFLAGS="$BUILD_LDFLAGS -lossaudio";; 290 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
288 esac 291 esac
289 fi 292 fi
290 fi 293 fi
291 } 294 }
292 295
319 alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 322 alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
320 echo "-- $alsa_lib_spec -> $alsa_lib" 323 echo "-- $alsa_lib_spec -> $alsa_lib"
321 324
322 AC_DEFINE(SDL_AUDIO_DRIVER_ALSA) 325 AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
323 SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c" 326 SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
324 BUILD_CFLAGS="$BUILD_CFLAGS $ALSA_CFLAGS" 327 EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
325 if test x$have_loadso != xyes && \ 328 if test x$have_loadso != xyes && \
326 test x$enable_alsa_shared = xyes; then 329 test x$enable_alsa_shared = xyes; then
327 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading]) 330 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
328 fi 331 fi
329 if test x$have_loadso = xyes && \ 332 if test x$have_loadso = xyes && \
330 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then 333 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
331 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib") 334 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
332 else 335 else
333 BUILD_LDFLAGS="$BUILD_LDFLAGS $ALSA_LIBS" 336 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
334 fi 337 fi
335 have_audio=yes 338 have_audio=yes
336 fi 339 fi
337 fi 340 fi
338 } 341 }
353 AC_MSG_RESULT($have_dmedia) 356 AC_MSG_RESULT($have_dmedia)
354 # Set up files for the audio library 357 # Set up files for the audio library
355 if test x$have_dmedia = xyes; then 358 if test x$have_dmedia = xyes; then
356 AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA) 359 AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
357 SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c" 360 SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
358 BUILD_LDFLAGS="$BUILD_LDFLAGS -laudio" 361 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
359 have_audio=yes 362 have_audio=yes
360 fi 363 fi
361 fi 364 fi
362 } 365 }
363 366
390 AC_MSG_RESULT($have_mme) 393 AC_MSG_RESULT($have_mme)
391 # Set up files for the audio library 394 # Set up files for the audio library
392 if test x$have_mme = xyes; then 395 if test x$have_mme = xyes; then
393 AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO) 396 AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
394 SOURCES="$SOURCES $srcdir/src/audio/mme/*.c" 397 SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
395 BUILD_CFLAGS="$BUILD_CFLAGS $MME_CFLAGS" 398 EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
396 BUILD_LDFLAGS="$BUILD_LDFLAGS $MME_LIBS" 399 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
397 have_audio=yes 400 have_audio=yes
398 fi 401 fi
399 fi 402 fi
400 } 403 }
401 404
415 esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 418 esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
416 echo "-- $esd_lib_spec -> $esd_lib" 419 echo "-- $esd_lib_spec -> $esd_lib"
417 420
418 AC_DEFINE(SDL_AUDIO_DRIVER_ESD) 421 AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
419 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c" 422 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
420 BUILD_CFLAGS="$BUILD_CFLAGS $ESD_CFLAGS" 423 EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
421 if test x$have_loadso != xyes && \ 424 if test x$have_loadso != xyes && \
422 test x$enable_esd_shared = xyes; then 425 test x$enable_esd_shared = xyes; then
423 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading]) 426 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading])
424 fi 427 fi
425 if test x$have_loadso = xyes && \ 428 if test x$have_loadso = xyes && \
426 test x$enable_esd_shared = xyes && test x$esd_lib != x; then 429 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
427 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib") 430 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
428 else 431 else
429 BUILD_LDFLAGS="$BUILD_LDFLAGS $ESD_LIBS" 432 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
430 fi 433 fi
431 have_audio=yes 434 have_audio=yes
432 fi 435 fi
433 fi 436 fi
434 } 437 }
467 arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 470 arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
468 echo "-- $arts_lib_spec -> $arts_lib" 471 echo "-- $arts_lib_spec -> $arts_lib"
469 472
470 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS) 473 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
471 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c" 474 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
472 BUILD_CFLAGS="$BUILD_CFLAGS $ARTS_CFLAGS" 475 EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
473 if test x$have_loadso != xyes && \ 476 if test x$have_loadso != xyes && \
474 test x$enable_arts_shared = xyes; then 477 test x$enable_arts_shared = xyes; then
475 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading]) 478 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading])
476 fi 479 fi
477 if test x$have_loadso = xyes && \ 480 if test x$have_loadso = xyes && \
478 test x$enable_arts_shared = xyes && test x$arts_lib != x; then 481 test x$enable_arts_shared = xyes && test x$arts_lib != x; then
479 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib") 482 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
480 else 483 else
481 BUILD_LDFLAGS="$BUILD_LDFLAGS $ARTS_LIBS" 484 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
482 fi 485 fi
483 have_audio=yes 486 have_audio=yes
484 fi 487 fi
485 fi 488 fi
486 fi 489 fi
509 fi 512 fi
510 AC_MSG_RESULT($have_nas) 513 AC_MSG_RESULT($have_nas)
511 if test x$have_nas = xyes; then 514 if test x$have_nas = xyes; then
512 AC_DEFINE(SDL_AUDIO_DRIVER_NAS) 515 AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
513 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c" 516 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
514 BUILD_CFLAGS="$BUILD_CFLAGS $NAS_CFLAGS" 517 EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
515 BUILD_LDFLAGS="$BUILD_LDFLAGS $NAS_LIBS" 518 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
516 have_audio=yes 519 have_audio=yes
517 fi 520 fi
518 fi 521 fi
519 } 522 }
520 523
586 AC_SUBST(NASMFLAGS) 589 AC_SUBST(NASMFLAGS)
587 590
588 case "$target" in 591 case "$target" in
589 # this line is needed for QNX, because it's not defined the __ELF__ 592 # this line is needed for QNX, because it's not defined the __ELF__
590 *-*-qnx*) 593 *-*-qnx*)
591 BUILD_CFLAGS="$BUILD_CFLAGS -D__ELF__";; 594 EXTRA_CFLAGS="$EXTRA_CFLAGS -D__ELF__";;
592 *-*-solaris*) 595 *-*-solaris*)
593 BUILD_CFLAGS="$BUILD_CFLAGS -D__ELF__";; 596 EXTRA_CFLAGS="$EXTRA_CFLAGS -D__ELF__";;
594 esac 597 esac
595 fi 598 fi
596 fi 599 fi
597 } 600 }
598 601
667 if test x$have_gcc_altivec = xyes; then 670 if test x$have_gcc_altivec = xyes; then
668 AC_DEFINE(SDL_ALTIVEC_BLITTERS) 671 AC_DEFINE(SDL_ALTIVEC_BLITTERS)
669 if test x$have_altivec_h_hdr = xyes; then 672 if test x$have_altivec_h_hdr = xyes; then
670 AC_DEFINE(HAVE_ALTIVEC_H) 673 AC_DEFINE(HAVE_ALTIVEC_H)
671 fi 674 fi
672 BUILD_CFLAGS="$BUILD_CFLAGS $altivec_CFLAGS" 675 EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
673 fi 676 fi
674 fi 677 fi
675 } 678 }
676 679
677 dnl Do the iPod thing 680 dnl Do the iPod thing
680 AC_ARG_ENABLE(ipod, 683 AC_ARG_ENABLE(ipod,
681 AC_HELP_STRING([--enable-ipod], [configure SDL to work with iPodLinux [default=yes on arm-elf]]), 684 AC_HELP_STRING([--enable-ipod], [configure SDL to work with iPodLinux [default=yes on arm-elf]]),
682 , enable_ipod=yes) 685 , enable_ipod=yes)
683 686
684 if test x$enable_ipod = xyes; then 687 if test x$enable_ipod = xyes; then
685 BUILD_CFLAGS="$BUILD_CFLAGS -DIPOD" 688 EXTRA_CFLAGS="$EXTRA_CFLAGS -DIPOD"
686 AC_DEFINE(SDL_VIDEO_DRIVER_IPOD) 689 AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
687 SOURCES="$SOURCES $srcdir/src/video/ipod/*.c" 690 SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
688 fi 691 fi
689 } 692 }
690 693
698 if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then 701 if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
699 AC_ARG_ENABLE(nanox-debug, 702 AC_ARG_ENABLE(nanox-debug,
700 AC_HELP_STRING([--enable-nanox-debug], [print debug messages [default=no]]), 703 AC_HELP_STRING([--enable-nanox-debug], [print debug messages [default=no]]),
701 , enable_nanox_debug=no) 704 , enable_nanox_debug=no)
702 if test x$enable_nanox_debug = xyes; then 705 if test x$enable_nanox_debug = xyes; then
703 BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DEBUG" 706 EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DEBUG"
704 fi 707 fi
705 708
706 AC_ARG_ENABLE(nanox-share-memory, 709 AC_ARG_ENABLE(nanox-share-memory,
707 AC_HELP_STRING([--enable-nanox-share-memory], [use share memory [default=no]]), 710 AC_HELP_STRING([--enable-nanox-share-memory], [use share memory [default=no]]),
708 , enable_nanox_share_memory=no) 711 , enable_nanox_share_memory=no)
709 if test x$enable_nanox_share_memory = xyes; then 712 if test x$enable_nanox_share_memory = xyes; then
710 BUILD_CFLAGS="$BUILD_CFLAGS -DNANOX_SHARE_MEMORY" 713 EXTRA_CFLAGS="$EXTRA_CFLAGS -DNANOX_SHARE_MEMORY"
711 fi 714 fi
712 715
713 AC_ARG_ENABLE(nanox_direct_fb, 716 AC_ARG_ENABLE(nanox_direct_fb,
714 AC_HELP_STRING([--enable-nanox-direct-fb], [use direct framebuffer access [default=no]]), 717 AC_HELP_STRING([--enable-nanox-direct-fb], [use direct framebuffer access [default=no]]),
715 , enable_nanox_direct_fb=no) 718 , enable_nanox_direct_fb=no)
716 if test x$enable_nanox_direct_fb = xyes; then 719 if test x$enable_nanox_direct_fb = xyes; then
717 BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DIRECT_FB" 720 EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DIRECT_FB"
718 fi 721 fi
719 722
720 AC_DEFINE(SDL_VIDEO_DRIVER_NANOX) 723 AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
721 SOURCES="$SOURCES $srcdir/src/video/nanox/*.c" 724 SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
722 BUILD_LDFLAGS="$BUILD_LDFLAGS -lnano-X" 725 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lnano-X"
723 have_video=yes 726 have_video=yes
724 fi 727 fi
725 } 728 }
726 729
727 dnl Find the X11 include and library directories 730 dnl Find the X11 include and library directories
765 X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY" 768 X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
766 fi 769 fi
767 770
768 AC_DEFINE(SDL_VIDEO_DRIVER_X11) 771 AC_DEFINE(SDL_VIDEO_DRIVER_X11)
769 SOURCES="$SOURCES $srcdir/src/video/x11/*.c" 772 SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
770 BUILD_CFLAGS="$BUILD_CFLAGS $X_CFLAGS" 773 EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
771 if test x$have_loadso != xyes && \ 774 if test x$have_loadso != xyes && \
772 test x$enable_x11_shared = xyes; then 775 test x$enable_x11_shared = xyes; then
773 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading]) 776 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
774 fi 777 fi
775 if test x$have_loadso = xyes && \ 778 if test x$have_loadso = xyes && \
777 echo "-- dynamic libX11 -> $x11_lib" 780 echo "-- dynamic libX11 -> $x11_lib"
778 echo "-- dynamic libX11ext -> $x11ext_lib" 781 echo "-- dynamic libX11ext -> $x11ext_lib"
779 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib") 782 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
780 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib") 783 AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
781 else 784 else
782 BUILD_LDFLAGS="$BUILD_LDFLAGS $X_LIBS -lX11 -lXext" 785 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
783 fi 786 fi
784 have_video=yes 787 have_video=yes
785 788
786 AC_ARG_ENABLE(dga, 789 AC_ARG_ENABLE(dga,
787 AC_HELP_STRING([--enable-dga], [allow use of X11 DGA code [default=yes]]), 790 AC_HELP_STRING([--enable-dga], [allow use of X11 DGA code [default=yes]]),
855 ]) 858 ])
856 AC_MSG_RESULT($video_photon) 859 AC_MSG_RESULT($video_photon)
857 if test x$video_photon = xyes; then 860 if test x$video_photon = xyes; then
858 AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON) 861 AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
859 SOURCES="$SOURCES $srcdir/src/video/photon/*.c" 862 SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
860 BUILD_LDFLAGS="$BUILD_LDFLAGS -lph" 863 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lph"
861 have_video=yes 864 have_video=yes
862 865
863 CheckOpenGLQNX 866 CheckOpenGLQNX
864 fi 867 fi
865 fi 868 fi
984 987
985 AC_MSG_RESULT($video_directfb) 988 AC_MSG_RESULT($video_directfb)
986 if test x$video_directfb = xyes; then 989 if test x$video_directfb = xyes; then
987 AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB) 990 AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
988 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c" 991 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
989 BUILD_CFLAGS="$BUILD_CFLAGS $DIRECTFB_CFLAGS" 992 EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
990 BUILD_LDFLAGS="$BUILD_LDFLAGS $DIRECTFB_LIBS" 993 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
991 have_video=yes 994 have_video=yes
992 fi 995 fi
993 fi 996 fi
994 } 997 }
995 998
1036 ]) 1039 ])
1037 AC_MSG_RESULT($video_ggi) 1040 AC_MSG_RESULT($video_ggi)
1038 if test x$video_ggi = xyes; then 1041 if test x$video_ggi = xyes; then
1039 AC_DEFINE(SDL_VIDEO_DRIVER_GGI) 1042 AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
1040 SOURCES="$SOURCES $srcdir/src/video/ggi/*.c" 1043 SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
1041 BUILD_LDFLAGS="$BUILD_LDFLAGS -lggi -lgii -lgg" 1044 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lggi -lgii -lgg"
1042 have_video=yes 1045 have_video=yes
1043 fi 1046 fi
1044 fi 1047 fi
1045 } 1048 }
1046 1049
1066 ]) 1069 ])
1067 AC_MSG_RESULT($video_svga) 1070 AC_MSG_RESULT($video_svga)
1068 if test x$video_svga = xyes; then 1071 if test x$video_svga = xyes; then
1069 AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB) 1072 AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
1070 SOURCES="$SOURCES $srcdir/src/video/svga/*.c" 1073 SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
1071 BUILD_LDFLAGS="$BUILD_LDFLAGS -lvga" 1074 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga"
1072 have_video=yes 1075 have_video=yes
1073 fi 1076 fi
1074 fi 1077 fi
1075 } 1078 }
1076 1079
1096 ]) 1099 ])
1097 AC_MSG_RESULT($video_vgl) 1100 AC_MSG_RESULT($video_vgl)
1098 if test x$video_vgl = xyes; then 1101 if test x$video_vgl = xyes; then
1099 AC_DEFINE(SDL_VIDEO_DRIVER_VGL) 1102 AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
1100 SOURCES="$SOURCES $srcdir/src/video/vgl/*.c" 1103 SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
1101 BUILD_LDFLAGS="$BUILD_LDFLAGS -lvgl" 1104 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvgl"
1102 have_video=yes 1105 have_video=yes
1103 fi 1106 fi
1104 fi 1107 fi
1105 } 1108 }
1106 1109
1147 ]) 1150 ])
1148 AC_MSG_RESULT($video_aalib) 1151 AC_MSG_RESULT($video_aalib)
1149 if test x$video_aalib = xyes; then 1152 if test x$video_aalib = xyes; then
1150 AC_DEFINE(SDL_VIDEO_DRIVER_AALIB) 1153 AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
1151 SOURCES="$SOURCES $srcdir/src/video/aalib/*.c" 1154 SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
1152 BUILD_LDFLAGS="$BUILD_LDFLAGS -laa" 1155 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laa"
1153 have_video=yes 1156 have_video=yes
1154 fi 1157 fi
1155 fi 1158 fi
1156 } 1159 }
1157 1160
1178 AC_MSG_RESULT($video_qtopia) 1181 AC_MSG_RESULT($video_qtopia)
1179 if test x$video_qtopia = xyes; then 1182 if test x$video_qtopia = xyes; then
1180 AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA) 1183 AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
1181 SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc" 1184 SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
1182 SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc" 1185 SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
1183 BUILD_CFLAGS="$BUILD_CFLAGS $QTOPIA_FLAGS" 1186 EXTRA_CFLAGS="$EXTRA_CFLAGS $QTOPIA_FLAGS"
1184 SDL_CFLAGS="$SDL_CFLAGS -DQWS -Dmain=SDL_main" 1187 SDL_CFLAGS="$SDL_CFLAGS -DQWS -Dmain=SDL_main"
1185 SDL_LIBS="-lSDLmain $SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte" 1188 SDL_LIBS="-lSDLmain $SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
1186 have_video=yes 1189 have_video=yes
1187 fi 1190 fi
1188 AC_LANG_C 1191 AC_LANG_C
1248 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes) 1251 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
1249 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then 1252 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
1250 video_gem=yes 1253 video_gem=yes
1251 AC_DEFINE(SDL_VIDEO_DRIVER_GEM) 1254 AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
1252 SOURCES="$SOURCES $srcdir/src/video/gem/*.c" 1255 SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
1253 BUILD_LDFLAGS="$BUILD_LDFLAGS -lgem" 1256 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgem"
1254 have_video=yes 1257 have_video=yes
1255 fi 1258 fi
1256 fi 1259 fi
1257 } 1260 }
1258 1261
1308 video_opengl=yes 1311 video_opengl=yes
1309 ]) 1312 ])
1310 AC_MSG_RESULT($video_opengl) 1313 AC_MSG_RESULT($video_opengl)
1311 if test x$video_opengl = xyes; then 1314 if test x$video_opengl = xyes; then
1312 AC_DEFINE(SDL_VIDEO_OPENGL) 1315 AC_DEFINE(SDL_VIDEO_OPENGL)
1313 BUILD_LDFLAGS="$BUILD_LDFLAGS -lGL" 1316 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
1314 fi 1317 fi
1315 fi 1318 fi
1316 } 1319 }
1317 1320
1318 dnl Check for Win32 OpenGL 1321 dnl Check for Win32 OpenGL
1327 dnl Check for BeOS OpenGL 1330 dnl Check for BeOS OpenGL
1328 CheckBeGL() 1331 CheckBeGL()
1329 { 1332 {
1330 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then 1333 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1331 AC_DEFINE(SDL_VIDEO_OPENGL) 1334 AC_DEFINE(SDL_VIDEO_OPENGL)
1332 BUILD_LDFLAGS="$BUILD_LDFLAGS -lGL" 1335 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
1333 fi 1336 fi
1334 } 1337 }
1335 1338
1336 dnl Check for MacOS OpenGL 1339 dnl Check for MacOS OpenGL
1337 CheckMacGL() 1340 CheckMacGL()
1338 { 1341 {
1339 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then 1342 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1340 AC_DEFINE(SDL_VIDEO_OPENGL) 1343 AC_DEFINE(SDL_VIDEO_OPENGL)
1341 case "$target" in 1344 case "$target" in
1342 *-*-darwin*) 1345 *-*-darwin*)
1343 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework OpenGL" 1346 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework OpenGL"
1344 # The following is probably not available in Darwin: 1347 # The following is probably not available in Darwin:
1345 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework AGL" 1348 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AGL"
1346 esac 1349 esac
1347 fi 1350 fi
1348 } 1351 }
1349 1352
1350 dnl Check for Mesa offscreen rendering 1353 dnl Check for Mesa offscreen rendering
1366 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags` 1369 OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
1367 OSMESA_LIBS=`$OSMESA_CONFIG --libs` 1370 OSMESA_LIBS=`$OSMESA_CONFIG --libs`
1368 fi 1371 fi
1369 AC_DEFINE(SDL_VIDEO_OPENGL) 1372 AC_DEFINE(SDL_VIDEO_OPENGL)
1370 AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA) 1373 AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
1371 BUILD_CFLAGS="$BUILD_CFLAGS $OSMESA_CFLAGS" 1374 EXTRA_CFLAGS="$EXTRA_CFLAGS $OSMESA_CFLAGS"
1372 BUILD_LDFLAGS="$BUILD_LDFLAGS $OSMESA_LIBS" 1375 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $OSMESA_LIBS"
1373 1376
1374 AC_ARG_ENABLE(osmesa-shared, 1377 AC_ARG_ENABLE(osmesa-shared,
1375 AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [default=yes]]), 1378 AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [default=yes]]),
1376 , enable_osmesa_shared=yes) 1379 , enable_osmesa_shared=yes)
1377 if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then 1380 if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
1425 enable_input_tslib=yes 1428 enable_input_tslib=yes
1426 ]) 1429 ])
1427 AC_MSG_RESULT($enable_input_tslib) 1430 AC_MSG_RESULT($enable_input_tslib)
1428 if test x$enable_input_tslib = xyes; then 1431 if test x$enable_input_tslib = xyes; then
1429 AC_DEFINE(SDL_INPUT_TSLIB) 1432 AC_DEFINE(SDL_INPUT_TSLIB)
1430 BUILD_LDFLAGS="$BUILD_LDFLAGS -lts" 1433 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
1431 fi 1434 fi
1432 fi 1435 fi
1433 } 1436 }
1434 1437
1435 dnl See if we can use GNU pth library for threads 1438 dnl See if we can use GNU pth library for threads
1554 CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs" 1557 CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
1555 1558
1556 # Do futher testing if we have pthread support... 1559 # Do futher testing if we have pthread support...
1557 if test x$use_pthreads = xyes; then 1560 if test x$use_pthreads = xyes; then
1558 AC_DEFINE(SDL_THREAD_PTHREAD) 1561 AC_DEFINE(SDL_THREAD_PTHREAD)
1559 BUILD_CFLAGS="$BUILD_CFLAGS $pthread_cflags" 1562 EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
1560 BUILD_LDFLAGS="$BUILD_LDFLAGS $pthread_lib" 1563 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
1561 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags" 1564 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
1562 SDL_LIBS="$SDL_LIBS $pthread_lib" 1565 SDL_LIBS="$SDL_LIBS $pthread_lib"
1563 1566
1564 # Save the original compiler flags and libraries 1567 # Save the original compiler flags and libraries
1565 ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS" 1568 ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
1657 dnl See if the user wants to redirect standard output to files 1660 dnl See if the user wants to redirect standard output to files
1658 AC_ARG_ENABLE(stdio-redirect, 1661 AC_ARG_ENABLE(stdio-redirect,
1659 AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Win32 [default=yes]]), 1662 AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Win32 [default=yes]]),
1660 , enable_stdio_redirect=yes) 1663 , enable_stdio_redirect=yes)
1661 if test x$enable_stdio_redirect != xyes; then 1664 if test x$enable_stdio_redirect != xyes; then
1662 BUILD_CFLAGS="$BUILD_CFLAGS -DNO_STDIO_REDIRECT" 1665 EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
1663 fi 1666 fi
1664 1667
1665 if test x$enable_video = xyes; then 1668 if test x$enable_video = xyes; then
1666 AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB) 1669 AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
1667 SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c" 1670 SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
1708 have_dlopen=yes 1711 have_dlopen=yes
1709 ]) 1712 ])
1710 AC_MSG_RESULT($have_dlopen) 1713 AC_MSG_RESULT($have_dlopen)
1711 1714
1712 if test x$have_dlopen = xyes; then 1715 if test x$have_dlopen = xyes; then
1713 AC_CHECK_LIB(c, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS", 1716 AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
1714 AC_CHECK_LIB(dl, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS -ldl", 1717 AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
1715 AC_CHECK_LIB(ltdl, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS -lltdl"))) 1718 AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
1716 AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes) 1719 AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes)
1717 if test x$have_dlvsym = xyes; then 1720 if test x$have_dlvsym = xyes; then
1718 AC_DEFINE(HAVE_DLVSYM) 1721 AC_DEFINE(HAVE_DLVSYM)
1719 fi 1722 fi
1720 AC_DEFINE(SDL_LOADSO_DLOPEN) 1723 AC_DEFINE(SDL_LOADSO_DLOPEN)
1734 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes) 1737 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
1735 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem) 1738 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
1736 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then 1739 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
1737 AC_DEFINE(SDL_LOADSO_LDG) 1740 AC_DEFINE(SDL_LOADSO_LDG)
1738 SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c" 1741 SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
1739 BUILD_LDFLAGS="$BUILD_LDFLAGS -lldg -lgem" 1742 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lldg -lgem"
1740 have_loadso=yes 1743 have_loadso=yes
1741 fi 1744 fi
1742 fi 1745 fi
1743 } 1746 }
1744 1747
1837 fi 1840 fi
1838 AC_MSG_RESULT($have_usbhid_new) 1841 AC_MSG_RESULT($have_usbhid_new)
1839 1842
1840 AC_DEFINE(SDL_JOYSTICK_USBHID) 1843 AC_DEFINE(SDL_JOYSTICK_USBHID)
1841 SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c" 1844 SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
1842 BUILD_CFLAGS="$BUILD_CFLAGS $USB_CFLAGS" 1845 EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
1843 BUILD_LDFLAGS="$BUILD_LDFLAGS $USB_LIBS" 1846 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
1844 have_joystick=yes 1847 have_joystick=yes
1845 fi 1848 fi
1846 CFLAGS="$save_CFLAGS" 1849 CFLAGS="$save_CFLAGS"
1847 fi 1850 fi
1848 } 1851 }
1855 , enable_clock_gettime=no) 1858 , enable_clock_gettime=no)
1856 if test x$enable_clock_gettime = xyes; then 1859 if test x$enable_clock_gettime = xyes; then
1857 AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) 1860 AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
1858 if test x$have_clock_gettime = xyes; then 1861 if test x$have_clock_gettime = xyes; then
1859 AC_DEFINE(HAVE_CLOCK_GETTIME) 1862 AC_DEFINE(HAVE_CLOCK_GETTIME)
1860 BUILD_LDFLAGS="$BUILD_LDFLAGS -lrt" 1863 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
1861 fi 1864 fi
1862 fi 1865 fi
1863 } 1866 }
1864 1867
1865 dnl Check for a valid linux/version.h 1868 dnl Check for a valid linux/version.h
1866 CheckLinuxVersion() 1869 CheckLinuxVersion()
1867 { 1870 {
1868 AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes) 1871 AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes)
1869 if test x$have_linux_version_h = xyes; then 1872 if test x$have_linux_version_h = xyes; then
1870 BUILD_CFLAGS="$BUILD_CFLAGS -DHAVE_LINUX_VERSION_H" 1873 EXTRA_CFLAGS="$EXTRA_CFLAGS -DHAVE_LINUX_VERSION_H"
1871 fi 1874 fi
1872 } 1875 }
1873 1876
1874 dnl Check if we want to use RPATH 1877 dnl Check if we want to use RPATH
1875 CheckRPATH() 1878 CheckRPATH()
2035 CheckPTHREAD 2038 CheckPTHREAD
2036 # Set up files for the audio library 2039 # Set up files for the audio library
2037 if test x$enable_audio = xyes; then 2040 if test x$enable_audio = xyes; then
2038 AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO) 2041 AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
2039 SOURCES="$SOURCES $srcdir/src/audio/nto/*.c" 2042 SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
2040 BUILD_LDFLAGS="$BUILD_LDFLAGS -lasound" 2043 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
2041 have_audio=yes 2044 have_audio=yes
2042 fi 2045 fi
2043 # Set up files for the cdrom library 2046 # Set up files for the cdrom library
2044 if test x$enable_cdrom = xyes; then 2047 if test x$enable_cdrom = xyes; then
2045 AC_DEFINE(SDL_CDROM_QNX) 2048 AC_DEFINE(SDL_CDROM_QNX)
2112 AC_DEFINE(SDL_LOADSO_WIN32) 2115 AC_DEFINE(SDL_LOADSO_WIN32)
2113 SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c" 2116 SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
2114 have_loadso=yes 2117 have_loadso=yes
2115 fi 2118 fi
2116 # Set up the system libraries we need 2119 # Set up the system libraries we need
2117 BUILD_LDFLAGS="$BUILD_LDFLAGS -luser32 -lgdi32 -lwinmm" 2120 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm"
2118 if test x$have_directx = xyes; then 2121 if test x$have_directx = xyes; then
2119 BUILD_LDFLAGS="$BUILD_LDFLAGS -ldxguid" 2122 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldxguid"
2120 fi 2123 fi
2121 # The Win32 platform requires special setup 2124 # The Win32 platform requires special setup
2122 SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c" 2125 SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
2123 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" 2126 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
2124 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" 2127 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
2169 SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c" 2172 SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
2170 have_loadso=yes 2173 have_loadso=yes
2171 fi 2174 fi
2172 # The BeOS platform requires special setup. 2175 # The BeOS platform requires special setup.
2173 SOURCES="$srcdir/src/main/beos/*.cc $SOURCES" 2176 SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
2174 BUILD_LDFLAGS="$BUILD_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" 2177 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
2175 ;; 2178 ;;
2176 *-*-darwin* ) 2179 *-*-darwin* )
2177 # This could be either full "Mac OS X", or plain "Darwin" which is 2180 # This could be either full "Mac OS X", or plain "Darwin" which is
2178 # just the OS X kernel sans upper layers like Carbon and Cocoa. 2181 # just the OS X kernel sans upper layers like Carbon and Cocoa.
2179 # Next line is broken, and a few files below require Mac OS X (full) 2182 # Next line is broken, and a few files below require Mac OS X (full)
2188 CheckOpenGLX11 2191 CheckOpenGLX11
2189 CheckPTHREAD 2192 CheckPTHREAD
2190 CheckAltivec 2193 CheckAltivec
2191 2194
2192 # Need this or things might misbuild on a G3. 2195 # Need this or things might misbuild on a G3.
2193 BUILD_CFLAGS="$BUILD_CFLAGS -force_cpusubtype_ALL" 2196 EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
2194 2197
2195 # Set up files for the audio library 2198 # Set up files for the audio library
2196 if test x$enable_audio = xyes; then 2199 if test x$enable_audio = xyes; then
2197 AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO) 2200 AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
2198 SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c" 2201 SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
2202 fi 2205 fi
2203 # Set up files for the joystick library 2206 # Set up files for the joystick library
2204 if test x$enable_joystick = xyes; then 2207 if test x$enable_joystick = xyes; then
2205 AC_DEFINE(SDL_JOYSTICK_IOKIT) 2208 AC_DEFINE(SDL_JOYSTICK_IOKIT)
2206 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c" 2209 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
2207 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework IOKit" 2210 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework IOKit"
2208 have_joystick=yes 2211 have_joystick=yes
2209 fi 2212 fi
2210 # Set up files for the cdrom library 2213 # Set up files for the cdrom library
2211 if test x$enable_cdrom = xyes; then 2214 if test x$enable_cdrom = xyes; then
2212 AC_DEFINE(SDL_CDROM_MACOSX) 2215 AC_DEFINE(SDL_CDROM_MACOSX)
2225 SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c" 2228 SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
2226 have_loadso=yes 2229 have_loadso=yes
2227 fi 2230 fi
2228 # The MacOS X platform requires special setup. 2231 # The MacOS X platform requires special setup.
2229 SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m" 2232 SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m"
2230 BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings" 2233 EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
2231 SDL_LIBS="-lSDLmain $SDL_LIBS" 2234 SDL_LIBS="-lSDLmain $SDL_LIBS"
2232 if test x$enable_video_cocoa = xyes; then 2235 if test x$enable_video_cocoa = xyes; then
2233 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Cocoa" 2236 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Cocoa"
2234 fi 2237 fi
2235 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then 2238 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
2236 # The Cocoa backend still needs Carbon, and the YUV code QuickTime 2239 # The Cocoa backend still needs Carbon, and the YUV code QuickTime
2237 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework QuickTime -framework ApplicationServices" 2240 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework QuickTime -framework ApplicationServices"
2238 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Carbon" 2241 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework Carbon"
2239 fi 2242 fi
2240 # If either the audio or CD driver is used, add the AudioUnit framework 2243 # If either the audio or CD driver is used, add the AudioUnit framework
2241 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then 2244 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
2242 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework AudioToolbox -framework AudioUnit" 2245 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -framework AudioToolbox -framework AudioUnit"
2243 fi 2246 fi
2244 ;; 2247 ;;
2245 *-*-mint*) 2248 *-*-mint*)
2246 ARCH=mint 2249 ARCH=mint
2247 CheckDummyVideo 2250 CheckDummyVideo
2308 AC_DEFINE(SDL_TIMER_RISCOS) 2311 AC_DEFINE(SDL_TIMER_RISCOS)
2309 SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c" 2312 SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
2310 have_timers=yes 2313 have_timers=yes
2311 fi 2314 fi
2312 # The RISC OS platform requires special setup. 2315 # The RISC OS platform requires special setup.
2313 BUILD_LDFLAGS="$BUILD_LDFLAGS -ljpeg -ltiff -lpng -lz" 2316 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ljpeg -ltiff -lpng -lz"
2314 ;; 2317 ;;
2315 *) 2318 *)
2316 AC_MSG_ERROR([ 2319 AC_MSG_ERROR([
2317 *** Unsupported target: Please add to configure.in 2320 *** Unsupported target: Please add to configure.in
2318 ]) 2321 ])
2448 AC_SUBST(SOURCES) 2451 AC_SUBST(SOURCES)
2449 AC_SUBST(OBJECTS) 2452 AC_SUBST(OBJECTS)
2450 AC_SUBST(SDLMAIN_SOURCES) 2453 AC_SUBST(SDLMAIN_SOURCES)
2451 AC_SUBST(SDLMAIN_OBJECTS) 2454 AC_SUBST(SDLMAIN_OBJECTS)
2452 AC_SUBST(BUILD_CFLAGS) 2455 AC_SUBST(BUILD_CFLAGS)
2456 AC_SUBST(EXTRA_CFLAGS)
2453 AC_SUBST(BUILD_LDFLAGS) 2457 AC_SUBST(BUILD_LDFLAGS)
2458 AC_SUBST(EXTRA_LDFLAGS)
2454 2459
2455 AC_OUTPUT([ 2460 AC_OUTPUT([
2456 Makefile sdl-config SDL.spec SDL.qpg 2461 Makefile sdl-config SDL.spec SDL.qpg
2457 ], [ 2462 ], [
2458 : >build-deps 2463 : >build-deps