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.
 
 
 
 
 
 

80 righe
1.9 KiB

  1. # $Id: configure.ac 253 2004-08-09 20:08:52Z sam $
  2. AC_INIT(src/main.c)
  3. AC_PREREQ(2.50)
  4. AC_CONFIG_AUX_DIR(autotools)
  5. AC_CANONICAL_SYSTEM
  6. AM_INIT_AUTOMAKE(pwntcha, 0.3)
  7. AM_CONFIG_HEADER(config.h)
  8. AC_PROG_CC
  9. AM_PROG_CC_C_O
  10. AC_PROG_CXX
  11. AC_STDC_HEADERS
  12. AC_C_CONST
  13. AC_C_INLINE
  14. AC_TYPE_SIZE_T
  15. AC_CHECK_FUNCS(getopt_long)
  16. # Use Windows?
  17. AC_CHECK_HEADERS(olectl.h,
  18. [ac_cv_my_have_ole="yes"],
  19. [ac_cv_my_have_ole="no"])
  20. CPPFLAGS="${save_CPPFLAGS}"
  21. AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
  22. # Use SDL?
  23. ac_cv_my_have_sdl="no"
  24. save_CPPFLAGS="${CPPFLAGS}"
  25. AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
  26. if test "${SDL_CONFIG}" != "no"; then
  27. CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
  28. fi
  29. AC_CHECK_HEADERS(SDL_image.h,
  30. [ac_cv_my_have_sdl="yes"],
  31. [ac_cv_my_have_sdl="no"])
  32. CPPFLAGS="${save_CPPFLAGS}"
  33. AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
  34. # Use OpenCV?
  35. ac_cv_my_have_opencv="no"
  36. save_CPPFLAGS="${CPPFLAGS}"
  37. AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
  38. if test "${OPENCV_CONFIG}" != "no"; then
  39. CPPFLAGS="${CPPFLAGS} `opencv-config --cflags`"
  40. fi
  41. AC_CHECK_HEADERS(cv.h,
  42. [ac_cv_my_have_opencv="yes"],
  43. [ac_cv_my_have_opencv="no"])
  44. CPPFLAGS="${save_CPPFLAGS}"
  45. AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
  46. # Use Imlib2?
  47. ac_cv_my_have_imlib2="no"
  48. save_CPPFLAGS="${CPPFLAGS}"
  49. AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
  50. if test "${IMLIB2_CONFIG}" != "no"; then
  51. CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
  52. fi
  53. AC_CHECK_HEADERS(Imlib2.h,
  54. [ac_cv_my_have_imlib2="yes"],
  55. [ac_cv_my_have_imlib2="no"])
  56. CPPFLAGS="${save_CPPFLAGS}"
  57. AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
  58. if test "${ac_cv_my_have_sdl}" = "yes" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no"; then
  59. AC_MSG_ERROR([[cannot find SDL_Image, Imlib2 or OpenCV, please install one of them]])
  60. fi
  61. AC_OUTPUT([
  62. Makefile
  63. src/Makefile
  64. extras/Makefile
  65. share/Makefile
  66. ])