您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

87 行
2.2 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 DevIL?
  17. #AC_CHECK_HEADERS(IL/il.h,
  18. # [ac_cv_my_have_il="yes"],
  19. # [ac_cv_my_have_il="no"])
  20. #CPPFLAGS="${save_CPPFLAGS}"
  21. #AM_CONDITIONAL(USE_IL, test "${ac_cv_my_have_il}" = "yes")
  22. # Use Windows?
  23. #AC_CHECK_HEADERS(olectl.h,
  24. # [ac_cv_my_have_ole="yes"],
  25. # [ac_cv_my_have_ole="no"])
  26. #CPPFLAGS="${save_CPPFLAGS}"
  27. #AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
  28. # Use SDL?
  29. ac_cv_my_have_sdl="no"
  30. save_CPPFLAGS="${CPPFLAGS}"
  31. AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
  32. if test "${SDL_CONFIG}" != "no"; then
  33. CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
  34. fi
  35. AC_CHECK_HEADERS(SDL_image.h,
  36. [ac_cv_my_have_sdl="yes"],
  37. [ac_cv_my_have_sdl="no"])
  38. CPPFLAGS="${save_CPPFLAGS}"
  39. AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
  40. # Use OpenCV?
  41. ac_cv_my_have_opencv="no"
  42. save_CPPFLAGS="${CPPFLAGS}"
  43. AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
  44. if test "${OPENCV_CONFIG}" != "no"; then
  45. CPPFLAGS="${CPPFLAGS} `opencv-config --cflags`"
  46. fi
  47. AC_CHECK_HEADERS(cv.h,
  48. [ac_cv_my_have_opencv="yes"],
  49. [ac_cv_my_have_opencv="no"])
  50. CPPFLAGS="${save_CPPFLAGS}"
  51. AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
  52. # Use Imlib2?
  53. ac_cv_my_have_imlib2="no"
  54. save_CPPFLAGS="${CPPFLAGS}"
  55. AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
  56. if test "${IMLIB2_CONFIG}" != "no"; then
  57. CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
  58. fi
  59. AC_CHECK_HEADERS(Imlib2.h,
  60. [ac_cv_my_have_imlib2="yes"],
  61. [ac_cv_my_have_imlib2="no"])
  62. CPPFLAGS="${save_CPPFLAGS}"
  63. AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
  64. 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
  65. AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]])
  66. fi
  67. AC_OUTPUT([
  68. Makefile
  69. src/Makefile
  70. extras/Makefile
  71. share/Makefile
  72. ])