Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

113 righe
3.1 KiB

  1. # $Id$
  2. AC_INIT(libpipi, 0.0)
  3. AC_CONFIG_AUX_DIR(.auto)
  4. AM_INIT_AUTOMAKE([no-define tar-ustar])
  5. dnl AM_MAINTAINER_MODE
  6. AM_CONFIG_HEADER(config.h)
  7. AM_PROG_CC_C_O
  8. AC_PROG_CPP
  9. LT_MAJOR="0"
  10. LT_MINOR="99"
  11. LT_MICRO="13"
  12. AC_SUBST(LT_MAJOR)
  13. AC_SUBST(LT_MINOR)
  14. AC_SUBST(LT_MICRO)
  15. LT_VERSION="$LT_MAJOR:$LT_MINOR:$LT_MICRO"
  16. AC_SUBST(LT_VERSION)
  17. AC_LIBTOOL_WIN32_DLL
  18. AM_PROG_LIBTOOL
  19. AC_LIBTOOL_CXX
  20. AC_C_CONST
  21. AC_C_INLINE
  22. AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h getopt.h)
  23. ac_cv_have_getopt_long="no"
  24. AC_CHECK_FUNCS(getopt_long,
  25. [ac_cv_have_getopt_long="yes"],
  26. [AC_CHECK_LIB(gnugetopt, getopt_long,
  27. [ac_cv_have_getopt_long="yes"
  28. GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])])
  29. if test "$ac_cv_have_getopt_long" != "no"; then
  30. AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)
  31. fi
  32. AM_CONDITIONAL(NEED_GETOPT_LONG, test "$ac_cv_have_getopt_long" = "no")
  33. AC_SUBST(GETOPT_LIBS)
  34. # Optimizations
  35. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  36. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  37. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  38. # Use DevIL?
  39. #AC_CHECK_HEADERS(IL/il.h,
  40. # [ac_cv_my_have_il="yes"],
  41. # [ac_cv_my_have_il="no"])
  42. #CPPFLAGS="${save_CPPFLAGS}"
  43. #AM_CONDITIONAL(USE_IL, test "${ac_cv_my_have_il}" = "yes")
  44. # Use Windows?
  45. #AC_CHECK_HEADERS(olectl.h,
  46. # [ac_cv_my_have_ole="yes"],
  47. # [ac_cv_my_have_ole="no"])
  48. #CPPFLAGS="${save_CPPFLAGS}"
  49. #AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
  50. # Use SDL?
  51. ac_cv_my_have_sdl="no"
  52. save_CPPFLAGS="${CPPFLAGS}"
  53. AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
  54. if test "${SDL_CONFIG}" != "no"; then
  55. CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
  56. fi
  57. AC_CHECK_HEADERS(SDL_image.h,
  58. [ac_cv_my_have_sdl="yes"],
  59. [ac_cv_my_have_sdl="no"])
  60. CPPFLAGS="${save_CPPFLAGS}"
  61. if test "${ac_cv_my_have_sdl}" != "no"; then
  62. AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL_image)
  63. fi
  64. AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
  65. # Use OpenCV?
  66. ac_cv_my_have_opencv="no"
  67. OPENCV="no"
  68. PKG_CHECK_MODULES(OPENCV, opencv, [ac_cv_my_have_opencv="yes"])
  69. if test "${ac_cv_my_have_opencv}" != "no"; then
  70. AC_DEFINE(USE_OPENCV, 1, Define to 1 to use OpenCV)
  71. fi
  72. AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
  73. # Use Imlib2?
  74. ac_cv_my_have_imlib2="no"
  75. IMLIB2="no"
  76. PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"])
  77. if test "${ac_cv_my_have_imlib2}" != "no"; then
  78. AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
  79. fi
  80. AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
  81. if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no"; then
  82. AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]])
  83. fi
  84. AC_CONFIG_FILES([
  85. Makefile
  86. pipi/Makefile
  87. src/Makefile
  88. genethumb/Makefile
  89. examples/Makefile
  90. test/Makefile
  91. ])
  92. AC_CONFIG_FILES([
  93. pipi/pipi.pc
  94. ])
  95. AC_OUTPUT