configure.in 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. dnl $Id$
  2. dnl Copyright 2001-2004 Roger Dingledine
  3. dnl Copyright 2004-2005 Roger Dingledine, Nick Mathewson
  4. dnl See LICENSE for licensing information
  5. AC_INIT
  6. AM_INIT_AUTOMAKE(tor, 0.1.1.8-alpha-cvs)
  7. AM_CONFIG_HEADER(orconfig.h)
  8. AC_CANONICAL_HOST
  9. if test -f /etc/redhat-release; then
  10. CFLAGS="$CFLAGS -I/usr/kerberos/include"
  11. fi
  12. AC_ARG_ENABLE(debug,
  13. AC_HELP_STRING(--enable-debug, compile with debugging info),
  14. [if test x$enableval = xyes; then
  15. CFLAGS="$CFLAGS -g"
  16. fi])
  17. AC_ARG_ENABLE(threads,
  18. AC_HELP_STRING(--disable-threads, disable multi-threading support))
  19. if test x$enable_threads = x; then
  20. case $host in
  21. *-*-netbsd* | *-*-openbsd* )
  22. # Don't try multithreading on netbsd -- there is no threadsafe DNS
  23. # lookup function there.
  24. AC_MSG_NOTICE([You are running OpenBSD or NetBSD; I am assuming that
  25. getaddrinfo is not threadsafe here, so I will disable threads.])
  26. enable_threads="no";;
  27. *-*-solaris* )
  28. # Don't try multithreading on solaris -- cpuworkers seem to lock.
  29. AC_MSG_NOTICE([You are running Solaris; Sometimes threading makes
  30. cpu workers lock up here, so I will disable threads.])
  31. enable_threads="no";;
  32. *)
  33. enable_threads="yes";;
  34. esac
  35. fi
  36. if test $enable_threads = "yes"; then
  37. AC_DEFINE(ENABLE_THREADS, 1, [Defined if we will try to use multithreading])
  38. fi
  39. case $host in
  40. *-*-solaris* )
  41. AC_DEFINE(_REENTRANT, 1, [Define on some platforms to activate x_r() functions in time.h])
  42. ;;
  43. esac
  44. AC_PROG_CC
  45. AC_PROG_MAKE_SET
  46. AC_PROG_RANLIB
  47. # The big search for OpenSSL
  48. # copied from openssh's configure.ac
  49. AC_ARG_WITH(ssl-dir,
  50. [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
  51. [
  52. if test "x$withval" != "xno" ; then
  53. tryssldir=$withval
  54. fi
  55. ]
  56. )
  57. AC_SEARCH_LIBS(socket, [socket])
  58. AC_SEARCH_LIBS(gethostbyname, [nsl])
  59. if test $enable_threads = "yes"; then
  60. AC_SEARCH_LIBS(pthread_create, [pthread])
  61. AC_SEARCH_LIBS(pthread_detach, [pthread])
  62. fi
  63. dnl ------------------------------------------------------
  64. dnl Where do you live, libevent? And how do we call you?
  65. # Step 1. Try to link and run a program using libevent. If it works,
  66. # great! Just add -levent.
  67. AC_CACHE_CHECK([for a normal libevent], ac_cv_libevent_normal, [
  68. saved_LIBS="$LIBS"
  69. LIBS="$LIBS -levent"
  70. AC_TRY_RUN([
  71. void *event_init(void);
  72. int main(void)
  73. {
  74. event_init();
  75. return 0;
  76. }], ac_cv_libevent_normal=yes, ac_cv_libevent_normal=no)
  77. LIBS="$saved_LIBS"
  78. ])
  79. if test "$ac_cv_libevent_normal" = yes; then
  80. LIBS="$LIBS -levent"
  81. else
  82. AC_CACHE_CHECK([for libevent in /usr/local/lib], ac_cv_libevent_local, [
  83. saved_LIBS="$LIBS"
  84. saved_LDFLAGS="$LDFLAGS"
  85. LIBS="$LIBS -levent"
  86. LDFLAGS="$LDFLAGS -L/usr/local/lib"
  87. # Step 2. Otherwise, check whether adding -L/usr/local/lib allows
  88. # us to link. If not, assume we have no libevent at all.
  89. AC_TRY_LINK([], [ void *event_init(void); event_init(); ],
  90. [ libevent_is_in_local=yes ], [ libevent_is_in_local=no ])
  91. if test $libevent_is_in_local = no ; then
  92. ac_cv_libevent_local=no
  93. else
  94. # Step 3. Does adding -L/usr/local/lib allow us to run, too?
  95. # If so, all we have to do as adjust LDFLAGS and CFLAGS.
  96. AC_TRY_RUN([
  97. void *event_init(void);
  98. int main(void)
  99. {
  100. event_init();
  101. return 0;
  102. }], [ ac_cv_libevent_local=yes ], [ ac_cv_libevent_local=unlinked ])
  103. fi
  104. if test "$GCC" = yes -a $ac_cv_libevent_local = unlinked ; then
  105. # Step 4. Okay, so we can link but not run. This probably means
  106. # that the dynamic linker doesn't have /usr/local/lib in
  107. # its search path. If we're lucky enough to be running
  108. # GCC on an ELF system, we might have a workaround for that.
  109. # See whether -Wl,-R/usr/local/lib makes things better.
  110. LDFLAGS="$LDFLAGS -Wl,-R/usr/local/lib"
  111. AC_TRY_RUN([
  112. void *event_init(void);
  113. int main(void)
  114. {
  115. event_init();
  116. return 0;
  117. }], [ ac_cv_libevent_local=unlinked_gcc_elf ])
  118. fi
  119. LIBS="$saved_LIBS"
  120. LDFLAGS="$saved_LDFLAGS" ])
  121. # Now we're done. ac_vc_libevent_local could be:
  122. # yes -- Add -L/usr/local/lib and we can link fine.
  123. # unlinked_gcc_elf -- We can link, but we need to use the GCC-ELF
  124. # workaround. Complain a little.
  125. # unlinked -- We can link, but we can't run. Complain a lot.
  126. # no -- we can't link at all. Give an error and die.
  127. if test $ac_cv_libevent_local != no; then
  128. LIBS="$LIBS -levent"
  129. LDFLAGS="$LDFLAGS -L/usr/local/lib"
  130. CPPFLAGS="$CPPFLAGS -I/usr/local/include"
  131. fi
  132. if test $ac_cv_libevent_local = unlinked_gcc_elf; then
  133. LDFLAGS="$LDFLAGS -Wl,-R/usr/local/lib"
  134. if test -f /etc/ld.so.conf ; then
  135. AC_MSG_NOTICE([
  136. Apparently, you don't have /usr/local/lib in your /etc/ld.so.conf.
  137. Tor is smart enought to deal this now, but other applications aren't.
  138. You might want to add it in.])
  139. fi
  140. fi
  141. if test $ac_cv_libevent_local = unlinked ; then
  142. if test -f /etc/ld.so.conf ; then
  143. AC_MSG_NOTICE([
  144. =================================================
  145. Your libevent library is installed in /usr/local/lib,
  146. but your dynamic linker isn't configured to look for
  147. it there.
  148. Maybe you need to add /usr/local/lib to /etc/ld.so.conf,
  149. and then run ldconfig -v ?
  150. =================================================])
  151. else
  152. AC_MSG_NOTICE([
  153. =================================================
  154. Your libevent library is installed in /usr/local/lib,
  155. but your dynamic linker isn't configured to look for
  156. it there.
  157. =================================================])
  158. fi
  159. fi
  160. if test $ac_cv_libevent_local = no ; then
  161. AC_MSG_ERROR([
  162. Tor requires libevent to build. You can download the latest
  163. version of libevent from http://monkey.org/~provos/libevent/])
  164. fi
  165. fi
  166. dnl ------------------------------------------------------
  167. dnl Where do you live, OpenSSL?
  168. saved_LIBS="$LIBS"
  169. saved_LDFLAGS="$LDFLAGS"
  170. saved_CPPFLAGS="$CPPFLAGS"
  171. if test "x$prefix" != "xNONE" ; then
  172. tryssldir="$tryssldir $prefix"
  173. fi
  174. AC_CACHE_CHECK([for OpenSSL directory], ac_cv_openssldir, [
  175. for ssldir in $tryssldir "" /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /usr/pkg /opt /opt/openssl ; do
  176. CPPFLAGS="$saved_CPPFLAGS"
  177. LDFLAGS="$saved_LDFLAGS"
  178. LIBS="$saved_LIBS -lssl -lcrypto"
  179. # Skip directories if they don't exist
  180. if test ! -z "$ssldir" -a ! -d "$ssldir" ; then
  181. continue;
  182. fi
  183. if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
  184. # Try to use $ssldir/lib if it exists, otherwise
  185. # $ssldir
  186. if test -d "$ssldir/lib" ; then
  187. LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
  188. if test ! -z "$need_dash_r" ; then
  189. LDFLAGS="-R$ssldir/lib $LDFLAGS"
  190. fi
  191. else
  192. LDFLAGS="-L$ssldir $saved_LDFLAGS"
  193. if test ! -z "$need_dash_r" ; then
  194. LDFLAGS="-R$ssldir $LDFLAGS"
  195. fi
  196. fi
  197. # Try to use $ssldir/include if it exists, otherwise
  198. # $ssldir
  199. if test -d "$ssldir/include" ; then
  200. CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
  201. else
  202. CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
  203. fi
  204. fi
  205. # Basic test to check for compatible version and correct linking
  206. # *does not* test for RSA - that comes later.
  207. AC_TRY_RUN(
  208. [
  209. #include <string.h>
  210. #include <openssl/rand.h>
  211. int main(void)
  212. {
  213. char a[2048];
  214. memset(a, 0, sizeof(a));
  215. RAND_add(a, sizeof(a), sizeof(a));
  216. return(RAND_status() <= 0);
  217. }
  218. ],
  219. [
  220. found_crypto=1
  221. break;
  222. ], []
  223. )
  224. if test ! -z "$found_crypto" ; then
  225. break;
  226. fi
  227. done
  228. if test -z "$found_crypto" ; then
  229. AC_MSG_ERROR([Could not find working OpenSSL library, please install or check config.log])
  230. fi
  231. if test -z "$ssldir" ; then
  232. ssldir="(system)"
  233. fi
  234. ac_cv_openssldir=$ssldir
  235. ])
  236. if (test ! -z "$ac_cv_openssldir" && test "x$ac_cv_openssldir" != "x(system)") ;
  237. then
  238. dnl Need to recover ssldir - test above runs in subshell
  239. ssldir=$ac_cv_openssldir
  240. if test ! -z "$ssldir" -a "x$ssldir" != "x/usr"; then
  241. # Try to use $ssldir/lib if it exists, otherwise
  242. # $ssldir
  243. if test -d "$ssldir/lib" ; then
  244. LDFLAGS="-L$ssldir/lib $saved_LDFLAGS"
  245. if test ! -z "$need_dash_r" ; then
  246. LDFLAGS="-R$ssldir/lib $LDFLAGS"
  247. fi
  248. else
  249. LDFLAGS="-L$ssldir $saved_LDFLAGS"
  250. if test ! -z "$need_dash_r" ; then
  251. LDFLAGS="-R$ssldir $LDFLAGS"
  252. fi
  253. fi
  254. # Try to use $ssldir/include if it exists, otherwise
  255. # $ssldir
  256. if test -d "$ssldir/include" ; then
  257. CPPFLAGS="-I$ssldir/include $saved_CPPFLAGS"
  258. else
  259. CPPFLAGS="-I$ssldir $saved_CPPFLAGS"
  260. fi
  261. fi
  262. fi
  263. LIBS="$saved_LIBS"
  264. AC_SYS_LARGEFILE
  265. dnl The warning message here is no longer strictly accurate.
  266. AC_CHECK_HEADERS(unistd.h string.h signal.h netdb.h ctype.h sys/stat.h sys/types.h fcntl.h sys/fcntl.h sys/ioctl.h sys/socket.h sys/time.h netinet/in.h arpa/inet.h errno.h assert.h time.h pwd.h grp.h, , AC_MSG_WARN(some headers were not found, compilation may fail))
  267. AC_CHECK_HEADERS(event.h, , AC_MSG_ERROR(Libevent header (event.h) not found. Tor requires libevent to build.))
  268. AC_CHECK_HEADERS(zlib.h, , AC_MSG_ERROR(Zlib header (zlib.h) not found. Tor requires zlib to build. You may need to install a zlib development package.))
  269. dnl These headers are not essential
  270. AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h stddef.h inttypes.h utime.h sys/utime.h)
  271. AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit setrlimit strlcat strlcpy strtoull getpwnam ftello getaddrinfo localtime_r gmtime_r event_get_version event_get_method event_set_log_callback memmem)
  272. if test $enable_threads = "yes"; then
  273. AC_CHECK_HEADERS(pthread.h)
  274. AC_CHECK_FUNCS(pthread_create)
  275. fi
  276. AC_FUNC_FSEEKO
  277. AC_CHECK_MEMBERS([struct timeval.tv_sec])
  278. dnl In case we aren't given a working stdint.h, we'll need to grow our own.
  279. dnl Watch out.
  280. AC_CHECK_SIZEOF(int8_t)
  281. AC_CHECK_SIZEOF(int16_t)
  282. AC_CHECK_SIZEOF(int32_t)
  283. AC_CHECK_SIZEOF(int64_t)
  284. AC_CHECK_SIZEOF(uint8_t)
  285. AC_CHECK_SIZEOF(uint16_t)
  286. AC_CHECK_SIZEOF(uint32_t)
  287. AC_CHECK_SIZEOF(uint64_t)
  288. AC_CHECK_SIZEOF(intptr_t)
  289. AC_CHECK_SIZEOF(uintptr_t)
  290. dnl AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, intptr_t, uintptr_t])
  291. AC_CHECK_SIZEOF(char)
  292. AC_CHECK_SIZEOF(short)
  293. AC_CHECK_SIZEOF(int)
  294. AC_CHECK_SIZEOF(long)
  295. AC_CHECK_SIZEOF(long long)
  296. AC_CHECK_SIZEOF(__int64)
  297. AC_CHECK_SIZEOF(void *)
  298. AC_CHECK_SIZEOF(time_t)
  299. AC_CACHE_CHECK([whether time_t is signed], tor_cv_time_t_signed, [
  300. AC_TRY_RUN([
  301. int main(int c, char**v) { if (((time_t)-1)<0) return 1; else return 0; }],
  302. tor_cv_time_t_signed=no, tor_cv_time_t_signed=yes)
  303. ])
  304. if test $tor_cv_time_t_signed = yes; then
  305. AC_DEFINE([TIME_T_IS_SIGNED], 1,
  306. [Define to 1 iff time_t is signed])
  307. fi
  308. AC_CHECK_SIZEOF(socklen_t, , [AC_INCLUDES_DEFAULT()
  309. #ifdef HAVE_SYS_SOCKET_H
  310. #include <sys/socket.h>
  311. #endif
  312. ])
  313. # We want to make sure that we _don't_ have a cell_t defined, like IRIX does.
  314. AC_CHECK_SIZEOF(cell_t)
  315. # Now, let's see about alignment requirements. On some platforms, we override
  316. # the default.
  317. case $host in
  318. ia64-*-* | arm-*-* | sparc-*-* | sparc64-*-* )
  319. tor_cv_unaligned_ok=no
  320. ;;
  321. # On the following architectures unaligned access works, but is not done in
  322. # hardware. This means that when you try to do unaligned access the kernel
  323. # gets to sort out an exception and then work around to somehow make your
  324. # reqest work, which is quite expensive. Therefore it's probably better to
  325. # not even do it.
  326. alpha-*-* | mips-*-* | mipsel-*-* )
  327. tor_cv_unaligned_ok=no
  328. ;;
  329. *)
  330. AC_CACHE_CHECK([whether unaligned int access is allowed], tor_cv_unaligned_ok,
  331. [AC_RUN_IFELSE([AC_LANG_SOURCE(
  332. [[int main () { char s[] = "A\x00\x00\x00\x00\x00\x00\x00";
  333. return *(int*)(&s[1]); }]])],
  334. [tor_cv_unaligned_ok=yes],
  335. [tor_cv_unaligned_ok=no],
  336. [tor_cv_unaligned_ok=cross])])
  337. esac
  338. if test $tor_cv_unaligned_ok = yes; then
  339. AC_DEFINE([UNALIGNED_INT_ACCESS_OK], 1,
  340. [Define to 1 iff unaligned int access is allowed])
  341. fi
  342. # Now make sure that NULL can be represented as zero bytes.
  343. AC_CACHE_CHECK([whether memset(0) sets pointers to NULL], tor_cv_null_is_zero,
  344. [AC_RUN_IFELSE([AC_LANG_SOURCE(
  345. [[#include <stdlib.h>
  346. #include <string.h>
  347. #include <stdio.h>
  348. #ifdef HAVE_STDDEF_H
  349. #include <stddef.h>
  350. #endif
  351. int main () { char *p1,*p2; p1=NULL; memset(&p2,0,sizeof(p2));
  352. return memcmp(&p1,&p2,sizeof(char*))?1:0; }]])],
  353. [tor_cv_null_is_zero=yes],
  354. [tor_cv_null_is_zero=no],
  355. [tor_cv_null_is_zero=cross])])
  356. if test $tor_cv_null_is_zero = yes; then
  357. AC_DEFINE([NULL_REP_IS_ZERO_BYTES], 1,
  358. [Define to 1 iff memset(0) sets pointers to NULL])
  359. fi
  360. # Whether we should use the dmalloc memory allocation debugging library.
  361. AC_MSG_CHECKING(whether to use dmalloc (debug memory allocation library))
  362. AC_ARG_WITH(dmalloc,
  363. [ --with-dmalloc Use debug memory allocation library. ],
  364. [if [[ "$withval" = "yes" ]]; then
  365. dmalloc=1
  366. AC_MSG_RESULT(yes)
  367. else
  368. dmalloc=1
  369. AC_MSG_RESULT(no)
  370. fi], [ dmalloc=0; AC_MSG_RESULT(no) ]
  371. )
  372. if [[ $dmalloc -eq 1 ]]; then
  373. AC_CHECK_HEADERS(dmalloc.h, , AC_MSG_ERROR(dmalloc header file not found. Do you have the development files for dmalloc installed?))
  374. AC_SEARCH_LIBS(dmalloc_malloc, [dmallocth dmalloc], , AC_MSG_ERROR(Libdmalloc library not found. If you enable it you better have it installed.))
  375. AC_DEFINE(USE_DMALLOC, 1, [Debug memory allocation library])
  376. AC_DEFINE(DMALLOC_FUNC_CHECK, 1, [Enable dmalloc's malloc function check])
  377. fi
  378. # Check for gethostbyname_r in all its glorious incompatible versions.
  379. # (This logic is based on that in Python's configure.in)
  380. AH_TEMPLATE(HAVE_GETHOSTBYNAME_R,
  381. [Define this if you have any gethostbyname_r()])
  382. AC_CHECK_FUNC(gethostbyname_r, [
  383. AC_MSG_CHECKING([how many arguments gethostbyname_r() wants])
  384. OLD_CFLAGS=$CFLAGS
  385. CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
  386. AC_TRY_COMPILE([
  387. #include <netdb.h>
  388. ], [
  389. char *cp1, *cp2;
  390. struct hostent *h1, *h2;
  391. int i1, i2;
  392. (void)gethostbyname_r(cp1,h1,cp2,i1,&h2,&i2);
  393. ], [
  394. AC_DEFINE(HAVE_GETHOSTBYNAME_R)
  395. AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
  396. [Define this if gethostbyname_r takes 6 arguments])
  397. AC_MSG_RESULT(6)
  398. ], [
  399. AC_TRY_COMPILE([
  400. #include <netdb.h>
  401. ], [
  402. char *cp1, *cp2;
  403. struct hostent *h1;
  404. int i1, i2;
  405. (void)gethostbyname_r(cp1,h1,cp2,i1,&i2);
  406. ], [
  407. AC_DEFINE(HAVE_GETHOSTBYNAME_R)
  408. AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
  409. [Define this if gethostbyname_r takes 5 arguments])
  410. AC_MSG_RESULT(5)
  411. ], [
  412. AC_TRY_COMPILE([
  413. #include <netdb.h>
  414. ], [
  415. char *cp1;
  416. struct hostent *h1;
  417. struct hostent_data hd;
  418. (void) gethostbyname_r(cp1,h1,&hd);
  419. ], [
  420. AC_DEFINE(HAVE_GETHOSTBYNAME_R)
  421. AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
  422. [Define this if gethostbyname_r takes 3 arguments])
  423. AC_MSG_RESULT(3)
  424. ], [
  425. AC_MSG_RESULT(0)
  426. ])
  427. ])
  428. ])
  429. CFLAGS=$OLD_CFLAGS
  430. ])
  431. # $prefix stores the value of the --prefix command line option, or
  432. # NONE if the option wasn't set. In the case that it wasn't set, make
  433. # it be the default, so that we can use it to expand directories now.
  434. if test "x$prefix" = "xNONE"; then
  435. prefix=$ac_default_prefix
  436. fi
  437. # and similarly for $exec_prefix
  438. if test "x$exec_prefix" = "xNONE"; then
  439. exec_prefix=$prefix
  440. fi
  441. CONFDIR=`eval echo $sysconfdir/tor`
  442. AC_SUBST(CONFDIR)
  443. AC_DEFINE_UNQUOTED(CONFDIR,"$CONFDIR")
  444. AC_DEFINE([CONFDIR], [], [tor's configuration directory])
  445. BINDIR=`eval echo $bindir`
  446. AC_SUBST(BINDIR)
  447. LOCALSTATEDIR=`eval echo $localstatedir`
  448. AC_SUBST(LOCALSTATEDIR)
  449. AC_DEFINE_UNQUOTED(LOCALSTATEDIR,"$LOCALSTATEDIR")
  450. AC_DEFINE([LOCALSTATEDIR], [], [Default location to store state files.])
  451. # Set CFLAGS _after_ all the above checks, since our warnings are stricter
  452. # than autoconf's macros like.
  453. CFLAGS="$CFLAGS -Wall -g -O2"
  454. # Add some more warnings which we use in the cvs version but not in the
  455. # released versions. (Some relevant gcc versions can't handle these.)
  456. #CFLAGS="$CFLAGS -W -Wno-unused-parameter -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Winit-self -Wwrite-strings -Waggregate-return -Wmissing-declarations -Wmissing-field-initializers -Wredundant-decls -Winline"
  457. # Add these in when you feel like fun.
  458. #CFLAGS="$CFLAGS -Wbad-function-cast -Werror -Wdeclaration-after-statement -Wold-style-definition"
  459. echo "confdir: $CONFDIR"
  460. AC_OUTPUT(Makefile tor.spec contrib/tor.sh contrib/torctl contrib/torify contrib/Makefile contrib/osx/Makefile contrib/osx/TorBundleDesc.plist contrib/osx/TorBundleInfo.plist contrib/osx/TorDesc.plist contrib/osx/TorInfo.plist contrib/osx/TorStartupDesc.plist src/config/torrc.sample doc/tor.1 src/Makefile doc/Makefile doc/design-paper/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/win32/Makefile src/tools/Makefile)
  461. if test -x /usr/bin/perl && test -x ./contrib/updateVersions.pl ; then
  462. ./contrib/updateVersions.pl
  463. fi