configure.in 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT
  3. AC_PREREQ(2.63)
  4. AC_CONFIG_SRCDIR([Makefile.am])
  5. AM_INIT_AUTOMAKE(libmodplug, 0.8.8.4)
  6. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
  7. AC_CONFIG_HEADERS([src/config.h])
  8. dnl Checks for programs.
  9. dnl I am disabling static libraries here because otherwise libtool insists on
  10. dnl compiling everything twice -- once with and once without -fPIC. Pisses me
  11. dnl off. Just do everything with -fPIC, damnit! Compiling everything twice
  12. dnl probably wastes more cycles than not using -fPIC saves.
  13. AC_DISABLE_STATIC
  14. AC_DISABLE_STATIC([])
  15. AC_PROG_CC
  16. AC_PROG_CXX
  17. AC_LANG([C++])
  18. AC_C_BIGENDIAN #this will cause problems when cross-compiling...
  19. #AC_REQUIRE([AC_CANONICAL_HOST])_LT_SET_OPTION([LT_INIT],[win32-dll])
  20. #AC_DIAGNOSE([obsolete],[AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
  21. #put the `win32-dll' option into LT_INIT's first parameter.])
  22. LT_INIT
  23. AC_HEADER_STDC
  24. AC_CHECK_HEADERS([inttypes.h stdint.h malloc.h])
  25. AC_CHECK_FUNCS(setenv sinf)
  26. CXXFLAGS="$CXXFLAGS -fno-exceptions -Wall -ffast-math -D_REENTRANT"
  27. # CXXFLAGS="-fno-exceptions -g -Wall -ffast-math -D_REENTRANT `glib-config --cflags`"
  28. AC_CANONICAL_HOST
  29. case "$host" in
  30. *mingw* | *cygwin*)
  31. LT_LDFLAGS="-no-undefined"
  32. ;;
  33. *)
  34. LT_LDFLAGS=""
  35. ;;
  36. esac
  37. AC_SUBST(LT_LDFLAGS)
  38. case ${target_os} in
  39. *sun* | *solaris*)
  40. CXXFLAGS="$CXXFLAGS -fpermissive"
  41. ;;
  42. esac
  43. # portable types. requires autoconf 2.60
  44. # `configure' will check if these are defined in system headers.
  45. # if not, it will auto-detect and define them in `config.h'
  46. AC_TYPE_INT8_T
  47. AC_TYPE_UINT8_T
  48. AC_TYPE_INT16_T
  49. AC_TYPE_UINT16_T
  50. AC_TYPE_INT32_T
  51. AC_TYPE_UINT32_T
  52. AC_TYPE_INT64_T
  53. AC_TYPE_UINT64_T
  54. MODPLUG_LIBRARY_VERSION=1:0:0
  55. AC_SUBST(MODPLUG_LIBRARY_VERSION)
  56. AC_CONFIG_FILES([Makefile
  57. src/Makefile
  58. libmodplug.pc])
  59. AC_OUTPUT