comparison configure.in @ 294:d2d48e10f370

Added a new header file: SDL_loadso.h It contains the following functions: SDL_LoadObject(), SDL_LoadFunction(), SDL_UnloadObject() The UNIX esd and arts audio code use these to dynamically load their respective audio libraries.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 06 Mar 2002 05:20:11 +0000
parents eadc0746dfaf
children 54ad1d2f1325
comparison
equal deleted inserted replaced
293:585a7e1285ae 294:d2d48e10f370
322 { 322 {
323 AC_ARG_ENABLE(esd, 323 AC_ARG_ENABLE(esd,
324 [ --enable-esd support the Enlightened Sound Daemon [default=yes]], 324 [ --enable-esd support the Enlightened Sound Daemon [default=yes]],
325 , enable_esd=yes) 325 , enable_esd=yes)
326 if test x$enable_audio = xyes -a x$enable_esd = xyes; then 326 if test x$enable_audio = xyes -a x$enable_esd = xyes; then
327 AM_PATH_ESD(0.2.8, [ 327 use_esd=no
328 CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS" 328 AM_PATH_ESD(0.2.8, use_esd=yes)
329 SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS" 329 if test x$use_esd = xyes; then
330 AC_ARG_ENABLE(esd-shared,
331 [ --enable-esd-shared dynamically load ESD support [default=yes]],
332 , enable_esd_shared=yes)
333 esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
334 esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
335 echo "-- $esd_lib_spec -> $esd_lib"
336 if test x$enable_dlopen = xyes && \
337 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
338 CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
339 AC_SUBST(esd_lib)
340 else
341 CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
342 SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
343 fi
330 AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd" 344 AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
331 AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la" 345 AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
332 ]) 346 fi
333 fi 347 fi
334 } 348 }
335 349
336 CheckARTSC() 350 CheckARTSC()
337 { 351 {
357 audio_arts=yes 371 audio_arts=yes
358 ]) 372 ])
359 CFLAGS="$save_CFLAGS" 373 CFLAGS="$save_CFLAGS"
360 AC_MSG_RESULT($audio_arts) 374 AC_MSG_RESULT($audio_arts)
361 if test x$audio_arts = xyes; then 375 if test x$audio_arts = xyes; then
362 CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS" 376 AC_ARG_ENABLE(arts-shared,
363 SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS" 377 [ --enable-arts-shared dynamically load ESD support [default=yes]],
378 , enable_arts_shared=yes)
379 arts_lib_spec=`echo $ARTSC_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libarts.so.*/'`
380 arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
381 echo "-- $arts_lib_spec -> $arts_lib"
382 if test x$enable_dlopen = xyes && \
383 test x$enable_arts_shared = xyes && test x$arts_lib != x; then
384 CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
385 AC_SUBST(arts_lib)
386 else
387 CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
388 SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
389 fi
364 AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts" 390 AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
365 AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la" 391 AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
366 fi 392 fi
367 fi 393 fi
368 fi 394 fi
1351 -DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz" 1377 -DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
1352 VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz" 1378 VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
1353 VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la" 1379 VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
1354 } 1380 }
1355 1381
1382 dnl Check for the dlfcn.h interface for dynamically loading objects
1383 CheckDLOPEN()
1384 {
1385 AC_ARG_ENABLE(dlopen,
1386 [ --enable-dlopen use dlopen for shared object loading [default=yes]],
1387 , enable_dlopen=yes)
1388 if test x$enable_dlopen = xyes; then
1389 AC_MSG_CHECKING(for dlopen)
1390 use_dlopen=no
1391 AC_TRY_COMPILE([
1392 #include <dlfcn.h>
1393 ],[
1394 ],[
1395 use_dlopen=yes
1396 ])
1397 AC_MSG_RESULT($use_dlopen)
1398
1399 if test x$use_dlopen = xyes; then
1400 CFLAGS="$CFLAGS -DUSE_DLOPEN"
1401 SYSTEM_LIBS="$SYSTEM_LIBS -ldl"
1402 fi
1403 fi
1404 }
1405
1356 case "$target" in 1406 case "$target" in
1357 *-*-linux*) 1407 *-*-linux*)
1358 ARCH=linux 1408 ARCH=linux
1359 CheckDummyVideo 1409 CheckDummyVideo
1360 CheckDiskAudio 1410 CheckDiskAudio
1411 CheckDLOPEN
1361 CheckNASM 1412 CheckNASM
1362 CheckOSS 1413 CheckOSS
1363 CheckALSA 1414 CheckALSA
1364 CheckARTSC 1415 CheckARTSC
1365 CheckESD 1416 CheckESD
1427 ;; 1478 ;;
1428 *-*-bsdi*) 1479 *-*-bsdi*)
1429 ARCH=bsdi 1480 ARCH=bsdi
1430 CheckDummyVideo 1481 CheckDummyVideo
1431 CheckDiskAudio 1482 CheckDiskAudio
1483 CheckDLOPEN
1432 CheckNASM 1484 CheckNASM
1433 CheckOSS 1485 CheckOSS
1434 CheckARTSC 1486 CheckARTSC
1435 CheckESD 1487 CheckESD
1436 CheckNAS 1488 CheckNAS
1478 ;; 1530 ;;
1479 *-*-freebsd*) 1531 *-*-freebsd*)
1480 ARCH=freebsd 1532 ARCH=freebsd
1481 CheckDummyVideo 1533 CheckDummyVideo
1482 CheckDiskAudio 1534 CheckDiskAudio
1535 CheckDLOPEN
1483 CheckVGL 1536 CheckVGL
1484 CheckNASM 1537 CheckNASM
1485 CheckOSS 1538 CheckOSS
1486 CheckARTSC 1539 CheckARTSC
1487 CheckESD 1540 CheckESD
1533 ;; 1586 ;;
1534 *-*-netbsd*) 1587 *-*-netbsd*)
1535 ARCH=netbsd 1588 ARCH=netbsd
1536 CheckDummyVideo 1589 CheckDummyVideo
1537 CheckDiskAudio 1590 CheckDiskAudio
1591 CheckDLOPEN
1538 CheckNASM 1592 CheckNASM
1539 CheckOSS 1593 CheckOSS
1540 CheckARTSC 1594 CheckARTSC
1541 CheckESD 1595 CheckESD
1542 CheckNAS 1596 CheckNAS
1586 ;; 1640 ;;
1587 *-*-openbsd*) 1641 *-*-openbsd*)
1588 ARCH=openbsd 1642 ARCH=openbsd
1589 CheckDummyVideo 1643 CheckDummyVideo
1590 CheckDiskAudio 1644 CheckDiskAudio
1645 CheckDLOPEN
1591 CheckOPENBSDAUDIO 1646 CheckOPENBSDAUDIO
1592 CheckNASM 1647 CheckNASM
1593 CheckOSS 1648 CheckOSS
1594 CheckARTSC 1649 CheckARTSC
1595 CheckESD 1650 CheckESD
1645 ;; 1700 ;;
1646 *-*-sysv5*) 1701 *-*-sysv5*)
1647 ARCH=sysv5 1702 ARCH=sysv5
1648 CheckDummyVideo 1703 CheckDummyVideo
1649 CheckDiskAudio 1704 CheckDiskAudio
1705 CheckDLOPEN
1650 CheckNASM 1706 CheckNASM
1651 CheckOSS 1707 CheckOSS
1652 CheckARTSC 1708 CheckARTSC
1653 CheckESD 1709 CheckESD
1654 CheckNAS 1710 CheckNAS
1694 *-*-solaris*) 1750 *-*-solaris*)
1695 ARCH=solaris 1751 ARCH=solaris
1696 CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86 1752 CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
1697 CheckDummyVideo 1753 CheckDummyVideo
1698 CheckDiskAudio 1754 CheckDiskAudio
1755 CheckDLOPEN
1699 CheckNASM 1756 CheckNASM
1700 CheckOSS 1757 CheckOSS
1701 CheckARTSC 1758 CheckARTSC
1702 CheckESD 1759 CheckESD
1703 CheckNAS 1760 CheckNAS
1742 ;; 1799 ;;
1743 *-*-irix*) 1800 *-*-irix*)
1744 ARCH=irix 1801 ARCH=irix
1745 CheckDummyVideo 1802 CheckDummyVideo
1746 CheckDiskAudio 1803 CheckDiskAudio
1804 CheckDLOPEN
1747 CheckDMEDIA 1805 CheckDMEDIA
1748 CheckESD 1806 CheckESD
1749 CheckNAS 1807 CheckNAS
1750 CheckX11 1808 CheckX11
1751 CheckAAlib 1809 CheckAAlib
1804 ;; 1862 ;;
1805 *-*-hpux*) 1863 *-*-hpux*)
1806 ARCH=hpux 1864 ARCH=hpux
1807 CheckDummyVideo 1865 CheckDummyVideo
1808 CheckDiskAudio 1866 CheckDiskAudio
1867 CheckDLOPEN
1809 CheckOSS 1868 CheckOSS
1810 CheckNAS 1869 CheckNAS
1811 CheckX11 1870 CheckX11
1812 CheckGGI 1871 CheckGGI
1813 CheckAAlib 1872 CheckAAlib
1851 ;; 1910 ;;
1852 *-*-aix*) 1911 *-*-aix*)
1853 ARCH=aix 1912 ARCH=aix
1854 CheckDummyVideo 1913 CheckDummyVideo
1855 CheckDiskAudio 1914 CheckDiskAudio
1915 CheckDLOPEN
1856 CheckOSS 1916 CheckOSS
1857 CheckNAS 1917 CheckNAS
1858 CheckX11 1918 CheckX11
1859 CheckGGI 1919 CheckGGI
1860 CheckAAlib 1920 CheckAAlib
1896 ;; 1956 ;;
1897 *-*-osf*) 1957 *-*-osf*)
1898 ARCH=osf 1958 ARCH=osf
1899 CheckDummyVideo 1959 CheckDummyVideo
1900 CheckDiskAudio 1960 CheckDiskAudio
1961 CheckDLOPEN
1901 CheckNAS 1962 CheckNAS
1902 CheckX11 1963 CheckX11
1903 CheckGGI 1964 CheckGGI
1904 CheckAAlib 1965 CheckAAlib
1905 CheckOpenGL 1966 CheckOpenGL
1942 ;; 2003 ;;
1943 *-*-qnx*) 2004 *-*-qnx*)
1944 ARCH=qnx 2005 ARCH=qnx
1945 CheckDummyVideo 2006 CheckDummyVideo
1946 CheckDiskAudio 2007 CheckDiskAudio
2008 CheckDLOPEN
1947 CheckNAS 2009 CheckNAS
1948 CheckPHOTON 2010 CheckPHOTON
1949 CheckX11 2011 CheckX11
1950 CheckOpenGL 2012 CheckOpenGL
1951 CheckPTHREAD 2013 CheckPTHREAD