configure.ac 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.59)
  4. AC_INIT([dirsrv],[1.0],[http://bugzilla.redhat.com/])
  5. # AC_CONFIG_HEADER must be called right after AC_INIT.
  6. AC_CONFIG_HEADERS([config.h])
  7. # include the version information
  8. . $srcdir/VERSION.sh
  9. AC_MSG_NOTICE(This is configure for $PACKAGE_TARNAME $PACKAGE_VERSION)
  10. AC_DEFINE_UNQUOTED([DS_PACKAGE_VERSION], "$PACKAGE_VERSION", [package version])
  11. AC_DEFINE_UNQUOTED([DS_PACKAGE_TARNAME], "$PACKAGE_TARNAME", [package tarball name])
  12. AC_DEFINE_UNQUOTED([DS_PACKAGE_BUGREPORT], "$PACKAGE_BUGREPORT", [package bug report url])
  13. AC_DEFINE_UNQUOTED([DS_PACKAGE_STRING], "$PACKAGE_STRING", [package string])
  14. AM_INIT_AUTOMAKE([1.9 foreign subdir-objects dist-bzip2 no-dist-gzip no-define])
  15. # define these for automake distdir
  16. VERSION=$PACKAGE_VERSION
  17. PACKAGE=$PACKAGE_TARNAME
  18. AC_DEFINE_UNQUOTED([VERSION], "$VERSION", [package version])
  19. AC_DEFINE_UNQUOTED([PACKAGE], "$PACKAGE", [package tar name])
  20. AM_MAINTAINER_MODE
  21. AC_CANONICAL_HOST
  22. # Checks for programs.
  23. AC_PROG_CXX
  24. AC_PROG_CC
  25. AM_PROG_CC_C_O
  26. AM_PROG_AS
  27. # disable static libs by default - we only use a couple
  28. AC_DISABLE_STATIC
  29. AC_PROG_LIBTOOL
  30. # Checks for header files.
  31. AC_HEADER_DIRENT
  32. AC_HEADER_STDC
  33. AC_HEADER_SYS_WAIT
  34. AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/socket.h sys/time.h unistd.h inttypes.h])
  35. # Checks for typedefs, structures, and compiler characteristics.
  36. AC_HEADER_STAT
  37. AC_C_CONST
  38. AC_HEADER_STDBOOL
  39. AC_TYPE_UID_T
  40. AC_TYPE_PID_T
  41. AC_TYPE_SIZE_T
  42. AC_HEADER_TIME
  43. AC_STRUCT_TM
  44. # Checks for library functions.
  45. AC_FUNC_CHOWN
  46. AC_FUNC_CLOSEDIR_VOID
  47. AC_FUNC_ERROR_AT_LINE
  48. AC_FUNC_FORK
  49. AC_FUNC_LSTAT
  50. AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
  51. AC_FUNC_MALLOC
  52. AC_FUNC_MEMCMP
  53. AC_FUNC_MMAP
  54. AC_TYPE_SIGNAL
  55. AC_FUNC_STAT
  56. AC_FUNC_STRERROR_R
  57. AC_FUNC_STRFTIME
  58. AC_FUNC_VPRINTF
  59. AC_CHECK_FUNCS([setrlimit endpwent ftruncate getcwd gethostbyname inet_ntoa localtime_r memmove memset mkdir munmap putenv rmdir socket strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strstr strtol tzset])
  60. AC_MSG_CHECKING(for --enable-debug)
  61. AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debug features (default: no)]),
  62. [
  63. AC_MSG_RESULT(yes)
  64. debug_defs="-DDEBUG -DMCC_DEBUG"
  65. ],
  66. [
  67. AC_MSG_RESULT(no)
  68. debug_defs=""
  69. ])
  70. AC_SUBST([debug_defs])
  71. # Used for legacy style packaging where we bundle all of the dependencies.
  72. AC_MSG_CHECKING(for --enable-bundle)
  73. AC_ARG_ENABLE(bundle, AS_HELP_STRING([--enable-bundle], [Enable bundled dependencies (default: no)]),
  74. [
  75. AC_MSG_RESULT(yes)
  76. bundle="1";
  77. ],
  78. [
  79. AC_MSG_RESULT(no)
  80. bundle="";
  81. ])
  82. AM_CONDITIONAL(BUNDLE,test "$bundle" = "1")
  83. # these enables are for optional or experimental features
  84. if test -z "$enable_pam_passthru" ; then
  85. enable_pam_passthru=yes # if not set on cmdline, set default
  86. fi
  87. AC_MSG_CHECKING(for --enable-pam-passthru)
  88. AC_ARG_ENABLE(pam-passthru,
  89. AS_HELP_STRING([--enable-pam-passthru],
  90. [enable the PAM passthrough auth plugin (default: yes)]))
  91. if test "$enable_pam_passthru" = yes ; then
  92. AC_MSG_RESULT(yes)
  93. AC_DEFINE([ENABLE_PAM_PASSTHRU], [1], [enable the pam passthru auth plugin])
  94. else
  95. AC_MSG_RESULT(no)
  96. fi
  97. AM_CONDITIONAL(enable_pam_passthru,test "$enable_pam_passthru" = "yes")
  98. if test -z "$enable_dna" ; then
  99. enable_dna=yes # if not set on cmdline, set default
  100. fi
  101. AC_MSG_CHECKING(for --enable-dna)
  102. AC_ARG_ENABLE(dna,
  103. AS_HELP_STRING([--enable-dna],
  104. [enable the Distributed Numeric Assignment (DNA) plugin (default: yes)]))
  105. if test "$enable_dna" = yes ; then
  106. AC_MSG_RESULT(yes)
  107. AC_DEFINE([ENABLE_DNA], [1], [enable the dna plugin])
  108. else
  109. AC_MSG_RESULT(no)
  110. fi
  111. AM_CONDITIONAL(enable_dna,test "$enable_dna" = "yes")
  112. if test -z "$enable_ldapi" ; then
  113. enable_ldapi=yes # if not set on cmdline, set default
  114. fi
  115. AC_MSG_CHECKING(for --enable-ldapi)
  116. AC_ARG_ENABLE(ldapi,
  117. AS_HELP_STRING([--enable-ldapi],
  118. [enable LDAP over unix domain socket (LDAPI) support (default: yes)]))
  119. if test "$enable_ldapi" = yes ; then
  120. AC_MSG_RESULT(yes)
  121. AC_DEFINE([ENABLE_LDAPI], [1], [enable ldapi support in the server])
  122. else
  123. AC_MSG_RESULT(no)
  124. fi
  125. AM_CONDITIONAL(enable_ldapi,test "$enable_ldapi" = "yes")
  126. if test -z "$enable_autobind" ; then
  127. enable_autobind=no # if not set on cmdline, set default
  128. fi
  129. AC_MSG_CHECKING(for --enable-autobind)
  130. AC_ARG_ENABLE(autobind,
  131. AS_HELP_STRING([--enable-autobind],
  132. [enable auto bind over unix domain socket (LDAPI) support (default: no)]))
  133. if test "$enable_ldapi" = yes -a "$enable_autobind" = yes ; then
  134. AC_MSG_RESULT(yes)
  135. AC_DEFINE([ENABLE_AUTOBIND], [1], [enable ldapi auto bind support in the server])
  136. else
  137. AC_MSG_RESULT(no)
  138. fi
  139. AM_CONDITIONAL(enable_autobind,test "$enable_autobind" = "yes")
  140. if test -z "$enable_auto_dn_suffix" ; then
  141. enable_auto_dn_suffix=no # if not set on cmdline, set default
  142. fi
  143. AC_MSG_CHECKING(for --enable-auto-dn-suffix)
  144. AC_ARG_ENABLE(autobind,
  145. AS_HELP_STRING([--enable-auto-dn-suffix],
  146. [enable auto bind with auto dn suffix over unix domain socket (LDAPI) support (default: no)]))
  147. if test "$enable_ldapi" = yes -a "$enable_autobind" = yes -a "$enable_auto_dn_suffix" = "yes"; then
  148. AC_MSG_RESULT(yes)
  149. AC_DEFINE([ENABLE_AUTO_DN_SUFFIX], [1], [enable ldapi auto bind with auto dn suffix support in the server])
  150. else
  151. AC_MSG_RESULT(no)
  152. fi
  153. AM_CONDITIONAL(enable_auto_dn_suffix,test "$enable_auto_dn_suffix" = "yes")
  154. if test -z "$enable_bitwise" ; then
  155. enable_bitwise=yes # if not set on cmdline, set default
  156. fi
  157. AC_MSG_CHECKING(for --enable-bitwise)
  158. AC_ARG_ENABLE(bitwise,
  159. AS_HELP_STRING([--enable-bitwise],
  160. [enable the bitwise matching rule plugin (default: yes)]))
  161. if test "$enable_bitwise" = yes ; then
  162. AC_MSG_RESULT(yes)
  163. AC_DEFINE([ENABLE_BITWISE], [1], [enable the bitwise plugin])
  164. else
  165. AC_MSG_RESULT(no)
  166. fi
  167. AM_CONDITIONAL(enable_bitwise,test "$enable_bitwise" = "yes")
  168. if test -z "$enable_presence" ; then
  169. enable_presence=no # if not set on cmdline, set default
  170. fi
  171. AC_MSG_CHECKING(for --enable-presence)
  172. AC_ARG_ENABLE(presence,
  173. AS_HELP_STRING([--enable-presence],
  174. [enable the presence plugin (default: no)]))
  175. if test "$enable_presence" = yes ; then
  176. AC_MSG_RESULT(yes)
  177. AC_DEFINE([ENABLE_PRESENCE], [1], [enable the presence plugin])
  178. else
  179. AC_MSG_RESULT(no)
  180. fi
  181. AM_CONDITIONAL(enable_presence,test "$enable_presence" = "yes")
  182. # the default prefix - override with --prefix or --with-fhs
  183. AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])
  184. m4_include(m4/fhs.m4)
  185. # installation paths - by default, we store everything
  186. # under the prefix. The with-fhs option will use /usr,
  187. # /etc, and /var. The with-fhs-opt option will use the
  188. # prefix, but it's sysconfdir and localstatedir will be
  189. # /etc/opt, and /var/opt.
  190. if test "$with_fhs_opt" = "yes"; then
  191. # Override sysconfdir and localstatedir if FHS optional
  192. # package was requested.
  193. sysconfdir='/etc/opt'
  194. localstatedir='/var/opt'
  195. # relative to datadir
  196. sampledatadir=/data
  197. # relative to datadir
  198. scripttemplatedir=/script-templates
  199. # relative to datadir
  200. updatedir=/updates
  201. # relative to libdir
  202. serverdir=
  203. # relative to libdir
  204. serverplugindir=/plugins
  205. # relative to datadir
  206. infdir=/inf
  207. # relative to datadir
  208. mibdir=/mibs
  209. # location of property/resource files, relative to datadir
  210. propertydir=/properties
  211. # relative to libdir
  212. perldir=/perl
  213. else
  214. if test "$with_fhs" = "yes"; then
  215. ac_default_prefix=/usr
  216. prefix=$ac_default_prefix
  217. exec_prefix=$prefix
  218. dnl as opposed to the default /usr/etc
  219. sysconfdir='/etc'
  220. dnl as opposed to the default /usr/var
  221. localstatedir='/var'
  222. fi
  223. # relative to datadir
  224. sampledatadir=/$PACKAGE_NAME/data
  225. # relative to datadir
  226. scripttemplatedir=/$PACKAGE_NAME/script-templates
  227. # relative to datadir
  228. updatedir=/$PACKAGE_NAME/updates
  229. # relative to libdir
  230. serverdir=/$PACKAGE_NAME
  231. # relative to libdir
  232. serverplugindir=/$PACKAGE_NAME/plugins
  233. # relative to datadir
  234. infdir=/$PACKAGE_NAME/inf
  235. # relative to datadir
  236. mibdir=/$PACKAGE_NAME/mibs
  237. # location of property/resource files, relative to datadir
  238. propertydir=/$PACKAGE_NAME/properties
  239. # relative to libdir
  240. perldir=/$PACKAGE_NAME/perl
  241. fi
  242. # if mandir is the default value, override it
  243. # otherwise, the user must have set it - just use it
  244. if test X"$mandir" = X'${prefix}/man' ; then
  245. mandir='$(datadir)/man'
  246. fi
  247. # Shared paths for all layouts
  248. # relative to sysconfdir
  249. configdir=/$PACKAGE_NAME/config
  250. # relative to sysconfdir
  251. schemadir=/$PACKAGE_NAME/schema
  252. # default user, group
  253. defaultuser=nobody
  254. defaultgroup=nobody
  255. AC_SUBST(configdir)
  256. AC_SUBST(sampledatadir)
  257. AC_SUBST(propertydir)
  258. AC_SUBST(schemadir)
  259. AC_SUBST(serverdir)
  260. AC_SUBST(serverplugindir)
  261. AC_SUBST(scripttemplatedir)
  262. AC_SUBST(perldir)
  263. AC_SUBST(infdir)
  264. AC_SUBST(mibdir)
  265. AC_SUBST(mandir)
  266. AC_SUBST(updatedir)
  267. AC_SUBST(defaultuser)
  268. AC_SUBST(defaultgroup)
  269. # check for --with-instconfigdir
  270. AC_MSG_CHECKING(for --with-instconfigdir)
  271. AC_ARG_WITH(instconfigdir,
  272. AS_HELP_STRING([--with-instconfigdir=/path],
  273. [Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)]),
  274. [
  275. if test $withval = yes ; then
  276. AC_ERROR([Please specify a full path with --with-instconfigdir])
  277. fi
  278. instconfigdir="$withval"
  279. AC_MSG_RESULT($withval)
  280. ],
  281. [
  282. dnl this value is expanded out in Makefile.am
  283. instconfigdir='$(sysconfdir)/$(PACKAGE_NAME)'
  284. AC_MSG_RESULT(no)
  285. ])
  286. AC_SUBST(instconfigdir)
  287. # WINNT should be true if building on Windows system not using
  288. # cygnus, mingw, or the like and using cmd.exe as the shell
  289. AM_CONDITIONAL([WINNT], false)
  290. # Deal with platform dependent defines
  291. # relative to sysconfdir
  292. initdir=/rc.d
  293. # on most platforms, we will just use perl from PATH
  294. # On some platforms, we cannot. Why not just use any old
  295. # perl? Because of perldap. We use a perldap that is
  296. # compiled to either 32bit or 64bit, so we must use a native
  297. # perl binary compiled with the same bitsize. On Solaris
  298. # and HP-UX, /usr/bin/perl is 32 bit, so we cannot use
  299. # those with our 64 bit compiled product.
  300. perlexec='/usr/bin/env perl'
  301. case $host in
  302. *-*-linux*)
  303. AC_DEFINE([XP_UNIX], [1], [UNIX])
  304. AC_DEFINE([Linux], [1], [Linux])
  305. AC_DEFINE([LINUX], [1], [Linux])
  306. AC_DEFINE([LINUX2_0], [1], [Linux 2.0])
  307. AC_DEFINE([LINUX2_2], [1], [Linux 2.2])
  308. AC_DEFINE([LINUX2_4], [1], [Linux 2.4])
  309. AC_DEFINE([_GNU_SOURCE], [1], [GNU Source])
  310. platform="linux"
  311. # relative to sysconfdir
  312. initdir=/rc.d/init.d
  313. # do arch specific linux stuff here
  314. case $host in
  315. i*86-*-linux*)
  316. AC_DEFINE([CPU_x86], [], [cpu type x86])
  317. AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
  318. AC_CHECK_DECLS([__sync_add_and_fetch])
  319. ;;
  320. x86_64-*-linux*)
  321. AC_DEFINE([CPU_x86_64], [], [cpu type x86_64])
  322. AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
  323. AC_CHECK_DECLS([__sync_add_and_fetch])
  324. ;;
  325. esac
  326. ;;
  327. ia64-hp-hpux*)
  328. AC_DEFINE([XP_UNIX], [1], [UNIX])
  329. AC_DEFINE([hpux], [1], [HP-UX])
  330. AC_DEFINE([HPUX], [1], [HP-UX])
  331. AC_DEFINE([HPUX11], [1], [HP-UX 11])
  332. AC_DEFINE([HPUX11_23], [1], [HP-UX 11.23])
  333. AC_DEFINE([CPU_ia64], [], [cpu type ia64])
  334. AC_DEFINE([OS_hpux], [1], [OS HP-UX])
  335. AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision])
  336. AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace])
  337. AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h])
  338. AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
  339. # assume 64 bit
  340. perlexec='/opt/perl_64/bin/perl'
  341. platform="hpux"
  342. initconfigdir="/$PACKAGE_NAME/config"
  343. ;;
  344. hppa*-hp-hpux*)
  345. AC_DEFINE([XP_UNIX], [1], [UNIX])
  346. AC_DEFINE([hpux], [1], [HP-UX])
  347. AC_DEFINE([HPUX], [1], [HP-UX])
  348. AC_DEFINE([HPUX11], [1], [HP-UX 11])
  349. AC_DEFINE([HPUX11_11], [1], [HP-UX 11.11])
  350. AC_DEFINE([CPU_hppa], [], [cpu type pa-risc])
  351. AC_DEFINE([OS_hpux], [1], [OS HP-UX])
  352. AC_DEFINE([_POSIX_C_SOURCE], [199506L], [POSIX revision])
  353. AC_DEFINE([_HPUX_SOURCE], [1], [Source namespace])
  354. AC_DEFINE([_INCLUDE_STDC__SOURCE_199901], [1], [to pick up all of the printf format macros in inttypes.h])
  355. AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
  356. # assume 64 bit
  357. initconfigdir="/$PACKAGE_NAME/config"
  358. perlexec='/opt/perl_64/bin/perl'
  359. platform="hpux"
  360. ;;
  361. sparc-sun-solaris*)
  362. AC_DEFINE([XP_UNIX], [1], [UNIX])
  363. AC_DEFINE([SVR4], [1], [SVR4])
  364. AC_DEFINE([__svr4], [1], [SVR4])
  365. AC_DEFINE([__svr4__], [1], [SVR4])
  366. AC_DEFINE([_SVID_GETTOD], [1], [SVID_GETTOD])
  367. AC_DEFINE([SOLARIS], [1], [SOLARIS])
  368. AC_DEFINE([CPU_sparc], [], [cpu type sparc])
  369. AC_DEFINE([OS_solaris], [1], [OS SOLARIS])
  370. AC_DEFINE([sunos5], [1], [SunOS5])
  371. AC_DEFINE([OSVERSION], [509], [OS version])
  372. AC_DEFINE([_REENTRANT], [1], [_REENTRANT])
  373. AC_DEFINE([NO_DOMAINNAME], [1], [no getdomainname])
  374. AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
  375. dnl socket nsl and dl are required to link several programs and libdb
  376. LIBSOCKET=-lsocket
  377. AC_SUBST([LIBSOCKET], [$LIBSOCKET])
  378. LIBNSL=-lnsl
  379. AC_SUBST([LIBNSL], [$LIBNSL])
  380. LIBDL=-ldl
  381. AC_SUBST([LIBDL], [$LIBDL])
  382. dnl Cstd and Crun are required to link any C++ related code
  383. LIBCSTD=-lCstd
  384. AC_SUBST([LIBCSTD], [$LIBCSTD])
  385. LIBCRUN=-lCrun
  386. AC_SUBST([LIBCRUN], [$LIBCRUN])
  387. platform="solaris"
  388. # assume 64 bit
  389. perlexec='/usr/lib/sparcv9/dirsec/perl5x/bin/perl'
  390. # relative to sysconfdir
  391. initdir=/init.d
  392. ;;
  393. *)
  394. platform=""
  395. ;;
  396. esac
  397. AC_SUBST(initdir)
  398. AC_SUBST(perlexec)
  399. # set default initconfigdir if not already set
  400. # value will be set so as to be relative to $(sysconfdir)
  401. if test -z "$initconfigdir" ; then
  402. if test -d /etc/sysconfig ; then
  403. initconfigdir=/sysconfig
  404. elif test -d /etc/default ; then
  405. initconfigdir=/default
  406. else
  407. initconfigdir="/$PACKAGE_NAME/config"
  408. fi
  409. fi
  410. AC_SUBST(initconfigdir)
  411. AM_CONDITIONAL(HPUX,test "$platform" = "hpux")
  412. AM_CONDITIONAL(SOLARIS,test "$platform" = "solaris")
  413. # Check for library dependencies
  414. m4_include(m4/nspr.m4)
  415. m4_include(m4/nss.m4)
  416. # default to Mozilla LDAP C SDK - override with --with-openldap
  417. with_ldapsdk=yes
  418. m4_include(m4/openldap.m4)
  419. m4_include(m4/mozldap.m4)
  420. m4_include(m4/db.m4)
  421. m4_include(m4/sasl.m4)
  422. m4_include(m4/svrcore.m4)
  423. m4_include(m4/icu.m4)
  424. m4_include(m4/netsnmp.m4)
  425. m4_include(m4/kerberos.m4)
  426. m4_include(m4/pcre.m4)
  427. m4_include(m4/selinux.m4)
  428. PACKAGE_BASE_VERSION=`echo $PACKAGE_VERSION | awk -F\. '{print $1"."$2}'`
  429. AC_SUBST(PACKAGE_BASE_VERSION)
  430. # set sasl_path for wrapper scripts
  431. if test -z "$sasl_libdir" ; then
  432. sasl_path="$libdir/sasl2"
  433. else
  434. sasl_path="$sasl_libdir/sasl2"
  435. fi
  436. AM_CONDITIONAL(SELINUX,test "$with_selinux" = "yes")
  437. AM_CONDITIONAL(OPENLDAP,test "$with_openldap" = "yes")
  438. # write out paths for binary components
  439. AC_SUBST(nspr_inc)
  440. AC_SUBST(nspr_lib)
  441. AC_SUBST(nspr_libdir)
  442. AC_SUBST(nss_inc)
  443. AC_SUBST(nss_lib)
  444. AC_SUBST(nss_libdir)
  445. AC_SUBST(ldapsdk_inc)
  446. AC_SUBST(ldapsdk_lib)
  447. AC_SUBST(ldapsdk_libdir)
  448. AC_SUBST(ldapsdk_bindir)
  449. AC_SUBST(openldap_inc)
  450. AC_SUBST(openldap_lib)
  451. AC_SUBST(openldap_libdir)
  452. AC_SUBST(openldap_bindir)
  453. AC_SUBST(ol_libver)
  454. AC_SUBST(db_inc)
  455. AC_SUBST(db_incdir)
  456. AC_SUBST(db_lib)
  457. AC_SUBST(db_libdir)
  458. AC_SUBST(db_bindir)
  459. AC_SUBST(db_libver)
  460. AC_SUBST(sasl_inc)
  461. AC_SUBST(sasl_lib)
  462. AC_SUBST(sasl_libdir)
  463. AC_SUBST(sasl_path)
  464. AC_SUBST(svrcore_inc)
  465. AC_SUBST(svrcore_lib)
  466. AC_SUBST(icu_lib)
  467. AC_SUBST(icu_inc)
  468. AC_SUBST(icu_bin)
  469. AC_SUBST(netsnmp_inc)
  470. AC_SUBST(netsnmp_lib)
  471. AC_SUBST(netsnmp_libdir)
  472. AC_SUBST(netsnmp_link)
  473. AC_SUBST(pcre_inc)
  474. AC_SUBST(pcre_lib)
  475. AC_SUBST(pcre_libdir)
  476. AC_SUBST(brand)
  477. AC_SUBST(capbrand)
  478. AC_SUBST(vendor)
  479. AC_DEFINE([LDAP_DEBUG], [1], [LDAP debug flag])
  480. AC_DEFINE([LDAP_DONT_USE_SMARTHEAP], [1], [Don't use smartheap])
  481. # libtool on fedora/rhel contains some gcc-isms which cause problems
  482. # if not using gcc (e.g. Forte on Solaris, aCC on HP-UX)
  483. # we remove them here
  484. if test "$GCC" != yes ; then
  485. AC_MSG_NOTICE([Not using gcc - fixing libtool to remove gcc-isms . . .])
  486. cp -p libtool libtool.orig
  487. cp -p libtool libtool.tmp
  488. # dnl note the special chars @<:@ and @:>@ - since m4 treats [ and ] specially,
  489. # we have to use the quadrigraph @<:@ for [ and @:>@ for ] - and you thought
  490. # perl produced write-only code . . .
  491. sed -e '/^gcc_dir/ d' \
  492. -e '/^gcc_ver/ d' \
  493. -e 's/^predep_objects=.*echo \("@<:@^"@:>@*"\).*$/predep_objects=\1/' \
  494. -e 's/^postdep_objects=.*echo \("@<:@^"@:>@*"\).*$/postdep_objects=\1/' \
  495. -e 's/^compiler_lib_search_path=.*echo \("@<:@^"@:>@*"\).*$/compiler_lib_search_path=\1/' \
  496. -e 's/^sys_lib_search_path_spec=.*echo \("@<:@^"@:>@*"\).*$/sys_lib_search_path_spec=\1/' \
  497. libtool > libtool.tmp
  498. cp -p libtool.tmp libtool
  499. rm -f libtool.tmp
  500. fi
  501. AC_CONFIG_FILES([Makefile])
  502. AC_OUTPUT