configure.ac 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.59)
  4. AC_INIT([fedora-ds], [1.1], [http://bugzilla.redhat.com/])
  5. AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
  6. AC_CANONICAL_HOST
  7. # Checks for programs.
  8. AC_PROG_CXX
  9. AC_PROG_CC
  10. AM_PROG_CC_C_O
  11. AC_PROG_LIBTOOL
  12. # Checks for header files.
  13. AC_HEADER_DIRENT
  14. AC_HEADER_STDC
  15. AC_HEADER_SYS_WAIT
  16. 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])
  17. # Checks for typedefs, structures, and compiler characteristics.
  18. AC_HEADER_STAT
  19. AC_C_CONST
  20. AC_HEADER_STDBOOL
  21. AC_TYPE_UID_T
  22. AC_TYPE_PID_T
  23. AC_TYPE_SIZE_T
  24. AC_HEADER_TIME
  25. AC_STRUCT_TM
  26. # Checks for library functions.
  27. AC_FUNC_CHOWN
  28. AC_FUNC_CLOSEDIR_VOID
  29. AC_FUNC_ERROR_AT_LINE
  30. AC_FUNC_FORK
  31. AC_FUNC_LSTAT
  32. AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
  33. AC_FUNC_MALLOC
  34. AC_FUNC_MEMCMP
  35. AC_FUNC_MMAP
  36. AC_TYPE_SIGNAL
  37. AC_FUNC_STAT
  38. AC_FUNC_STRERROR_R
  39. AC_FUNC_STRFTIME
  40. AC_FUNC_VPRINTF
  41. 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])
  42. # Deal with platform dependent defines
  43. case $host in
  44. *-*-linux*)
  45. platform_defs="-DXP_UNIX -DLinux -DLINUX -DLINUX2_0 -DLINUX2_2 -DLINUX2_4"
  46. platform="linux"
  47. ;;
  48. ia64-hp-hpux*)
  49. platform_defs="-DXP_UNIX -Dhpux -DHPUX -DHPUX11 -DHPUX11_11 -DCPU_ia64 -DOS_hpux -D_PR_NTHREAD"
  50. platform="hpux"
  51. ;;
  52. hppa*-hp-hpux*)
  53. platform_defs="-DXP_UNIX -Dhpux -DHPUX -DHPUX11 -DHPUX11_11 -DCPU_hppa -DOS_hpux -D_PR_NTHREAD"
  54. platform="hpux"
  55. ;;
  56. sparc-sun-solaris*)
  57. platform_defs="-DXP_UNIX -DSVR4 -D__svr4 -D__svr4__ -D_SVID_GETTOD -DSOLARIS -DCPU_sparc -DOS_solaris -Dsunos5 -DOSVERSION=509 -D_REENTRANT"
  58. platform="solaris"
  59. ;;
  60. *)
  61. platform_defs=""
  62. platform=""
  63. ;;
  64. esac
  65. AC_SUBST([platform_defs])
  66. AM_CONDITIONAL(SOLARIS,test $platform = solaris)
  67. AC_MSG_CHECKING(for --enable-debug)
  68. AC_ARG_ENABLE(debug, [ --enable-debug Enable debug features],
  69. [
  70. AC_MSG_RESULT(yes)
  71. debug_defs="-DDEBUG -DMCC_DEBUG"
  72. ],
  73. [
  74. AC_MSG_RESULT(no)
  75. debug_defs=""
  76. ])
  77. AC_SUBST([debug_defs])
  78. AC_PREFIX_DEFAULT([/opt/fedora-ds])
  79. # Check for library dependencies
  80. m4_include(m4/nspr.m4)
  81. m4_include(m4/nss.m4)
  82. m4_include(m4/mozldap.m4)
  83. m4_include(m4/db.m4)
  84. m4_include(m4/sasl.m4)
  85. m4_include(m4/svrcore.m4)
  86. m4_include(m4/icu.m4)
  87. m4_include(m4/netsnmp.m4)
  88. # write out paths for binary components
  89. AC_SUBST(nspr_inc)
  90. AC_SUBST(nspr_lib)
  91. AC_SUBST(nspr_libdir)
  92. AC_SUBST(nss_inc)
  93. AC_SUBST(nss_lib)
  94. AC_SUBST(nss_libdir)
  95. AC_SUBST(ldapsdk_inc)
  96. AC_SUBST(ldapsdk_lib)
  97. AC_SUBST(ldapsdk_libdir)
  98. AC_SUBST(db_inc)
  99. AC_SUBST(db_incdir)
  100. AC_SUBST(db_lib)
  101. AC_SUBST(db_libdir)
  102. AC_SUBST(sasl_inc)
  103. AC_SUBST(sasl_lib)
  104. AC_SUBST(sasl_libdir)
  105. AC_SUBST(svrcore_inc)
  106. AC_SUBST(svrcore_lib)
  107. AC_SUBST(icu_lib)
  108. AC_SUBST(icu_inc)
  109. AC_SUBST(icu_bin)
  110. AC_SUBST(netsnmp_inc)
  111. AC_SUBST(netsnmp_lib)
  112. AC_SUBST(netsnmp_libdir)
  113. AC_SUBST(netsnmp_link)
  114. # installation paths
  115. bindir=/usr/bin
  116. configdir=/fedora-ds/config
  117. datadir=/usr/share/fedora-ds/data
  118. propertydir=/fedora-ds/property
  119. schemadir=/fedora-ds/schema
  120. serverdir=/usr/lib/fedora-ds
  121. serverplugindir=/usr/lib/fedora-ds/plugins
  122. AC_SUBST(bindir)
  123. AC_SUBST(configdir)
  124. AC_SUBST(datadir)
  125. AC_SUBST(propertydir)
  126. AC_SUBST(schemadir)
  127. AC_SUBST(serverdir)
  128. AC_SUBST(serverplugindir)
  129. # WINNT should be true if building on Windows system not using
  130. # cygnus, mingw, or the like and using cmd.exe as the shell
  131. AM_CONDITIONAL([WINNT], false)
  132. AC_CONFIG_FILES([Makefile])
  133. AC_CONFIG_FILES([wrappers/dbscan])
  134. AC_CONFIG_FILES([wrappers/dsktune])
  135. AC_CONFIG_FILES([wrappers/ds_newinst])
  136. AC_CONFIG_FILES([wrappers/infadd])
  137. AC_CONFIG_FILES([wrappers/ldap-agent])
  138. AC_CONFIG_FILES([wrappers/ldclt])
  139. AC_CONFIG_FILES([wrappers/ldif])
  140. AC_CONFIG_FILES([wrappers/migratecred])
  141. AC_CONFIG_FILES([wrappers/mmldif])
  142. AC_CONFIG_FILES([wrappers/pwdhash])
  143. AC_CONFIG_FILES([wrappers/rsearch])
  144. AC_OUTPUT