the small playstation sound emulator

configure.ac 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT([upse], [1.9.1], [nenolod+upse@sacredspiral.co.uk])
  3. AC_PREREQ([2.59])
  4. AC_CANONICAL_HOST
  5. AC_CANONICAL_TARGET
  6. AC_CONFIG_HEADERS([config.h])
  7. dnl libbeep
  8. LIBBEEP_MAJOR_VERSION=2
  9. LIBBEEP_MINOR_VERSION=0
  10. LIBBEEP_MICRO_VERSION=0
  11. LIBBEEP_VERSION=$LIBBEEP_MAJOR_VERSION.$LIBBEEP_MINOR_VERSION.$LIBBEEP_MICRO_VERSION
  12. AC_SUBST(LIBBEEP_MAJOR_VERSION)
  13. AC_SUBST(LIBBEEP_MINOR_VERSION)
  14. AC_SUBST(LIBBEEP_MICRO_VERSION)
  15. dnl XXX kludge for FreeBSD
  16. if test -d "/usr/X11R6/include"; then
  17. CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
  18. fi
  19. dnl append audacious header path to CPPFLAGS when --prefix is specified.
  20. if test "$prefix" != "NONE" ; then
  21. CPPFLAGS="$CPPFLAGS -I${includedir}"
  22. fi
  23. dnl OMK bootstrap
  24. AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])
  25. AC_SUBST([VERSION], [AC_PACKAGE_VERSION])
  26. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  27. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])
  28. dnl Check for C compiler
  29. AC_PROG_CC
  30. AC_PROG_CXX
  31. AC_ISC_POSIX
  32. AC_C_BIGENDIAN
  33. if test x"$GCC" = x"yes"; then
  34. CFLAGS="$CFLAGS -pipe -Wall"
  35. CXXFLAGS="$CXXFLAGS -pipe -Wall"
  36. fi
  37. dnl Locate a program and check that its version is acceptable.
  38. dnl AC_PROG_CHECK_VER(var, namelist, version-switch,
  39. dnl [version-extract-regexp], version-glob [, do-if-fail])
  40. AC_DEFUN([AC_CHECK_PROG_VER],
  41. [AC_CHECK_PROGS([$1], [$2])
  42. if test -z "[$]$1"; then
  43. ac_verc_fail=yes
  44. else
  45. # Found it, now check the version.
  46. AC_MSG_CHECKING([version of [$]$1])
  47. changequote(<<,>>)dnl
  48. ac_prog_version=`<<$>>$1 $3 2>&1 ifelse(<<$4>>,,,
  49. <<| sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'>>)`
  50. case $ac_prog_version in
  51. '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
  52. <<$5>>)
  53. changequote([,])dnl
  54. ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
  55. *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
  56. esac
  57. AC_MSG_RESULT([$ac_prog_version])
  58. fi
  59. ifelse([$6],,,
  60. [if test $ac_verc_fail = yes; then
  61. $6
  62. fi])
  63. ])
  64. GCC42_CFLAGS="-fgnu89-inline"
  65. AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
  66. [version \([egcygnustpi-]*[0-9.]*\)], [4.[2-9]* ],
  67. GCC42_CFLAGS="")
  68. dnl Check for assembler
  69. AM_PROG_AS
  70. dnl Checks for various programs
  71. AC_PROG_LN_S
  72. AC_PROG_MAKE_SET
  73. AC_PATH_PROG(RM, rm)
  74. AC_PATH_PROG(MV, mv)
  75. AC_PATH_PROG(CP, cp)
  76. AC_PATH_PROG(AR, ar)
  77. AC_PATH_PROG(RANLIB, ranlib)
  78. dnl Gettext -nenolod
  79. AM_GNU_GETTEXT([external])
  80. dnl Path settings
  81. dnl Check for Audacious
  82. UPSE_TARGET_AUD=""
  83. AC_ARG_ENABLE(audplugin,
  84. [ --enable-audplugin enable audacious plugin (default=yes)],
  85. audplugin=$enableval, audplugin=yes)
  86. if test "x$audplugin" == "xyes"; then
  87. PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 1.3.99],
  88. [UPSE_TARGET_AUD="upse-audacious"
  89. audplugin="yes"],
  90. [audplugin="no"]
  91. )
  92. fi
  93. AC_SUBST(UPSE_TARGET_AUD)
  94. AC_ARG_ENABLE(ao,
  95. [ --enable-ao enable libao support (default=yes)],
  96. ao=$enableval, ao=yes)
  97. if test "x$ao" == "xyes"; then
  98. PKG_CHECK_MODULES(AO, [ao],
  99. [AC_DEFINE(HAVE_AO, 1, [Define this if you have AO.])],
  100. [ao="no"]
  101. )
  102. fi
  103. BUILDSYS_SHARED_LIB
  104. BUILDSYS_PROG_IMPLIB
  105. CFLAGS="$CFLAGS $EXTRA_CFLAGS"
  106. AC_CONFIG_FILES([
  107. buildsys.mk
  108. extra.mk
  109. ])
  110. AC_OUTPUT
  111. echo
  112. echo "Features:"
  113. echo
  114. echo " upse123: yes"
  115. echo " + libao support: $ao"
  116. echo " audacious 1.4 plugin: $audplugin"
  117. echo
  118. echo "Type make to compile, and make install to install."
  119. echo