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.
 
 
 
 
 
 

73 righe
1.7 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.2)
  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 SDL?
  17. ac_cv_my_have_sdl="no"
  18. save_CPPFLAGS="${CPPFLAGS}"
  19. AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
  20. if test "${SDL_CONFIG}" != "no"; then
  21. CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
  22. fi
  23. AC_CHECK_HEADERS(SDL_image.h,
  24. [ac_cv_my_have_sdl="yes"],
  25. [ac_cv_my_have_sdl="no"])
  26. CPPFLAGS="${save_CPPFLAGS}"
  27. AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
  28. # Use OpenCV?
  29. ac_cv_my_have_opencv="no"
  30. save_CPPFLAGS="${CPPFLAGS}"
  31. AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
  32. if test "${OPENCV_CONFIG}" != "no"; then
  33. CPPFLAGS="${CPPFLAGS} `opencv-config --cflags`"
  34. fi
  35. AC_CHECK_HEADERS(cv.h,
  36. [ac_cv_my_have_opencv="yes"],
  37. [ac_cv_my_have_opencv="no"])
  38. CPPFLAGS="${save_CPPFLAGS}"
  39. AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
  40. # Use Imlib2?
  41. ac_cv_my_have_imlib2="no"
  42. save_CPPFLAGS="${CPPFLAGS}"
  43. AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
  44. if test "${IMLIB2_CONFIG}" != "no"; then
  45. CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
  46. fi
  47. AC_CHECK_HEADERS(Imlib2.h,
  48. [ac_cv_my_have_imlib2="yes"],
  49. [ac_cv_my_have_imlib2="no"])
  50. CPPFLAGS="${save_CPPFLAGS}"
  51. AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
  52. if test "${ac_cv_my_have_sdl}" = "yes" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no"; then
  53. AC_MSG_ERROR([[cannot find SDL_Image, Imlib2 or OpenCV, please install one of them]])
  54. fi
  55. AC_OUTPUT([
  56. Makefile
  57. src/Makefile
  58. extras/Makefile
  59. testsuite/Makefile
  60. ])