You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

100 lines
2.6 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)
  23. # Optimizations
  24. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  25. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  26. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  27. # Use DevIL?
  28. #AC_CHECK_HEADERS(IL/il.h,
  29. # [ac_cv_my_have_il="yes"],
  30. # [ac_cv_my_have_il="no"])
  31. #CPPFLAGS="${save_CPPFLAGS}"
  32. #AM_CONDITIONAL(USE_IL, test "${ac_cv_my_have_il}" = "yes")
  33. # Use Windows?
  34. #AC_CHECK_HEADERS(olectl.h,
  35. # [ac_cv_my_have_ole="yes"],
  36. # [ac_cv_my_have_ole="no"])
  37. #CPPFLAGS="${save_CPPFLAGS}"
  38. #AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
  39. # Use SDL?
  40. ac_cv_my_have_sdl="no"
  41. save_CPPFLAGS="${CPPFLAGS}"
  42. AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
  43. if test "${SDL_CONFIG}" != "no"; then
  44. CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
  45. fi
  46. AC_CHECK_HEADERS(SDL_image.h,
  47. [ac_cv_my_have_sdl="yes"],
  48. [ac_cv_my_have_sdl="no"])
  49. CPPFLAGS="${save_CPPFLAGS}"
  50. AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
  51. # Use OpenCV?
  52. ac_cv_my_have_opencv="no"
  53. save_CPPFLAGS="${CPPFLAGS}"
  54. AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
  55. if test "${OPENCV_CONFIG}" != "no"; then
  56. CPPFLAGS="${CPPFLAGS} `opencv-config --cflags`"
  57. fi
  58. AC_CHECK_HEADERS(cv.h,
  59. [ac_cv_my_have_opencv="yes"],
  60. [ac_cv_my_have_opencv="no"])
  61. CPPFLAGS="${save_CPPFLAGS}"
  62. AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
  63. # Use Imlib2?
  64. ac_cv_my_have_imlib2="no"
  65. IMLIB2="no"
  66. PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"])
  67. AC_MSG_RESULT($ac_cv_my_have_imlib2)
  68. if test "${ac_cv_my_have_imlib2}" != "no"; then
  69. AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
  70. fi
  71. AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
  72. 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
  73. AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]])
  74. fi
  75. AC_CONFIG_FILES([
  76. Makefile
  77. pipi/Makefile
  78. genethumb/Makefile
  79. ])
  80. AC_CONFIG_FILES([
  81. pipi/pipi.pc
  82. ])
  83. AC_OUTPUT