Show
Ignore:
Timestamp:
05/27/06 10:35:24 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure.in

    r4058 r4091  
    14811481AC_SYS_LARGEFILE 
    14821482 
     1483 
     1484dnl This function defintion taken from Gnome 2.0 
     1485dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) 
     1486dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page 
     1487dnl also defines GSTUFF_PKG_ERRORS on error 
     1488AC_DEFUN([PKG_CHECK_MODULES], [ 
     1489  succeeded=no 
     1490 
     1491  if test -z "$PKG_CONFIG"; then 
     1492    AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 
     1493  fi 
     1494 
     1495  if test "$PKG_CONFIG" = "no" ; then 
     1496     ifelse([$4], , [AC_MSG_ERROR([ 
     1497      *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog.  Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])], [$4]) 
     1498  else 
     1499     PKG_CONFIG_MIN_VERSION=0.9.0 
     1500     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then 
     1501        AC_MSG_CHECKING(for $2) 
     1502 
     1503        if $PKG_CONFIG --exists "$2" ; then 
     1504            AC_MSG_RESULT(yes) 
     1505            succeeded=yes 
     1506 
     1507            AC_MSG_CHECKING($1_CFLAGS) 
     1508            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` 
     1509            AC_MSG_RESULT($$1_CFLAGS) 
     1510 
     1511            AC_MSG_CHECKING($1_LIBS) 
     1512            $1_LIBS=`$PKG_CONFIG --libs "$2"` 
     1513            AC_MSG_RESULT($$1_LIBS) 
     1514        else 
     1515            AC_MSG_RESULT(no) 
     1516            $1_CFLAGS="" 
     1517            $1_LIBS="" 
     1518            ## If we have a custom action on failure, don't print errors, but 
     1519            ## do set a variable so people can do so. 
     1520            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 
     1521            ifelse([$4], ,echo $$1_PKG_ERRORS,) 
     1522        fi 
     1523 
     1524        AC_SUBST($1_CFLAGS) 
     1525        AC_SUBST($1_LIBS) 
     1526     else 
     1527        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." 
     1528        echo "*** See http://www.freedesktop.org/software/pkgconfig" 
     1529     fi 
     1530  fi 
     1531 
     1532  if test $succeeded = yes; then 
     1533     ifelse([$3], , :, [$3]) 
     1534  else 
     1535     ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) 
     1536  fi 
     1537]) 
     1538 
     1539 
    14831540if test "${with_sound}" != "no"; then 
    14841541  # Sound support for GNU/Linux and the free BSDs. 
     
    14871544  AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) 
    14881545  AC_SUBST(LIBSOUND) 
     1546 
     1547  ALSA_REQUIRED=1.0.0 
     1548  ALSA_MODULES="alsa >= $ALSA_REQUIRED" 
     1549  dnl Check if --with-pkg-config-prog has been given. 
     1550  if test "X${with_pkg_config_prog}" != X; then 
     1551    PKG_CONFIG="${with_pkg_config_prog}" 
     1552  fi 
     1553  PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) 
     1554  if test $HAVE_ALSA = yes; then 
     1555    LIBSOUND="$LIBSOUND $ALSA_LIBS" 
     1556    CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" 
     1557    AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) 
     1558  fi 
     1559  AC_SUBST(CFLAGS_SOUND) 
    14891560fi 
    14901561 
     
    19432014  fi 
    19442015fi 
    1945  
    1946 dnl This function defintion taken from Gnome 2.0 
    1947 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) 
    1948 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page 
    1949 dnl also defines GSTUFF_PKG_ERRORS on error 
    1950 AC_DEFUN([PKG_CHECK_MODULES], [ 
    1951   succeeded=no 
    1952  
    1953   if test -z "$PKG_CONFIG"; then 
    1954     AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 
    1955   fi 
    1956  
    1957   if test "$PKG_CONFIG" = "no" ; then 
    1958      echo "*** The pkg-config script could not be found. Make sure it is" 
    1959      echo "*** in your path, or give the full path to pkg-config with" 
    1960      echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog." 
    1961      echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." 
    1962   else 
    1963      PKG_CONFIG_MIN_VERSION=0.9.0 
    1964      if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then 
    1965         AC_MSG_CHECKING(for $2) 
    1966  
    1967         if $PKG_CONFIG --exists "$2" ; then 
    1968             AC_MSG_RESULT(yes) 
    1969             succeeded=yes 
    1970  
    1971             AC_MSG_CHECKING($1_CFLAGS) 
    1972             $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` 
    1973             AC_MSG_RESULT($$1_CFLAGS) 
    1974  
    1975             AC_MSG_CHECKING($1_LIBS) 
    1976             $1_LIBS=`$PKG_CONFIG --libs "$2"` 
    1977             AC_MSG_RESULT($$1_LIBS) 
    1978         else 
    1979             $1_CFLAGS="" 
    1980             $1_LIBS="" 
    1981             ## If we have a custom action on failure, don't print errors, but 
    1982             ## do set a variable so people can do so. 
    1983             $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 
    1984             ifelse([$4], ,echo $$1_PKG_ERRORS,) 
    1985         fi 
    1986  
    1987         AC_SUBST($1_CFLAGS) 
    1988         AC_SUBST($1_LIBS) 
    1989      else 
    1990         echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." 
    1991         echo "*** See http://www.freedesktop.org/software/pkgconfig" 
    1992      fi 
    1993   fi 
    1994  
    1995   if test $succeeded = yes; then 
    1996      ifelse([$3], , :, [$3]) 
    1997   else 
    1998      ifelse([$4], , [AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) 
    1999   fi 
    2000 ]) 
    20012016 
    20022017HAVE_GTK=no 
     
    29182933#define HAVE_SOUND 1 
    29192934#endif 
     2935#ifdef HAVE_ALSA 
     2936#define HAVE_SOUND 1 
     2937#endif 
    29202938#endif /* __FreeBSD__ || __NetBSD__ || __linux__  */ 
    29212939