configure.ac 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. #
  2. # Copyright (C) 1994-2018 Altair Engineering, Inc.
  3. # For more information, contact Altair at www.altair.com.
  4. #
  5. # This file is part of the PBS Professional ("PBS Pro") software.
  6. #
  7. # Open Source License Information:
  8. #
  9. # PBS Pro is free software. You can redistribute it and/or modify it under the
  10. # terms of the GNU Affero General Public License as published by the Free
  11. # Software Foundation, either version 3 of the License, or (at your option) any
  12. # later version.
  13. #
  14. # PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  15. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16. # FOR A PARTICULAR PURPOSE.
  17. # See the GNU Affero General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU Affero General Public License
  20. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  21. #
  22. # Commercial License Information:
  23. #
  24. # For a copy of the commercial license terms and conditions,
  25. # go to: (http://www.pbspro.com/UserArea/agreement.html)
  26. # or contact the Altair Legal Department.
  27. #
  28. # Altair’s dual-license business model allows companies, individuals, and
  29. # organizations to create proprietary derivative works of PBS Pro and
  30. # distribute them - whether embedded or bundled with other software -
  31. # under a commercial license agreement.
  32. #
  33. # Use of Altair’s trademarks, including but not limited to "PBS™",
  34. # "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  35. # trademark licensing policies.
  36. #
  37. AC_PREREQ([2.63])
  38. # Use PBS_VERSION to override the version statically defined here. For example:
  39. # ./configure PBS_VERSION=19.1.3 --prefix=/opt/pbs
  40. AC_INIT([PBS Professional],
  41. [19.1.3],
  42. [pbssupport@altair.com],
  43. [pbspro],
  44. [http://www.pbspro.org/])
  45. AC_CONFIG_HEADERS([src/include/pbs_config.h])
  46. AC_CONFIG_SRCDIR([src/cmds/qmgr.c])
  47. AC_CONFIG_AUX_DIR([buildutils])
  48. AC_CONFIG_MACRO_DIR([m4])
  49. AC_CANONICAL_TARGET([])
  50. os_id=`grep ^ID= /etc/os-release | sed -n 's/.*"\(.*\)"/\1/p'`
  51. AS_CASE([$os_id],
  52. [opensuse-tumbleweed], m4_define([am_init_string], [-Wall foreign subdir-objects]),
  53. [*], m4_define([am_init_string], [-Wall foreign]))
  54. AM_INIT_AUTOMAKE(am_init_string)
  55. AC_USE_SYSTEM_EXTENSIONS
  56. # Checks for programs.
  57. AC_PROG_AWK
  58. AC_PROG_YACC
  59. AC_PROG_SED
  60. AC_PROG_CC
  61. AC_PROG_LEX
  62. AC_PROG_INSTALL
  63. AC_PROG_LN_S
  64. # Automake macros
  65. #AM_PROG_AR macro is defined with automake version >= 1.12
  66. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  67. AM_PROG_CC_C_O
  68. # Initialize libtool
  69. LT_INIT([shared static])
  70. # Checks for libraries.
  71. AC_CHECK_LIB([c], [xdr_int],
  72. [],
  73. AC_CHECK_LIB(nsl, xdr_int)
  74. )
  75. AC_CHECK_LIB([c], [ruserok],
  76. [],
  77. AC_CHECK_LIB(socket, ruserok)
  78. )
  79. AC_CHECK_LIB([c], [crypt],
  80. [],
  81. AC_CHECK_LIB(crypt, crypt)
  82. )
  83. AC_CHECK_LIB([c], [posix_openpt],
  84. AC_DEFINE([HAVE_POSIX_OPENPT], [], [Defined whe posix_openpt is available])
  85. )
  86. AC_CHECK_LIB(dl, dlopen)
  87. AC_CHECK_LIB([kvm], [kvm_open])
  88. AC_CHECK_LIB([socket], [socket],
  89. [socket_lib="-lsocket -lnsl"]
  90. AC_SUBST(socket_lib),
  91. [socket_lib=""]
  92. AC_SUBST(socket_lib),
  93. [-lnsl]
  94. )
  95. AC_CHECK_LIB([c], [malloc_info],
  96. AC_DEFINE([HAVE_MALLOC_INFO], [], [Defined when malloc_info is available])
  97. )
  98. # Check for X Window System
  99. AC_PATH_XTRA
  100. # Checks for optional header files.
  101. AC_CHECK_HEADERS([ \
  102. com_err.h \
  103. gssapi.h \
  104. krb5.h \
  105. libpq-fe.h \
  106. mach/mach.h \
  107. nlist.h \
  108. sys/eventfd.h \
  109. sys/systeminfo.h \
  110. ])
  111. # Checks for required header files.
  112. AC_CHECK_HEADERS([ \
  113. stdio.h \
  114. alloca.h \
  115. arpa/inet.h \
  116. asm/types.h \
  117. assert.h \
  118. crypt.h \
  119. ctype.h \
  120. dirent.h \
  121. dlfcn.h \
  122. execinfo.h \
  123. fcntl.h \
  124. features.h \
  125. float.h \
  126. fstab.h \
  127. ftw.h \
  128. grp.h \
  129. libgen.h \
  130. limits.h \
  131. malloc.h \
  132. math.h \
  133. memory.h \
  134. mntent.h \
  135. netdb.h \
  136. netinet/in.h \
  137. netinet/in_systm.h \
  138. netinet/ip.h \
  139. netinet/tcp.h \
  140. openssl/aes.h \
  141. openssl/bio.h \
  142. openssl/err.h \
  143. openssl/evp.h \
  144. openssl/ssl.h \
  145. paths.h \
  146. poll.h \
  147. pthread.h \
  148. pwd.h \
  149. regex.h \
  150. signal.h \
  151. stddef.h \
  152. stdint.h \
  153. stdio.h \
  154. stdlib.h \
  155. string.h \
  156. strings.h \
  157. syscall.h \
  158. syslog.h \
  159. sys/epoll.h \
  160. sys/fcntl.h \
  161. sys/file.h \
  162. sys/ioctl.h \
  163. sys/mman.h \
  164. sys/mount.h \
  165. sys/param.h \
  166. sys/poll.h \
  167. sys/prctl.h \
  168. sys/procfs.h \
  169. sys/quota.h \
  170. sys/resource.h \
  171. sys/select.h \
  172. sys/signal.h \
  173. sys/socket.h \
  174. sys/statfs.h \
  175. sys/stat.h \
  176. sys/statvfs.h \
  177. sys/sysctl.h \
  178. sys/sysinfo.h \
  179. sys/sysmacros.h \
  180. sys/time.h \
  181. sys/timeb.h \
  182. sys/times.h \
  183. sys/types.h \
  184. sys/uio.h \
  185. sys/un.h \
  186. sys/unistd.h \
  187. sys/user.h \
  188. sys/utsname.h \
  189. sys/vfs.h \
  190. sys/wait.h \
  191. termios.h \
  192. time.h \
  193. unistd.h \
  194. utime.h \
  195. X11/Intrinsic.h \
  196. X11/X.h \
  197. X11/Xlib.h \
  198. zlib.h \
  199. ],, AC_MSG_ERROR([Required header file is missing.]) \
  200. )
  201. # Checks for typedefs, structures, and compiler characteristics.
  202. #AC_CHECK_HEADER_STDBOOL macro is defined with autoconf version >= 2.67
  203. m4_ifdef([AC_CHECK_HEADER_STDBOOL], [AC_CHECK_HEADER_STDBOOL])
  204. AC_TYPE_UID_T
  205. AC_TYPE_MODE_T
  206. AC_TYPE_OFF_T
  207. AC_TYPE_PID_T
  208. AC_C_RESTRICT
  209. AC_TYPE_SIZE_T
  210. AC_TYPE_SSIZE_T
  211. AC_CHECK_MEMBERS([struct stat.st_blksize])
  212. AC_TYPE_UINT16_T
  213. AC_TYPE_UINT32_T
  214. AC_TYPE_UINT64_T
  215. AC_TYPE_UINT8_T
  216. AC_CHECK_TYPES([ptrdiff_t])
  217. # Checks for library functions.
  218. AC_FUNC_ALLOCA
  219. AC_FUNC_CHOWN
  220. AC_FUNC_ERROR_AT_LINE
  221. AC_FUNC_FORK
  222. AC_FUNC_GETGROUPS
  223. AC_FUNC_GETMNTENT
  224. AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
  225. AC_FUNC_MALLOC
  226. AC_FUNC_MKTIME
  227. AC_FUNC_MMAP
  228. AC_FUNC_REALLOC
  229. AC_FUNC_STRERROR_R
  230. AC_FUNC_STRTOD
  231. AC_CHECK_FUNCS([ \
  232. alarm \
  233. atexit \
  234. bzero \
  235. dup2 \
  236. endpwent \
  237. floor \
  238. ftruncate \
  239. getcwd \
  240. gethostbyaddr \
  241. gethostbyname \
  242. gethostname \
  243. getmntent \
  244. getpagesize \
  245. gettimeofday \
  246. hasmntopt \
  247. inet_ntoa \
  248. localtime_r \
  249. memchr \
  250. memmove \
  251. memset \
  252. mkdir \
  253. munmap \
  254. pathconf \
  255. poll \
  256. pstat_getdynamic \
  257. putenv \
  258. realpath \
  259. regcomp \
  260. rmdir \
  261. select \
  262. setresuid \
  263. setresgid \
  264. seteuid \
  265. setegid \
  266. strerror_r \
  267. socket \
  268. strcasecmp \
  269. strchr \
  270. strcspn \
  271. strdup \
  272. strerror \
  273. strncasecmp \
  274. strpbrk \
  275. strrchr \
  276. strspn \
  277. strstr \
  278. strtol \
  279. strtoul \
  280. strtoull \
  281. sysinfo \
  282. uname \
  283. utime \
  284. ])
  285. PKG_PROG_PKG_CONFIG
  286. m4_ifdef([PKG_INSTALLDIR],
  287. [PKG_INSTALLDIR],
  288. [
  289. pkgconfigdir=/usr/lib64/pkgconfig
  290. AC_SUBST([pkgconfigdir])
  291. ])
  292. # PBS macros (order matters for some of these)
  293. PBS_AC_PBS_VERSION
  294. PBS_AC_MACHINE_TYPE
  295. PBS_AC_DECL_H_ERRNO
  296. PBS_AC_DECL_SOCKLEN_T
  297. PBS_AC_DECL_EPOLL
  298. PBS_AC_DECL_EPOLL_PWAIT
  299. PBS_AC_DECL_PPOLL
  300. PBS_AC_WITH_SERVER_HOME
  301. PBS_AC_WITH_SERVER_NAME_FILE
  302. PBS_AC_WITH_DATABASE_DIR
  303. PBS_AC_WITH_DATABASE_USER
  304. PBS_AC_WITH_DATABASE_PORT
  305. PBS_AC_WITH_PBS_CONF_FILE
  306. PBS_AC_WITH_TMP_DIR
  307. PBS_AC_WITH_UNSUPPORTED_DIR
  308. PBS_AC_WITH_CORE_LIMIT
  309. PBS_AC_WITH_PYTHON
  310. PBS_AC_WITH_EXPAT
  311. PBS_AC_WITH_EDITLINE
  312. PBS_AC_WITH_HWLOC
  313. PBS_AC_WITH_LIBICAL
  314. PBS_AC_WITH_SENDMAIL
  315. PBS_AC_WITH_SWIG
  316. PBS_AC_WITH_TCL
  317. PBS_AC_WITH_TCLATRSEP
  318. PBS_AC_WITH_XAUTH
  319. PBS_AC_WITH_MIN_STACK_LIMIT
  320. PBS_AC_DISABLE_RPP
  321. PBS_AC_DISABLE_SHELL_PIPE
  322. PBS_AC_DISABLE_SYSLOG
  323. PBS_AC_ENABLE_ALPS
  324. PBS_AC_ENABLE_CPUSET
  325. PBS_AC_WITH_LIBZ
  326. PBS_AC_ENABLE_PTL
  327. PBS_AC_SYSTEMD_UNITDIR
  328. AC_CONFIG_FILES([
  329. pbspro.spec
  330. Makefile
  331. buildutils/Makefile
  332. buildutils/pbs_mkdirs
  333. doc/Makefile
  334. test/Makefile
  335. test/fw/Makefile
  336. test/tests/Makefile
  337. test/fw/setup.py
  338. test/fw/ptl/__init__.py
  339. src/Makefile
  340. src/cmds/Makefile
  341. src/cmds/mpiexec
  342. src/cmds/nqs2pbs
  343. src/cmds/pbs_lamboot
  344. src/cmds/pbs_mpihp
  345. src/cmds/pbs_mpilam
  346. src/cmds/pbs_mpirun
  347. src/cmds/pbs_remsh
  348. src/cmds/pbsrun_unwrap
  349. src/cmds/pbsrun_wrap
  350. src/cmds/pbsrun
  351. src/cmds/scripts/Makefile
  352. src/cmds/scripts/au-nodeupdate
  353. src/cmds/scripts/modulefile
  354. src/cmds/scripts/pbs_habitat
  355. src/cmds/scripts/pbs_init.d
  356. src/cmds/scripts/pbs_poerun
  357. src/cmds/scripts/pbs_postinstall
  358. src/cmds/scripts/pbs.service
  359. src/cmds/scripts/pbsrun.poe
  360. src/hooks/Makefile
  361. src/iff/Makefile
  362. src/include/Makefile
  363. src/include/pbs_version.h
  364. src/lib/Libattr/Makefile
  365. src/lib/Libdb/Makefile
  366. src/lib/Liblog/Makefile
  367. src/lib/Libnet/Makefile
  368. src/lib/Libpbs/Makefile
  369. src/lib/Libpbs/pbs.pc
  370. src/lib/Libpython/Makefile
  371. src/lib/Libsec/Makefile
  372. src/lib/Libsite/Makefile
  373. src/lib/Libtpp/Makefile
  374. src/lib/Libutil/Makefile
  375. src/lib/Makefile
  376. src/modules/Makefile
  377. src/modules/python/Makefile
  378. src/mom_rcp/Makefile
  379. src/resmom/Makefile
  380. src/scheduler/Makefile
  381. src/server/Makefile
  382. src/tools/Makefile
  383. src/tools/wrap_tcl.sh
  384. src/unsupported/Makefile
  385. src/unsupported/pbs_diag
  386. src/unsupported/pbs_dtj
  387. ])
  388. AC_OUTPUT