A clone of btpd with my configuration changes.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

91 satır
1.9 KiB

  1. AC_INIT(btpd, 0.2, btpd@murmeldjur.se)
  2. AC_CANONICAL_TARGET
  3. AM_INIT_AUTOMAKE([foreign])
  4. AC_CONFIG_FILES([Makefile btpd/Makefile misc/Makefile cli/Makefile])
  5. AC_PROG_CC
  6. AC_PROG_RANLIB
  7. CFLAGS="$CFLAGS -std=c99"
  8. case $target_os in
  9. linux*)
  10. CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64"
  11. ;;
  12. esac
  13. AC_ARG_WITH(event,
  14. [ --with-event=dir use libevent installed in dir],
  15. [
  16. AC_SUBST(event_LDFLAGS,["-L${withval}/lib -Wl,-rpath=${withval}/lib"])
  17. AC_SUBST(event_CPPFLAGS,"-I${withval}/include")
  18. ],
  19. [])
  20. AC_ARG_WITH(ssl,
  21. [ --with-ssl=dir use openssl installed in dir],
  22. [
  23. AC_SUBST(openssl_LDFLAGS,["-L${withval}/lib -Wl,-rpath=${withval}/lib"])
  24. AC_SUBST(openssl_CPPFLAGS,"-I${withval}/include")
  25. ],
  26. [])
  27. AC_ARG_WITH(curlconf,
  28. [ --with-curlconf=prog use this curl-config],
  29. [
  30. CURLCONF=$withval
  31. ],
  32. [])
  33. AC_ARG_WITH(warn,
  34. [ --with-warn=level select warning preset (no,all,allerr)],
  35. [
  36. case $withval in
  37. no)
  38. ;;
  39. all)
  40. CFLAGS="$CFLAGS -Wall"
  41. ;;
  42. allerr)
  43. CFLAGS="$CFLAGS -Wall -Werror"
  44. ;;
  45. *)
  46. echo "Warning preset \"$withval\" not recognized. See --help."
  47. exit 1
  48. ;;
  49. esac
  50. ],
  51. [])
  52. old_LDFLAGS="$LDFLAGS"
  53. LDFLAGS="$LDFLAGS $event_LDFLAGS"
  54. AC_CHECK_LIB(event, event_init, :, echo Must have libevent; exit 1)
  55. LDFLAGS=$old_LDFLAGS
  56. old_LDFLAGS="$LDFLAGS"
  57. LDFLAGS="$LDFLAGS $openssl_LDFLAGS"
  58. AC_CHECK_LIB(crypto, SHA1_Final, :, echo Must have openssl; exit 1)
  59. LDFLAGS=$old_LDFLAGS
  60. if test x$CURLCONF = x; then
  61. AC_PATH_PROG(CURLCONF, curl-config)
  62. fi
  63. if test x$CURLCONF = x -o \! \( -r "$CURLCONF" -a -x "$CURLCONF" \); then
  64. echo Must have the curl-config script
  65. exit 1
  66. else
  67. AC_SUBST(CURL_CFLAGS, `$CURLCONF --cflags`)
  68. AC_SUBST(CURL_LDFLAGS, `$CURLCONF --libs`)
  69. fi
  70. old_LDFLAGS="$LDFLAGS"
  71. LDFLAGS="$LDFLAGS $CURL_LDFLAGS"
  72. AC_CHECK_LIB(curl, curl_easy_strerror, :, echo Must have recent curl; exit 1)
  73. LDFLAGS=$old_LDFLAGS
  74. AC_OUTPUT