configure.ac 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.69])
  4. AC_INIT([clsync],[0.4.5],[Dmitry Yu Okunev <xaionaro@gmail.com>],[],[https://github.com/clsync/clsync])
  5. AC_CANONICAL_TARGET
  6. AC_CONFIG_SRCDIR([sync.c])
  7. AC_CONFIG_MACRO_DIR([m4])
  8. AM_INIT_AUTOMAKE([1.11 foreign -Wall -Wno-portability])
  9. AC_CONFIG_HEADERS([config.h])
  10. AC_PROG_CC([gcc cc])
  11. AM_PROG_CC_C_O
  12. AC_PROG_CC_STDC
  13. LT_INIT
  14. PKG_INSTALLDIR
  15. AX_PTHREAD(
  16. [
  17. CC="$PTHREAD_CC"
  18. LIBS="$LIBS $PTHREAD_LIBS"
  19. CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  20. LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS"
  21. ], [
  22. AC_MSG_ERROR([Pthread library not found. Please set PTHREAD_CFLAGS and PTHREAD_LIBS correctly for your setup])
  23. ]
  24. )
  25. case $target_os in
  26. *bsd*)
  27. AC_SEARCH_LIBS([backtrace], [execinfo], [HAVE_BACKTRACE=1])
  28. ;;
  29. *)
  30. AC_CHECK_HEADER([execinfo.h], [HAVE_BACKTRACE=1])
  31. ;;
  32. esac
  33. case $target_os in
  34. *musl*)
  35. # musl uses stand-alone fts implementation
  36. LDFLAGS="${LDFLAGS} -lfts"
  37. ;;
  38. esac
  39. dnl --enable-clsync
  40. AC_ARG_ENABLE(clsync,
  41. AS_HELP_STRING(--disable-clsync,
  42. [do not build clsync binary, default: build clsync]))
  43. AM_CONDITIONAL([CLSYNC], [test "x$enable_clsync" != "xno"])
  44. dnl check for glib only if clsync is being build
  45. AS_IF([test "x$enable_clsync" != "xno"], [
  46. PKG_CHECK_MODULES(GLIB, [glib-2.0])
  47. ])
  48. dnl --enable-cluster
  49. AC_ARG_ENABLE(cluster,
  50. AS_HELP_STRING(--enable-cluster,
  51. [enable clustering support (not yet implemented), default: no]))
  52. AS_IF([test "x$enable_cluster" = "xyes"], [CPPFLAGS="${CPPFLAGS} -DCLUSTER_SUPPORT"
  53. HAVE_CLUSTER=1
  54. dnl mhash check
  55. AC_ARG_WITH(mhash,
  56. AS_HELP_STRING(--with-mhash,
  57. [use mhash instead of internal version of hash algo, default: enabled]))
  58. AS_IF([test "x$with_mhash" = "xno"], [], [
  59. AC_CHECK_HEADER([mhash.h], [], [AC_MSG_ERROR("Unable to find mhash.h")])
  60. AC_SEARCH_LIBS([mhash_init], [mhash], [CPPFLAGS="${CPPFLAGS} -DHAVE_MHASH"; LDFLAGS="${LDFLAGS} -lmhash"],
  61. [AC_MSG_ERROR("Unable to find libmhash")])
  62. ])
  63. ])
  64. dnl --enable-socket
  65. AC_ARG_ENABLE(socket,
  66. AS_HELP_STRING(--enable-socket,
  67. [enable control socket support, default: no]))
  68. AS_IF([test "x$enable_socket" = "xyes"],
  69. [CPPFLAGS="${CPPFLAGS} -DENABLE_SOCKET"])
  70. AM_CONDITIONAL([SOCKET], [test "x$enable_socket" = "xyes"])
  71. dnl --enable-libclsync
  72. AC_ARG_ENABLE(socket-library,
  73. AS_HELP_STRING(--enable-socket-library,
  74. [build libclsync socket library, default: no]))
  75. AM_CONDITIONAL([LIBCLSYNC], [test "x$enable_socket_library" = "xyes"])
  76. dnl --enable-unshare
  77. AC_ARG_ENABLE(unshare,
  78. AS_HELP_STRING(--disable-unshare,
  79. [disable support of unshare(), default: enabled]))
  80. AS_IF([ test "x$enable_unshare" != "xno" ],
  81. [
  82. AC_CHECK_FUNC([unshare], [HAVE_UNSHARE=1])
  83. ])
  84. dnl --enable-highload-locks
  85. AC_ARG_ENABLE(highload-locks,
  86. AS_HELP_STRING(--disable-highload-locks,
  87. [disable locks for high loaded instances with --splitting={thread,process} [which are not enough tested and can cause deadlocks with 100% CPU utilization]]))
  88. AM_CONDITIONAL([HLLOCKS], [test "x$enable_highload_locks" != "xno"])
  89. dnl --enable-debug
  90. AC_ARG_ENABLE(debug,
  91. AS_HELP_STRING(--enable-debug,
  92. [enable debugging support, default: yes; value: no, yes, force]),
  93. [case "${enableval}" in
  94. (0|"no") debug=0 ;;
  95. (1|"yes") debug=1 ;;
  96. (2|"force") debug=2 ;;
  97. (*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
  98. esac],
  99. [debug=1])
  100. AS_IF([ test "$debug" -ge 1 ],
  101. [CFLAGS="${CFLAGS} -pipe -Wall" CPPFLAGS="${CPPFLAGS} -D_DEBUG_SUPPORT"])
  102. AS_IF([ test "$debug" -ge 2 ],
  103. [CFLAGS="${CFLAGS} -Wextra -pedantic -O0 -ggdb3" CPPFLAGS="${CPPFLAGS} -D_DEBUG_FORCE"])
  104. dnl --paranoid
  105. AC_ARG_ENABLE(paranoid,
  106. AS_HELP_STRING([--enable-paranoid],
  107. [set paranoid level of code security, default: 1, values: 0, 1, 2]),
  108. [case "${enableval}" in
  109. (0|"no") paranoid=0 ;;
  110. (1|"yes") paranoid=1 ;;
  111. (2) paranoid=2 ;;
  112. (*) AC_MSG_ERROR([bad value ${enableval} for --enable-paranoid]) ;;
  113. esac],
  114. [paranoid=1])
  115. AS_IF(
  116. [test $paranoid -ge 1],
  117. [
  118. CPPFLAGS="${CPPFLAGS} -D_FORTIFY_SOURCE=2 -DPARANOID"
  119. CFLAGS="${CFLAGS} -fstack-protector-all -Wall --param ssp-buffer-size=4"
  120. LDFLAGS="${LDFLAGS} -Xlinker -zrelro"
  121. AX_CHECK_COMPILE_FLAG([-fstack-check], [CFLAGS="${CFLAGS} -fstack-check"])
  122. ]
  123. )
  124. AS_IF([test $paranoid -eq 2], [CPPFLAGS="${CPPFLAGS} -DVERYPARANOID"])
  125. dnl capabilities check
  126. AC_ARG_ENABLE(capabilities,
  127. AS_HELP_STRING(--enable-capabilities,
  128. [Enable linux capabilities support; values: no, check, yes; default: check]),
  129. ,
  130. [enable_capabilities=check]
  131. )
  132. case "$enable_capabilities" in
  133. yes)
  134. AC_CHECK_FUNC([capset],
  135. [
  136. AC_CHECK_HEADER(sys/capability.h, [HAVE_CAPABILITIES=2], [AC_MSG_FAILURE([Cannot find sys/capability.h])])
  137. ],
  138. [
  139. AC_MSG_FAILURE([There is no capabilities support on this system])
  140. ]
  141. )
  142. ;;
  143. check)
  144. AC_CHECK_FUNC([capset],
  145. [
  146. AC_CHECK_HEADER(sys/capability.h, [HAVE_CAPABILITIES=2])
  147. ]
  148. )
  149. ;;
  150. esac
  151. dnl searching for seccomp
  152. AC_ARG_ENABLE(seccomp,
  153. AS_HELP_STRING(--enable-seccomp,
  154. [Enable seccomp support be able to forbid extra syscalls (requires capabilities); values: no, check, yes; default: check]),
  155. ,
  156. [enable_seccomp=check]
  157. )
  158. case "$enable_seccomp" in
  159. yes)
  160. AS_IF([test "$HAVE_CAPABILITIES" = ''], [AC_MSG_ERROR([Seccomp needs capabilities to be enabled])])
  161. AC_CHECK_TYPES([struct seccomp_data], [HAVE_SECCOMP=1], [AC_MSG_FAILURE([Cannot find valid linux/seccomp.h])], [[#include <linux/seccomp.h>]])
  162. ;;
  163. check)
  164. AS_IF([test "$HAVE_CAPABILITIES" != ''], [
  165. AC_CHECK_TYPES([struct seccomp_data], [HAVE_SECCOMP=1], , [[#include <linux/seccomp.h>]])
  166. ])
  167. ;;
  168. esac
  169. dnl Check for LTO support
  170. AC_ARG_ENABLE(lto,
  171. AS_HELP_STRING(--enable-lto,
  172. [Enable LTO (link time optimization) support; values: no, check, yes; default: check]),
  173. ,
  174. [enable_lto=check]
  175. )
  176. case "$enable_lto" in
  177. check|yes)
  178. case $target_cpu in
  179. *e2k*)
  180. LTOFLAGS="-fwhole"
  181. saved_cflags="$CFLAGS"
  182. CFLAGS="${CFLAGS} -g0" # -fwhole requires -g0
  183. ;;
  184. *)
  185. LTOFLAGS="-flto=jobserver"
  186. ;;
  187. esac
  188. AX_CHECK_COMPILE_FLAG([$LTOFLAGS], [have_lto_build=1])
  189. # not all autoconf implementations support this
  190. # AX_CHECK_LINK_FLAG([$LTOFLAGS], [have_lto_link=1])
  191. # AS_IF([test "$have_lto_build" = '1' -a "$have_lto_link" = '1'],
  192. AS_IF([test "$have_lto_build" = '1'],
  193. [HAVE_LTO=1; AC_SUBST([LTOFLAGS])],
  194. [AS_IF([test "$enable_lto" = 'yes'], [AC_MSG_ERROR([LTO is requested, but not supported by compiler])])
  195. case $target_cpu in
  196. *e2k*)
  197. CFLAGS="$saved_cflags"
  198. esac
  199. ]
  200. )
  201. ;;
  202. esac
  203. # Checks for programs.
  204. AC_PROG_CC_C99
  205. AC_PROG_INSTALL
  206. PKG_PROG_PKG_CONFIG([0.20])
  207. # Checks for libraries.
  208. dnl libdl
  209. AC_CHECK_HEADER([dlfcn.h], [], [AC_MSG_ERROR("Unable to find dlfcn.h")])
  210. AC_SEARCH_LIBS([dlopen], [dl], [LDFLAGS="${LDFLAGS} -rdynamic"],
  211. [AC_MSG_ERROR("Unable to find libdl")])
  212. dnl -lrt is needed on < glibc-2.17
  213. AC_SEARCH_LIBS([clock_getres], [rt], [],
  214. [AC_MSG_ERROR("Unable to find librt; clock_getres() is needed")])
  215. dnl searching for getmntent
  216. AC_CHECK_FUNC([getmntent], [HAVE_GETMNTENT=1])
  217. dnl searching for pivot_root
  218. AC_CHECK_FUNC([pivot_root], [HAVE_PIVOTROOT=1])
  219. dnl searching for pthread_timedjoin_np
  220. AC_CHECK_FUNC([pthread_timedjoin_np], [HAVE_PTHREAD_TIMEDJOIN_NP=1])
  221. dnl libcgroup check
  222. AC_ARG_WITH(libcgroup,
  223. AS_HELP_STRING(--with-libcgroup,
  224. [Enable cgroup support via libcgroup; values: no, check, yes; default: check]),
  225. ,
  226. [with_libcgroup=check]
  227. )
  228. case "$with_libcgroup" in
  229. yes)
  230. AC_CHECK_LIB([cgroup], [cgroup_init],
  231. [
  232. AC_CHECK_HEADER(libcgroup.h, [], [AC_MSG_FAILURE([Cannot find libcgroup.h])])
  233. LDFLAGS="${LDFLAGS} -lcgroup"
  234. HAVE_LIBCGROUP=1
  235. ],
  236. [
  237. AC_MSG_FAILURE(
  238. [Cannot find libcgroup])
  239. ]
  240. )
  241. ;;
  242. check)
  243. AC_CHECK_LIB([cgroup], [cgroup_init],
  244. [
  245. AC_CHECK_HEADER(libcgroup.h, [], [AC_MSG_FAILURE([Cannot find libcgroup.h])])
  246. LDFLAGS="${LDFLAGS} -lcgroup"
  247. HAVE_LIBCGROUP=1
  248. ]
  249. )
  250. ;;
  251. esac
  252. dnl tre check
  253. #AC_ARG_WITH(tre,
  254. # AS_HELP_STRING(--with-tre,
  255. # [Enable tre support be able to predict which directories should be scanned for excludes; values: no, check, yes; default: check]),
  256. # [],
  257. # [with_tre=check]
  258. #)
  259. #
  260. #case "$with_tre" in
  261. # yes)
  262. # AC_CHECK_LIB([tre], [tre_regaexec],
  263. # [
  264. # AC_CHECK_HEADER(tre/tre.h, [], [AC_MSG_FAILURE([Cannot find tre/tre.h])])
  265. # LDFLAGS="${LDFLAGS} -ltre"
  266. # HAVE_TRE=1
  267. # ],
  268. # [
  269. # AC_MSG_FAILURE(
  270. # [Cannot find libtre])
  271. # ]
  272. # )
  273. # ;;
  274. # check)
  275. # AC_CHECK_LIB([tre], [tre_regaexec],
  276. # [
  277. # AC_CHECK_HEADER(tre/tre.h, [], [AC_MSG_FAILURE([Cannot find tre/tre.h])])
  278. # LDFLAGS="${LDFLAGS} -ltre"
  279. # HAVE_TRE=1
  280. # ],
  281. # []
  282. # )
  283. # ;;
  284. #esac
  285. dnl kqueue/inotify/gio/bsm
  286. AC_ARG_WITH(kqueue,
  287. AS_HELP_STRING(--with-kqueue,
  288. [Enable kqueue support; values: no, native, lib, check; default: check]),
  289. [],
  290. [with_kqueue=check]
  291. )
  292. AC_ARG_WITH(inotify,
  293. AS_HELP_STRING(--with-inotify,
  294. [Enable inotify support; values: no, native, lib, check; default: check]),
  295. [],
  296. [with_inotify=check]
  297. )
  298. AC_ARG_WITH(gio,
  299. AS_HELP_STRING(--with-gio,
  300. [Enable GIO support as FS monitor subsystem; values: no, lib, check; default: check]),
  301. [],
  302. [with_gio=check]
  303. )
  304. AC_ARG_WITH(bsm,
  305. AS_HELP_STRING(--with-bsm,
  306. [Enable BSM (Sun/*BSD audit) support as FS monitor subsystem; values: no, lib, check; default: check]),
  307. [],
  308. [with_bsm=check]
  309. )
  310. case "$with_kqueue" in
  311. check)
  312. AC_CHECK_FUNC([kqueue],
  313. [
  314. HAVE_KQUEUE=2
  315. ],
  316. [
  317. AC_CHECK_LIB([kqueue], [kqueue],
  318. [
  319. AC_CHECK_HEADER(sys/event.h, [
  320. LDFLAGS="${LDFLAGS} -lkqueue"
  321. HAVE_KQUEUE=1
  322. ])
  323. ]
  324. )
  325. ]
  326. )
  327. ;;
  328. native)
  329. AC_CHECK_FUNC([kqueue],
  330. [
  331. AC_CHECK_HEADER(sys/event.h, , [AC_MSG_FAILURE([Cannot find sys/event.h])])
  332. HAVE_KQUEUE=2
  333. ],
  334. [
  335. AC_MSG_FAILURE(
  336. [There is no kqueue native support on this system])
  337. ]
  338. )
  339. ;;
  340. lib)
  341. AC_CHECK_LIB([kqueue], [kqueue],
  342. [
  343. AC_CHECK_HEADER(sys/event.h, , [AC_MSG_FAILURE([Cannot find sys/event.h])])
  344. LDFLAGS="${LDFLAGS} -lkqueue"
  345. HAVE_KQUEUE=1
  346. ],
  347. [
  348. AC_MSG_FAILURE(
  349. [Cannot find libkqueue])
  350. ]
  351. )
  352. ;;
  353. esac
  354. case "$with_inotify" in
  355. check)
  356. AC_CHECK_FUNC([inotify_init],
  357. [
  358. HAVE_INOTIFY=2
  359. ],
  360. [
  361. AC_CHECK_LIB([inotify], [inotify_init],
  362. [
  363. AC_CHECK_HEADER(sys/inotify.h, [
  364. LDFLAGS="${LDFLAGS} -linotify"
  365. HAVE_INOTIFY=1
  366. ])
  367. ]
  368. )
  369. ]
  370. )
  371. ;;
  372. native)
  373. AC_CHECK_FUNC([inotify_init],
  374. [
  375. AC_CHECK_HEADER(sys/inotify.h, [], [AC_MSG_FAILURE([Cannot find sys/inotify.h])])
  376. HAVE_INOTIFY=2
  377. ],
  378. [
  379. AC_MSG_FAILURE(
  380. [There is no inotify native support on this system])
  381. ]
  382. )
  383. ;;
  384. lib)
  385. AC_CHECK_LIB([inotify], [inotify_init],
  386. [
  387. AC_CHECK_HEADER(sys/inotify.h, [], [AC_MSG_FAILURE([Cannot find sys/inotify.h])])
  388. LDFLAGS="${LDFLAGS} -linotify"
  389. HAVE_INOTIFY=1
  390. ],
  391. [
  392. AC_MSG_FAILURE(
  393. [Cannot find libinotify])
  394. ]
  395. )
  396. ;;
  397. esac
  398. case "$with_gio" in
  399. check)
  400. PKG_CHECK_MODULES(GIO, [gio-2.0], [
  401. HAVE_GIO=1
  402. AC_SUBST([GIO_CFLAGS])
  403. AC_SUBST([GIO_LIBS])
  404. ])
  405. ;;
  406. lib)
  407. PKG_CHECK_MODULES(GIO, [gio-2.0], [
  408. HAVE_GIO=1
  409. AC_SUBST([GIO_CFLAGS])
  410. AC_SUBST([GIO_LIBS])
  411. ], [
  412. AC_MSG_FAILURE([Cannot find libgio-2.0])
  413. ])
  414. ;;
  415. esac
  416. case "$with_bsm" in
  417. check)
  418. AC_CHECK_FUNC([au_fetch_tok],
  419. [
  420. HAVE_BSM=2
  421. ],
  422. [
  423. AC_CHECK_LIB([bsm], [au_fetch_tok],
  424. [
  425. AC_CHECK_HEADER(bsm/libbsm.h, [
  426. LDFLAGS="${LDFLAGS} -lbsm"
  427. HAVE_BSM=1
  428. ])
  429. ]
  430. )
  431. ]
  432. )
  433. ;;
  434. lib)
  435. AC_CHECK_LIB([bsm], [au_fetch_tok],
  436. [
  437. AC_CHECK_HEADER(bsm/libbsm.h, [], [AC_MSG_FAILURE([Cannot find bsm/libbsm.h])])
  438. LDFLAGS="${LDFLAGS} -lbsm"
  439. HAVE_BSM=1
  440. ],
  441. [
  442. AC_MSG_FAILURE(
  443. [Cannot find libbsm])
  444. ]
  445. )
  446. ;;
  447. esac
  448. #AC_CHECK_PROG([HAVE_DTRACEPIPE], [dtrace], [found])
  449. AS_IF([test "$HAVE_INOTIFY" != ""], [AC_CHECK_FUNC([inotify_init1], [], [INOTIFY_OLD=1])])
  450. dnl calc is used only in kqueue and cluster code
  451. AS_IF([test "$HAVE_KQUEUE" != "" -o "$HAVE_CLUSTER" != ""], [HAVE_CALC=1])
  452. AM_CONDITIONAL([HAVE_KQUEUE], [test "x$HAVE_KQUEUE" != "x"])
  453. AM_CONDITIONAL([HAVE_INOTIFY], [test "x$HAVE_INOTIFY" != "x"])
  454. AM_CONDITIONAL([INOTIFY_OLD], [test "x$INOTIFY_OLD" != "x"])
  455. AM_CONDITIONAL([HAVE_FANOTIFY], [test "x$HAVE_FANOTIFY" != "x"])
  456. AM_CONDITIONAL([HAVE_BSM], [test "x$HAVE_BSM" != "x"])
  457. AM_CONDITIONAL([HAVE_GIO], [test "x$HAVE_GIO" != "x"])
  458. AM_CONDITIONAL([HAVE_DTRACEPIPE], [test "x$HAVE_DTRACEPIPE" != "x"])
  459. AM_CONDITIONAL([HAVE_BACKTRACE], [test "x$HAVE_BACKTRACE" != "x"])
  460. AM_CONDITIONAL([HAVE_CAPABILITIES], [test "x$HAVE_CAPABILITIES" != "x"])
  461. AM_CONDITIONAL([HAVE_GETMNTENT], [test "x$HAVE_GETMNTENT" != "x"])
  462. AM_CONDITIONAL([HAVE_PIVOTROOT], [test "x$HAVE_PIVOTROOT" != "x"])
  463. AM_CONDITIONAL([HAVE_CLUSTER], [test "x$HAVE_CLUSTER" != "x"])
  464. AM_CONDITIONAL([HAVE_UNSHARE], [test "x$HAVE_UNSHARE" != "x"])
  465. AM_CONDITIONAL([HAVE_SECCOMP], [test "x$HAVE_SECCOMP" != "x"])
  466. AM_CONDITIONAL([HAVE_TRE], [test "x$HAVE_TRE" != "x"])
  467. AM_CONDITIONAL([HAVE_LIBCGROUP], [test "x$HAVE_LIBCGROUP" != "x"])
  468. AM_CONDITIONAL([HAVE_PTHREAD_TIMEDJOIN_NP], [test "x$HAVE_PTHREAD_TIMEDJOIN_NP" != "x"])
  469. AM_CONDITIONAL([HAVE_CALC], [test "x$HAVE_CALC" != "x"])
  470. AM_CONDITIONAL([HAVE_LTO], [test "x$HAVE_LTO" != "x"])
  471. AS_IF([test "$HAVE_KQUEUE" = '' -a "$HAVE_INOTIFY" = '' -a "$HAVE_FANOTIFY" = '' -a "$HAVE_BSM" = '' -a "$HAVE_GIO" = '' -a "x$enable_clsync" != "xno"],
  472. [AC_MSG_FAILURE([At least one monitoring engine must be enabled!
  473. Available (depending on system): inotify, kqueue, gio, bsm])])
  474. LIBS="${GLIB_LIBS} ${LIBS}"
  475. AM_CPPFLAGS="${GLIB_CFLAGS}"
  476. AC_SUBST(AM_CPPFLAGS)
  477. dnl Generating program.h
  478. VER_MAJ=$(echo $VERSION | cut -d'.' -f1)
  479. VER_MID=$(echo $VERSION | cut -d'.' -f2)
  480. VER_MIN=$(echo $VERSION | cut -d'.' -f3)
  481. AC_SUBST(VER_MAJ)
  482. AC_SUBST(VER_MID)
  483. AC_SUBST(VER_MIN)
  484. AC_SUBST(PACKAGE_BUGREPORT)
  485. AC_SUBST(PACKAGE_URL)
  486. AC_CONFIG_FILES([Makefile examples/Makefile pkgconfig/libclsync.pc program.h])
  487. AC_OUTPUT
  488. # workaround automake bug with "jobserver unavailable" in lto mode
  489. m4_pattern_allow(AM_V_CCLD)
  490. [sed -i 's/$(AM_V_CCLD)/+$(AM_V_CCLD)/' Makefile]