Mercurial > sdl-ios-xcode
comparison configure.in @ 1393:cd3362657144
Pass LDFLAGS to the build system
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 20 Feb 2006 20:08:29 +0000 |
parents | ce65f014190a |
children | 428c8690cf73 |
comparison
equal
deleted
inserted
replaced
1392:4a203b442650 | 1393:cd3362657144 |
---|---|
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 -DWIN32 -Uunix -mno-cygwin" | 60 CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin" |
61 BUILD_CFLAGS="$CFLAGS \$(INCLUDE)" | 61 BUILD_CFLAGS="$CFLAGS \$(INCLUDE)" |
62 BUILD_LIBS="-mno-cygwin" | 62 BUILD_LDFLAGS="$LDFLAGS -mno-cygwin" |
63 SDL_CFLAGS="-I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin" | 63 SDL_CFLAGS="-I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin" |
64 SDL_LIBS="-lSDL -mno-cygwin" | 64 SDL_LIBS="-lSDL -mno-cygwin" |
65 ;; | 65 ;; |
66 *) | 66 *) |
67 CFLAGS="$CFLAGS -D_GNU_SOURCE=1" | 67 CFLAGS="$CFLAGS -D_GNU_SOURCE=1" |
68 BUILD_CFLAGS="$CFLAGS \$(INCLUDE)" | 68 BUILD_CFLAGS="$CFLAGS \$(INCLUDE)" |
69 BUILD_LIBS="" | 69 BUILD_LDFLAGS="$LDFLAGS" |
70 SDL_CFLAGS="" | 70 SDL_CFLAGS="" |
71 SDL_LIBS="-lSDL" | 71 SDL_LIBS="-lSDL" |
72 ;; | 72 ;; |
73 esac | 73 esac |
74 | 74 |
116 if test x$ac_cv_func_strtod = xyes; then | 116 if test x$ac_cv_func_strtod = xyes; then |
117 AC_DEFINE(HAVE_STRTOD) | 117 AC_DEFINE(HAVE_STRTOD) |
118 fi | 118 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 _i64toa _ui64toa strtoll atoi atof strcmp strncmp stricmp strcasecmp sscanf snprintf vsnprintf sigaction setjmp nanosleep) | 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 _i64toa _ui64toa strtoll atoi atof strcmp strncmp stricmp strcasecmp sscanf snprintf vsnprintf sigaction setjmp nanosleep) |
120 | 120 |
121 AC_CHECK_LIB(m, pow, [BUILD_LIBS="$BUILD_LIBS -lm"]) | 121 AC_CHECK_LIB(m, pow, [BUILD_LDFLAGS="$BUILD_LDFLAGS -lm"]) |
122 fi | 122 fi |
123 | 123 |
124 if test x$have_inttypes != xyes; then | 124 if test x$have_inttypes != xyes; then |
125 AC_CHECK_SIZEOF(char, 1) | 125 AC_CHECK_SIZEOF(char, 1) |
126 AC_CHECK_SIZEOF(short, 2) | 126 AC_CHECK_SIZEOF(short, 2) |
282 have_audio=yes | 282 have_audio=yes |
283 | 283 |
284 # OpenBSD needs linking with ossaudio emulation library | 284 # OpenBSD needs linking with ossaudio emulation library |
285 case "$target" in | 285 case "$target" in |
286 *-*-openbsd*|*-*-netbsd*) | 286 *-*-openbsd*|*-*-netbsd*) |
287 BUILD_LIBS="$BUILD_LIBS -lossaudio";; | 287 BUILD_LDFLAGS="$BUILD_LDFLAGS -lossaudio";; |
288 esac | 288 esac |
289 fi | 289 fi |
290 fi | 290 fi |
291 } | 291 } |
292 | 292 |
328 fi | 328 fi |
329 if test x$have_loadso = xyes && \ | 329 if test x$have_loadso = xyes && \ |
330 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then | 330 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then |
331 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib") | 331 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib") |
332 else | 332 else |
333 BUILD_LIBS="$BUILD_LIBS $ALSA_LIBS" | 333 BUILD_LDFLAGS="$BUILD_LDFLAGS $ALSA_LIBS" |
334 fi | 334 fi |
335 have_audio=yes | 335 have_audio=yes |
336 fi | 336 fi |
337 fi | 337 fi |
338 if test x$have_alsa = xyes; then | 338 if test x$have_alsa = xyes; then |
390 AC_MSG_RESULT($have_dmedia) | 390 AC_MSG_RESULT($have_dmedia) |
391 # Set up files for the audio library | 391 # Set up files for the audio library |
392 if test x$have_dmedia = xyes; then | 392 if test x$have_dmedia = xyes; then |
393 AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA) | 393 AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA) |
394 SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c" | 394 SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c" |
395 BUILD_LIBS="$BUILD_LIBS -laudio" | 395 BUILD_LDFLAGS="$BUILD_LDFLAGS -laudio" |
396 have_audio=yes | 396 have_audio=yes |
397 fi | 397 fi |
398 fi | 398 fi |
399 } | 399 } |
400 | 400 |
422 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib") | 422 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib") |
423 fi | 423 fi |
424 AC_DEFINE(SDL_AUDIO_DRIVER_ESD) | 424 AC_DEFINE(SDL_AUDIO_DRIVER_ESD) |
425 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c" | 425 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c" |
426 BUILD_CFLAGS="$BUILD_CFLAGS $ESD_CFLAGS" | 426 BUILD_CFLAGS="$BUILD_CFLAGS $ESD_CFLAGS" |
427 BUILD_LIBS="$BUILD_LIBS $ESD_LIBS" | 427 BUILD_LDFLAGS="$BUILD_LDFLAGS $ESD_LIBS" |
428 have_audio=yes | 428 have_audio=yes |
429 fi | 429 fi |
430 fi | 430 fi |
431 } | 431 } |
432 | 432 |
472 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib") | 472 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib") |
473 fi | 473 fi |
474 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS) | 474 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS) |
475 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c" | 475 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c" |
476 BUILD_CFLAGS="$BUILD_CFLAGS $ARTS_CFLAGS" | 476 BUILD_CFLAGS="$BUILD_CFLAGS $ARTS_CFLAGS" |
477 BUILD_LIBS="$BUILD_LIBS $ARTS_LIBS" | 477 BUILD_LDFLAGS="$BUILD_LDFLAGS $ARTS_LIBS" |
478 have_audio=yes | 478 have_audio=yes |
479 fi | 479 fi |
480 fi | 480 fi |
481 fi | 481 fi |
482 } | 482 } |
505 AC_MSG_RESULT($have_nas) | 505 AC_MSG_RESULT($have_nas) |
506 if test x$have_nas = xyes; then | 506 if test x$have_nas = xyes; then |
507 AC_DEFINE(SDL_AUDIO_DRIVER_NAS) | 507 AC_DEFINE(SDL_AUDIO_DRIVER_NAS) |
508 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c" | 508 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c" |
509 BUILD_CFLAGS="$BUILD_CFLAGS $NAS_CFLAGS" | 509 BUILD_CFLAGS="$BUILD_CFLAGS $NAS_CFLAGS" |
510 BUILD_LIBS="$BUILD_LIBS $NAS_LIBS" | 510 BUILD_LDFLAGS="$BUILD_LDFLAGS $NAS_LIBS" |
511 have_audio=yes | 511 have_audio=yes |
512 fi | 512 fi |
513 fi | 513 fi |
514 } | 514 } |
515 | 515 |
711 BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DIRECT_FB" | 711 BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DIRECT_FB" |
712 fi | 712 fi |
713 | 713 |
714 AC_DEFINE(SDL_VIDEO_DRIVER_NANOX) | 714 AC_DEFINE(SDL_VIDEO_DRIVER_NANOX) |
715 SOURCES="$SOURCES $srcdir/src/video/nanox/*.c" | 715 SOURCES="$SOURCES $srcdir/src/video/nanox/*.c" |
716 BUILD_LIBS="$BUILD_LIBS -lnano-X" | 716 BUILD_LDFLAGS="$BUILD_LDFLAGS -lnano-X" |
717 have_video=yes | 717 have_video=yes |
718 fi | 718 fi |
719 } | 719 } |
720 | 720 |
721 dnl Find the X11 include and library directories | 721 dnl Find the X11 include and library directories |
774 fi | 774 fi |
775 | 775 |
776 AC_DEFINE(SDL_VIDEO_DRIVER_X11) | 776 AC_DEFINE(SDL_VIDEO_DRIVER_X11) |
777 SOURCES="$SOURCES $srcdir/src/video/x11/*.c" | 777 SOURCES="$SOURCES $srcdir/src/video/x11/*.c" |
778 BUILD_CFLAGS="$BUILD_CFLAGS $X_CFLAGS" | 778 BUILD_CFLAGS="$BUILD_CFLAGS $X_CFLAGS" |
779 BUILD_LIBS="$BUILD_LIBS $X_LIBS" | 779 BUILD_LDFLAGS="$BUILD_LDFLAGS $X_LIBS" |
780 have_video=yes | 780 have_video=yes |
781 | 781 |
782 AC_ARG_ENABLE(dga, | 782 AC_ARG_ENABLE(dga, |
783 AC_HELP_STRING([--enable-dga], [allow use of X11 DGA code [default=yes]]), | 783 AC_HELP_STRING([--enable-dga], [allow use of X11 DGA code [default=yes]]), |
784 , enable_dga=yes) | 784 , enable_dga=yes) |
851 ]) | 851 ]) |
852 AC_MSG_RESULT($video_photon) | 852 AC_MSG_RESULT($video_photon) |
853 if test x$video_photon = xyes; then | 853 if test x$video_photon = xyes; then |
854 AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON) | 854 AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON) |
855 SOURCES="$SOURCES $srcdir/src/video/photon/*.c" | 855 SOURCES="$SOURCES $srcdir/src/video/photon/*.c" |
856 BUILD_LIBS="$BUILD_LIBS -lph" | 856 BUILD_LDFLAGS="$BUILD_LDFLAGS -lph" |
857 have_video=yes | 857 have_video=yes |
858 | 858 |
859 CheckOpenGLQNX | 859 CheckOpenGLQNX |
860 fi | 860 fi |
861 fi | 861 fi |
981 AC_MSG_RESULT($video_directfb) | 981 AC_MSG_RESULT($video_directfb) |
982 if test x$video_directfb = xyes; then | 982 if test x$video_directfb = xyes; then |
983 AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB) | 983 AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB) |
984 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c" | 984 SOURCES="$SOURCES $srcdir/src/video/directfb/*.c" |
985 BUILD_CFLAGS="$BUILD_CFLAGS $DIRECTFB_CFLAGS" | 985 BUILD_CFLAGS="$BUILD_CFLAGS $DIRECTFB_CFLAGS" |
986 BUILD_LIBS="$BUILD_LIBS $DIRECTFB_LIBS" | 986 BUILD_LDFLAGS="$BUILD_LDFLAGS $DIRECTFB_LIBS" |
987 have_video=yes | 987 have_video=yes |
988 fi | 988 fi |
989 fi | 989 fi |
990 } | 990 } |
991 | 991 |
1032 ]) | 1032 ]) |
1033 AC_MSG_RESULT($video_ggi) | 1033 AC_MSG_RESULT($video_ggi) |
1034 if test x$video_ggi = xyes; then | 1034 if test x$video_ggi = xyes; then |
1035 AC_DEFINE(SDL_VIDEO_DRIVER_GGI) | 1035 AC_DEFINE(SDL_VIDEO_DRIVER_GGI) |
1036 SOURCES="$SOURCES $srcdir/src/video/ggi/*.c" | 1036 SOURCES="$SOURCES $srcdir/src/video/ggi/*.c" |
1037 BUILD_LIBS="$BUILD_LIBS -lggi -lgii -lgg" | 1037 BUILD_LDFLAGS="$BUILD_LDFLAGS -lggi -lgii -lgg" |
1038 have_video=yes | 1038 have_video=yes |
1039 fi | 1039 fi |
1040 fi | 1040 fi |
1041 } | 1041 } |
1042 | 1042 |
1062 ]) | 1062 ]) |
1063 AC_MSG_RESULT($video_svga) | 1063 AC_MSG_RESULT($video_svga) |
1064 if test x$video_svga = xyes; then | 1064 if test x$video_svga = xyes; then |
1065 AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB) | 1065 AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB) |
1066 SOURCES="$SOURCES $srcdir/src/video/svga/*.c" | 1066 SOURCES="$SOURCES $srcdir/src/video/svga/*.c" |
1067 BUILD_LIBS="$BUILD_LIBS -lvga" | 1067 BUILD_LDFLAGS="$BUILD_LDFLAGS -lvga" |
1068 have_video=yes | 1068 have_video=yes |
1069 fi | 1069 fi |
1070 fi | 1070 fi |
1071 } | 1071 } |
1072 | 1072 |
1092 ]) | 1092 ]) |
1093 AC_MSG_RESULT($video_vgl) | 1093 AC_MSG_RESULT($video_vgl) |
1094 if test x$video_vgl = xyes; then | 1094 if test x$video_vgl = xyes; then |
1095 AC_DEFINE(SDL_VIDEO_DRIVER_VGL) | 1095 AC_DEFINE(SDL_VIDEO_DRIVER_VGL) |
1096 SOURCES="$SOURCES $srcdir/src/video/vgl/*.c" | 1096 SOURCES="$SOURCES $srcdir/src/video/vgl/*.c" |
1097 BUILD_LIBS="$BUILD_LIBS -lvgl" | 1097 BUILD_LDFLAGS="$BUILD_LDFLAGS -lvgl" |
1098 have_video=yes | 1098 have_video=yes |
1099 fi | 1099 fi |
1100 fi | 1100 fi |
1101 } | 1101 } |
1102 | 1102 |
1143 ]) | 1143 ]) |
1144 AC_MSG_RESULT($video_aalib) | 1144 AC_MSG_RESULT($video_aalib) |
1145 if test x$video_aalib = xyes; then | 1145 if test x$video_aalib = xyes; then |
1146 AC_DEFINE(SDL_VIDEO_DRIVER_AALIB) | 1146 AC_DEFINE(SDL_VIDEO_DRIVER_AALIB) |
1147 SOURCES="$SOURCES $srcdir/src/video/aalib/*.c" | 1147 SOURCES="$SOURCES $srcdir/src/video/aalib/*.c" |
1148 BUILD_LIBS="$BUILD_LIBS -laa" | 1148 BUILD_LDFLAGS="$BUILD_LDFLAGS -laa" |
1149 have_video=yes | 1149 have_video=yes |
1150 fi | 1150 fi |
1151 fi | 1151 fi |
1152 } | 1152 } |
1153 | 1153 |
1242 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes) | 1242 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes) |
1243 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then | 1243 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then |
1244 video_gem=yes | 1244 video_gem=yes |
1245 AC_DEFINE(SDL_VIDEO_DRIVER_GEM) | 1245 AC_DEFINE(SDL_VIDEO_DRIVER_GEM) |
1246 SOURCES="$SOURCES $srcdir/src/video/gem/*.c" | 1246 SOURCES="$SOURCES $srcdir/src/video/gem/*.c" |
1247 BUILD_LIBS="$BUILD_LIBS -lgem" | 1247 BUILD_LDFLAGS="$BUILD_LDFLAGS -lgem" |
1248 have_video=yes | 1248 have_video=yes |
1249 fi | 1249 fi |
1250 fi | 1250 fi |
1251 } | 1251 } |
1252 | 1252 |
1302 video_opengl=yes | 1302 video_opengl=yes |
1303 ]) | 1303 ]) |
1304 AC_MSG_RESULT($video_opengl) | 1304 AC_MSG_RESULT($video_opengl) |
1305 if test x$video_opengl = xyes; then | 1305 if test x$video_opengl = xyes; then |
1306 AC_DEFINE(SDL_VIDEO_OPENGL) | 1306 AC_DEFINE(SDL_VIDEO_OPENGL) |
1307 BUILD_LIBS="$BUILD_LIBS -lGL" | 1307 BUILD_LDFLAGS="$BUILD_LDFLAGS -lGL" |
1308 fi | 1308 fi |
1309 fi | 1309 fi |
1310 } | 1310 } |
1311 | 1311 |
1312 dnl Check for Win32 OpenGL | 1312 dnl Check for Win32 OpenGL |
1321 dnl Check for BeOS OpenGL | 1321 dnl Check for BeOS OpenGL |
1322 CheckBeGL() | 1322 CheckBeGL() |
1323 { | 1323 { |
1324 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then | 1324 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then |
1325 AC_DEFINE(SDL_VIDEO_OPENGL) | 1325 AC_DEFINE(SDL_VIDEO_OPENGL) |
1326 BUILD_LIBS="$BUILD_LIBS -lGL" | 1326 BUILD_LDFLAGS="$BUILD_LDFLAGS -lGL" |
1327 fi | 1327 fi |
1328 } | 1328 } |
1329 | 1329 |
1330 dnl Check for MacOS OpenGL | 1330 dnl Check for MacOS OpenGL |
1331 CheckMacGL() | 1331 CheckMacGL() |
1332 { | 1332 { |
1333 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 |
1334 AC_DEFINE(SDL_VIDEO_OPENGL) | 1334 AC_DEFINE(SDL_VIDEO_OPENGL) |
1335 case "$target" in | 1335 case "$target" in |
1336 *-*-darwin*) | 1336 *-*-darwin*) |
1337 BUILD_LIBS="$BUILD_LIBS -framework OpenGL" | 1337 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework OpenGL" |
1338 # The following is probably not available in Darwin: | 1338 # The following is probably not available in Darwin: |
1339 BUILD_LIBS="$BUILD_LIBS -framework AGL" | 1339 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework AGL" |
1340 esac | 1340 esac |
1341 fi | 1341 fi |
1342 } | 1342 } |
1343 | 1343 |
1344 dnl Check for Mesa offscreen rendering | 1344 dnl Check for Mesa offscreen rendering |
1361 OSMESA_LIBS=`$OSMESA_CONFIG --libs` | 1361 OSMESA_LIBS=`$OSMESA_CONFIG --libs` |
1362 fi | 1362 fi |
1363 AC_DEFINE(SDL_VIDEO_OPENGL) | 1363 AC_DEFINE(SDL_VIDEO_OPENGL) |
1364 AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA) | 1364 AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA) |
1365 BUILD_CFLAGS="$BUILD_CFLAGS $OSMESA_CFLAGS" | 1365 BUILD_CFLAGS="$BUILD_CFLAGS $OSMESA_CFLAGS" |
1366 BUILD_LIBS="$BUILD_LIBS $OSMESA_LIBS" | 1366 BUILD_LDFLAGS="$BUILD_LDFLAGS $OSMESA_LIBS" |
1367 | 1367 |
1368 AC_ARG_ENABLE(osmesa-shared, | 1368 AC_ARG_ENABLE(osmesa-shared, |
1369 AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [default=yes]]), | 1369 AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [default=yes]]), |
1370 , enable_osmesa_shared=yes) | 1370 , enable_osmesa_shared=yes) |
1371 if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then | 1371 if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then |
1419 enable_input_tslib=yes | 1419 enable_input_tslib=yes |
1420 ]) | 1420 ]) |
1421 AC_MSG_RESULT($enable_input_tslib) | 1421 AC_MSG_RESULT($enable_input_tslib) |
1422 if test x$enable_input_tslib = xyes; then | 1422 if test x$enable_input_tslib = xyes; then |
1423 AC_DEFINE(SDL_INPUT_TSLIB) | 1423 AC_DEFINE(SDL_INPUT_TSLIB) |
1424 BUILD_LIBS="$BUILD_LIBS -lts" | 1424 BUILD_LDFLAGS="$BUILD_LDFLAGS -lts" |
1425 fi | 1425 fi |
1426 fi | 1426 fi |
1427 } | 1427 } |
1428 | 1428 |
1429 dnl See if we can use GNU pth library for threads | 1429 dnl See if we can use GNU pth library for threads |
1549 | 1549 |
1550 # Do futher testing if we have pthread support... | 1550 # Do futher testing if we have pthread support... |
1551 if test x$use_pthreads = xyes; then | 1551 if test x$use_pthreads = xyes; then |
1552 AC_DEFINE(SDL_THREAD_PTHREAD) | 1552 AC_DEFINE(SDL_THREAD_PTHREAD) |
1553 BUILD_CFLAGS="$BUILD_CFLAGS $pthread_cflags" | 1553 BUILD_CFLAGS="$BUILD_CFLAGS $pthread_cflags" |
1554 BUILD_LIBS="$BUILD_LIBS $pthread_lib" | 1554 BUILD_LDFLAGS="$BUILD_LDFLAGS $pthread_lib" |
1555 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags" | 1555 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags" |
1556 SDL_LIBS="$SDL_LIBS $pthread_lib" | 1556 SDL_LIBS="$SDL_LIBS $pthread_lib" |
1557 | 1557 |
1558 # Check to see if recursive mutexes are available | 1558 # Check to see if recursive mutexes are available |
1559 AC_MSG_CHECKING(for recursive mutexes) | 1559 AC_MSG_CHECKING(for recursive mutexes) |
1694 have_dlopen=yes | 1694 have_dlopen=yes |
1695 ]) | 1695 ]) |
1696 AC_MSG_RESULT($have_dlopen) | 1696 AC_MSG_RESULT($have_dlopen) |
1697 | 1697 |
1698 if test x$have_dlopen = xyes; then | 1698 if test x$have_dlopen = xyes; then |
1699 AC_CHECK_LIB(c, dlopen, BUILD_LIBS="$BUILD_LIBS", | 1699 AC_CHECK_LIB(c, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS", |
1700 AC_CHECK_LIB(dl, dlopen, BUILD_LIBS="$BUILD_LIBS -ldl", | 1700 AC_CHECK_LIB(dl, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS -ldl", |
1701 AC_CHECK_LIB(ltdl, dlopen, BUILD_LIBS="$BUILD_LIBS -lltdl"))) | 1701 AC_CHECK_LIB(ltdl, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS -lltdl"))) |
1702 AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes) | 1702 AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes) |
1703 if test x$have_dlvsym = xyes; then | 1703 if test x$have_dlvsym = xyes; then |
1704 AC_DEFINE(HAVE_DLVSYM) | 1704 AC_DEFINE(HAVE_DLVSYM) |
1705 fi | 1705 fi |
1706 AC_DEFINE(SDL_LOADSO_DLOPEN) | 1706 AC_DEFINE(SDL_LOADSO_DLOPEN) |
1720 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes) | 1720 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes) |
1721 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem) | 1721 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem) |
1722 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then | 1722 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then |
1723 AC_DEFINE(SDL_LOADSO_LDG) | 1723 AC_DEFINE(SDL_LOADSO_LDG) |
1724 SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c" | 1724 SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c" |
1725 BUILD_LIBS="$BUILD_LIBS -lldg -lgem" | 1725 BUILD_LDFLAGS="$BUILD_LDFLAGS -lldg -lgem" |
1726 have_loadso=yes | 1726 have_loadso=yes |
1727 fi | 1727 fi |
1728 fi | 1728 fi |
1729 } | 1729 } |
1730 | 1730 |
1824 AC_MSG_RESULT($have_usbhid_new) | 1824 AC_MSG_RESULT($have_usbhid_new) |
1825 | 1825 |
1826 AC_DEFINE(SDL_JOYSTICK_USBHID) | 1826 AC_DEFINE(SDL_JOYSTICK_USBHID) |
1827 SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c" | 1827 SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c" |
1828 BUILD_CFLAGS="$BUILD_CFLAGS $USB_CFLAGS" | 1828 BUILD_CFLAGS="$BUILD_CFLAGS $USB_CFLAGS" |
1829 BUILD_LIBS="$BUILD_LIBS $USB_LIBS" | 1829 BUILD_LDFLAGS="$BUILD_LDFLAGS $USB_LIBS" |
1830 have_joystick=yes | 1830 have_joystick=yes |
1831 fi | 1831 fi |
1832 CFLAGS="$save_CFLAGS" | 1832 CFLAGS="$save_CFLAGS" |
1833 fi | 1833 fi |
1834 } | 1834 } |
1841 , enable_clock_gettime=no) | 1841 , enable_clock_gettime=no) |
1842 if test x$enable_clock_gettime = xyes; then | 1842 if test x$enable_clock_gettime = xyes; then |
1843 AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) | 1843 AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes) |
1844 if test x$have_clock_gettime = xyes; then | 1844 if test x$have_clock_gettime = xyes; then |
1845 AC_DEFINE(HAVE_CLOCK_GETTIME) | 1845 AC_DEFINE(HAVE_CLOCK_GETTIME) |
1846 BUILD_LIBS="$BUILD_LIBS -lrt" | 1846 BUILD_LDFLAGS="$BUILD_LDFLAGS -lrt" |
1847 fi | 1847 fi |
1848 fi | 1848 fi |
1849 } | 1849 } |
1850 | 1850 |
1851 dnl Check for a valid linux/version.h | 1851 dnl Check for a valid linux/version.h |
1946 have_audio=yes | 1946 have_audio=yes |
1947 ;; | 1947 ;; |
1948 osf) | 1948 osf) |
1949 AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO) | 1949 AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO) |
1950 SOURCES="$SOURCES $srcdir/src/audio/mme/*.c" | 1950 SOURCES="$SOURCES $srcdir/src/audio/mme/*.c" |
1951 BUILD_LIBS="$BUILD_LIBS -lmme" | 1951 BUILD_LDFLAGS="$BUILD_LDFLAGS -lmme" |
1952 have_audio=yes | 1952 have_audio=yes |
1953 ;; | 1953 ;; |
1954 esac | 1954 esac |
1955 fi | 1955 fi |
1956 # Set up files for the joystick library | 1956 # Set up files for the joystick library |
2033 CheckPTHREAD | 2033 CheckPTHREAD |
2034 # Set up files for the audio library | 2034 # Set up files for the audio library |
2035 if test x$enable_audio = xyes; then | 2035 if test x$enable_audio = xyes; then |
2036 AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO) | 2036 AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO) |
2037 SOURCES="$SOURCES $srcdir/src/audio/nto/*.c" | 2037 SOURCES="$SOURCES $srcdir/src/audio/nto/*.c" |
2038 BUILD_LIBS="$BUILD_LIBS -lasound" | 2038 BUILD_LDFLAGS="$BUILD_LDFLAGS -lasound" |
2039 have_audio=yes | 2039 have_audio=yes |
2040 fi | 2040 fi |
2041 # Set up files for the cdrom library | 2041 # Set up files for the cdrom library |
2042 if test x$enable_cdrom = xyes; then | 2042 if test x$enable_cdrom = xyes; then |
2043 AC_DEFINE(SDL_CDROM_QNX) | 2043 AC_DEFINE(SDL_CDROM_QNX) |
2110 AC_DEFINE(SDL_LOADSO_WIN32) | 2110 AC_DEFINE(SDL_LOADSO_WIN32) |
2111 SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c" | 2111 SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c" |
2112 have_loadso=yes | 2112 have_loadso=yes |
2113 fi | 2113 fi |
2114 # Set up the system libraries we need | 2114 # Set up the system libraries we need |
2115 BUILD_LIBS="$BUILD_LIBS -luser32 -lgdi32 -lwinmm" | 2115 BUILD_LDFLAGS="$BUILD_LDFLAGS -luser32 -lgdi32 -lwinmm" |
2116 if test x$have_directx = xyes; then | 2116 if test x$have_directx = xyes; then |
2117 BUILD_LIBS="$BUILD_LIBS -ldxguid" | 2117 BUILD_LDFLAGS="$BUILD_LDFLAGS -ldxguid" |
2118 fi | 2118 fi |
2119 # The Win32 platform requires special setup | 2119 # The Win32 platform requires special setup |
2120 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" | 2120 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" |
2121 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" | 2121 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" |
2122 ;; | 2122 ;; |
2166 SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c" | 2166 SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c" |
2167 have_loadso=yes | 2167 have_loadso=yes |
2168 fi | 2168 fi |
2169 # The BeOS platform requires special setup. | 2169 # The BeOS platform requires special setup. |
2170 SOURCES="$srcdir/src/main/beos/*.cc $SOURCES" | 2170 SOURCES="$srcdir/src/main/beos/*.cc $SOURCES" |
2171 BUILD_LIBS="$BUILD_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" | 2171 BUILD_LDFLAGS="$BUILD_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" |
2172 ;; | 2172 ;; |
2173 *-*-darwin* ) | 2173 *-*-darwin* ) |
2174 # This could be either full "Mac OS X", or plain "Darwin" which is | 2174 # This could be either full "Mac OS X", or plain "Darwin" which is |
2175 # just the OS X kernel sans upper layers like Carbon and Cocoa. | 2175 # just the OS X kernel sans upper layers like Carbon and Cocoa. |
2176 # Next line is broken, and a few files below require Mac OS X (full) | 2176 # Next line is broken, and a few files below require Mac OS X (full) |
2195 fi | 2195 fi |
2196 # Set up files for the joystick library | 2196 # Set up files for the joystick library |
2197 if test x$enable_joystick = xyes; then | 2197 if test x$enable_joystick = xyes; then |
2198 AC_DEFINE(SDL_JOYSTICK_IOKIT) | 2198 AC_DEFINE(SDL_JOYSTICK_IOKIT) |
2199 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c" | 2199 SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c" |
2200 BUILD_LIBS="$BUILD_LIBS -framework IOKit" | 2200 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework IOKit" |
2201 have_joystick=yes | 2201 have_joystick=yes |
2202 fi | 2202 fi |
2203 # Set up files for the cdrom library | 2203 # Set up files for the cdrom library |
2204 if test x$enable_cdrom = xyes; then | 2204 if test x$enable_cdrom = xyes; then |
2205 AC_DEFINE(SDL_CDROM_MACOSX) | 2205 AC_DEFINE(SDL_CDROM_MACOSX) |
2221 # The MacOS X platform requires special setup. | 2221 # The MacOS X platform requires special setup. |
2222 AC_DEFINE(TARGET_API_MAC_CARBON) | 2222 AC_DEFINE(TARGET_API_MAC_CARBON) |
2223 BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings -DMACOSX" | 2223 BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings -DMACOSX" |
2224 SDL_LIBS="-lSDLmain $SDL_LIBS" | 2224 SDL_LIBS="-lSDLmain $SDL_LIBS" |
2225 if test x$enable_video_cocoa = xyes; then | 2225 if test x$enable_video_cocoa = xyes; then |
2226 BUILD_LIBS="$BUILD_LIBS -framework Cocoa" | 2226 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Cocoa" |
2227 fi | 2227 fi |
2228 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then | 2228 if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then |
2229 # The Cocoa backend still needs Carbon, and the YUV code QuickTime | 2229 # The Cocoa backend still needs Carbon, and the YUV code QuickTime |
2230 BUILD_LIBS="$BUILD_LIBS -framework QuickTime -framework ApplicationServices" | 2230 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework QuickTime -framework ApplicationServices" |
2231 BUILD_LIBS="$BUILD_LIBS -framework Carbon" | 2231 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Carbon" |
2232 fi | 2232 fi |
2233 # If either the audio or CD driver is used, add the AudioUnit framework | 2233 # If either the audio or CD driver is used, add the AudioUnit framework |
2234 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then | 2234 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then |
2235 BUILD_LIBS="$BUILD_LIBS -framework AudioToolbox -framework AudioUnit" | 2235 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework AudioToolbox -framework AudioUnit" |
2236 fi | 2236 fi |
2237 ;; | 2237 ;; |
2238 *-*-mint*) | 2238 *-*-mint*) |
2239 ARCH=mint | 2239 ARCH=mint |
2240 CheckDummyVideo | 2240 CheckDummyVideo |
2301 AC_DEFINE(SDL_TIMER_RISCOS) | 2301 AC_DEFINE(SDL_TIMER_RISCOS) |
2302 SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c" | 2302 SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c" |
2303 have_timers=yes | 2303 have_timers=yes |
2304 fi | 2304 fi |
2305 # The RISC OS platform requires special setup. | 2305 # The RISC OS platform requires special setup. |
2306 BUILD_LIBS="$BUILD_LIBS -ljpeg -ltiff -lpng -lz" | 2306 BUILD_LDFLAGS="$BUILD_LDFLAGS -ljpeg -ltiff -lpng -lz" |
2307 ;; | 2307 ;; |
2308 *) | 2308 *) |
2309 AC_MSG_ERROR([ | 2309 AC_MSG_ERROR([ |
2310 *** Unsupported target: Please add to configure.in | 2310 *** Unsupported target: Please add to configure.in |
2311 ]) | 2311 ]) |
2431 AC_SUBST(ac_aux_dir) | 2431 AC_SUBST(ac_aux_dir) |
2432 AC_SUBST(INCLUDE) | 2432 AC_SUBST(INCLUDE) |
2433 AC_SUBST(SOURCES) | 2433 AC_SUBST(SOURCES) |
2434 AC_SUBST(OBJECTS) | 2434 AC_SUBST(OBJECTS) |
2435 AC_SUBST(BUILD_CFLAGS) | 2435 AC_SUBST(BUILD_CFLAGS) |
2436 AC_SUBST(BUILD_LIBS) | 2436 AC_SUBST(BUILD_LDFLAGS) |
2437 | 2437 |
2438 AC_OUTPUT([ | 2438 AC_OUTPUT([ |
2439 Makefile sdl-config SDL.spec SDL.qpg | 2439 Makefile sdl-config SDL.spec SDL.qpg |
2440 ], [ | 2440 ], [ |
2441 : >build-deps | 2441 : >build-deps |