-
Notifications
You must be signed in to change notification settings - Fork 141
/
configure.ac
2683 lines (2347 loc) · 90 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
dnl
dnl This is an autoconf script.
dnl To rebuild the `configure' script from this, use the bootstrap
dnl script in the directory containing this script.
dnl You must have autoconf version 2.53 or later.
dnl
dnl
dnl Configuration and build system for PBS written
dnl by Lonhyn T. Jasinskyj ([email protected])
dnl
dnl (credit for the inspiration for some of this is due to the work of
dnl Martin Buchholz who autoconf'ed XEmacs)
dnl
dnl Partly rewritten and ported to Autoconf-2.53 and Automake
dnl by Karsten Petersen ([email protected])
dnl
dnl Expanded to support 'make distcheck', shared libs,
dnl bi-arches, pbs-config script, and updated to TORQUE 2.x
dnl by Garrick Staples ([email protected])
dnl
dnl Added --enable-libcpuset to use the cpuset API from libcpuset when --enable-cpuset
dnl Added --enable-memacct to enable pbs_mom to get rss values that are more reliable
dnl Added requirement for libhwloc when --enable-cpuset or --enable-numa-support
dnl Bernd Kallies ([email protected])
dnl
dnl Added --enable-cgroups. If cgroups are enabled cpusets will be disabled.
dnl Ken Nielson ([email protected])
dnl
dnl Expanded to allow unit testing via Check
dnl Updated to use m4
dnl added library functionality to testing
dnl by John Rosenquist ([email protected])
AC_PREREQ(2.53)
AC_INIT([torque], [master], [[email protected]])
AC_REVISION($Revision$)
AC_CONFIG_SRCDIR([src/cmds/qrun.c])
AC_CONFIG_AUX_DIR([buildutils])
AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIR([buildutils])
AC_PROG_CXX
m4_ifdef([AM_PROG_AR], [
AM_PROG_AR
])
LT_INIT
LT_LANG([C++])
AC_SUBST([LIBTOOL_DEPS])
AC_CHECK_PROGS(MAKE,$MAKE make gmake,error)
if test "x$MAKE" = "xerror" ;then
AC_MSG_ERROR([cannot find a make command])
fi
m4_ifdef([HAVE_CHECK],
[AM_INIT_AUTOMAKE([-Wall -Werror -Wno-unsupported foreign 1.9.6 color-tests])],
[AM_INIT_AUTOMAKE([-Wall -Werror -Wno-unsupported foreign 1.9.6])])
AM_PROG_CC_C_O
CC="$CXX"
CCLD="$CXX"
AC_SUBST([CCLD])
LIBTOOLFLAGS="--tag=CXX"
AC_SUBST([LIBTOOLFLAGS])
AM_MAINTAINER_MODE
if test "$program_prefix" = "NONE";then
program_prefix=""
fi
if test "$program_suffix" = "NONE";then
program_suffix=""
fi
AC_SUBST(program_prefix)
AC_SUBST(program_suffix)
m4_pattern_allow([RPM_AC_OPTS])
RPM_AC_OPTS=""
gccwarnings=yes
dnl Instead of putting a long list of defines on the command line
dnl for each compile, use a file called "pbs_config.h" that will
dnl be created in the include directory.
AM_CONFIG_HEADER([src/include/pbs_config.h])
dnl
dnl Find our git revision hash for program outputs
dnl
git_installed=`which git`
success=$?
if test "X$success" == "X0" ; then
githash="`git rev-parse HEAD`"
success=$?
fi
if test "X$success" == "X0" ; then
success=`echo $githash > current_hash`
AC_DEFINE_UNQUOTED(GIT_HASH, ["$githash"], [repository git version])
else
dnl current hash is a file checked in to the git repo in the base directory
dnl containing the most recent hash
AC_DEFINE_UNQUOTED(GIT_HASH, ["`cat current_hash`"], [repository git version])
fi
PKG_PROG_PKG_CONFIG
dnl
dnl ######################################################################
dnl figure out what PBS "machine type" we are on
dnl
AC_CACHE_CHECK([PBS machine type], pbs_cv_type_mach,
[pbs_cv_type_mach=`$ac_aux_dir/pbs_mach_type`])
PBS_MACH=$pbs_cv_type_mach
if test "x$PBS_MACH" = "xunknown"; then
AC_MSG_WARN([MOM Machine type "$host_os" is not supported.])
AC_DEFINE(UNSUPPORTED_MACH,1,[Define if building on unsupported OS])
fi
AC_SUBST(PBS_MACH)
AC_DEFINE_UNQUOTED(PBS_MACH, "${PBS_MACH}",
[the PBS style machine type name])
# this defines the name of a .c file which is then included in
# another resc_def_all.c
AC_DEFINE_UNQUOTED(MACH_RESC_DEFS, "resc_def_${PBS_MACH}.c",
[the machine specific resc_def_* file name])
dnl
dnl ##########################################################################
dnl Do not install load library path in /etc/ld.so.conf.d
AC_ARG_WITH(loadlibfile,
[AS_HELP_STRING([--with-loadlibfile], [ (Enable automatic install of libtorqueue.conf entry to ld.so.conf.d (default=no)])], [have_loadlibfile=yes], [have_loadlibfile=no])
AC_SUBST(have_loadlibfile)
dnl
dnl ######################################################################
dnl add unit testing if check is installed
AC_ARG_WITH(check,
[AS_HELP_STRING([--with-check], [Enable unit testing (check package default=no)])], [have_check=yes], [have_check=no])
AS_IF([test x"$have_check" = "xyes"], [
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [check_installed="yes"], [check_installed="no"])
AS_IF([test x"$check_installed" = "xno"], [
AC_MSG_ERROR([Check not found; cannot run unit tests!!])
])
])
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
m4_ifdef([AM_SILENT_RULES],[
if test "x$have_check" = "xyes"; then
AM_SILENT_RULES(no)
AC_CONFIG_FILES(src/test/scaffold_fail/Makefile
src/test/torque_test_lib/Makefile
src/test/accounting/Makefile
src/test/acl_special/Makefile
src/test/array_func/Makefile
src/test/array_upgrade/Makefile
src/test/attr_recov/Makefile
src/test/batch_request/Makefile
src/test/completed_jobs_map/Makefile
src/test/delete_all_tracker/Makefile
src/test/dis_read/Makefile
src/test/display_alps_status/Makefile
src/test/execution_slot_tracker/Makefile
src/test/exiting_jobs/Makefile
src/test/geteusernam/Makefile
src/test/get_path_jobdata/Makefile
src/test/id_map/Makefile
src/test/incoming_request/Makefile
src/test/issue_request/Makefile
src/test/job_attr_def/Makefile
src/test/job/Makefile
src/test/job_array/Makefile
src/test/job_container/Makefile
src/test/job_func/Makefile
src/test/job_qs_upgrade/Makefile
src/test/job_recov/Makefile
src/test/job_recycler/Makefile
src/test/job_route/Makefile
src/test/job_usage_info/Makefile
src/test/login_nodes/Makefile
src/test/mom_hierarchy_handler/Makefile
src/test/mail_throttler/Makefile
src/test/node_func/Makefile
src/test/node_manager/Makefile
src/test/pbsnode/Makefile
src/test/pbsd_init/Makefile
src/test/pbsd_main/Makefile
src/test/process_alps_status/Makefile
src/test/process_mom_update/Makefile
src/test/process_request/Makefile
src/test/queue_func/Makefile
src/test/queue_recov/Makefile
src/test/queue_recycler/Makefile
src/test/reply_send/Makefile
src/test/receive_mom_communication/Makefile
src/test/req_delete/Makefile
src/test/req_deletearray/Makefile
src/test/req_getcred/Makefile
src/test/req_gpuctrl/Makefile
src/test/req_holdarray/Makefile
src/test/req_holdjob/Makefile
src/test/req_jobobit/Makefile
src/test/req_locate/Makefile
src/test/req_manager/Makefile
src/test/req_message/Makefile
src/test/req_modify/Makefile
src/test/req_movejob/Makefile
src/test/req_quejob/Makefile
src/test/req_register/Makefile
src/test/req_rerun/Makefile
src/test/req_rescq/Makefile
src/test/req_runjob/Makefile
src/test/req_select/Makefile
src/test/req_shutdown/Makefile
src/test/req_signal/Makefile
src/test/req_stat/Makefile
src/test/req_tokens/Makefile
src/test/req_track/Makefile
src/test/resc_def_all/Makefile
src/test/restricted_host/Makefile
src/test/run_sched/Makefile
src/test/stat_job/Makefile
src/test/svr_chk_owner/Makefile
src/test/svr_connect/Makefile
src/test/svr_format_job/Makefile
src/test/svr_func/Makefile
src/test/svr_jobfunc/Makefile
src/test/svr_mail/Makefile
src/test/svr_movejob/Makefile
src/test/svr_recov/Makefile
src/test/svr_resccost/Makefile
src/test/svr_task/Makefile
src/test/track_alps_reservations/Makefile
src/test/user_info/Makefile
src/test/req/Makefile
src/test/complete_req/Makefile
src/test/attr_fn_complete_req/Makefile
src/test/attr_atomic/Makefile
src/test/attr_fn_acl/Makefile
src/test/attr_fn_arst/Makefile
src/test/attr_fn_b/Makefile
src/test/attr_fn_c/Makefile
src/test/attr_fn_freq/Makefile
src/test/attr_fn_hold/Makefile
src/test/attr_fn_intr/Makefile
src/test/attr_fn_l/Makefile
src/test/attr_fn_ll/Makefile
src/test/attr_fn_nppcu/Makefile
src/test/attr_fn_resc/Makefile
src/test/attr_fn_size/Makefile
src/test/attr_fn_str/Makefile
src/test/attr_fn_time/Makefile
src/test/attr_fn_tokens/Makefile
src/test/attr_fn_tv/Makefile
src/test/attr_fn_unkn/Makefile
src/test/attr_func/Makefile
src/test/attr_node_func/Makefile
src/test/attr_str_conversion/Makefile
src/test/add_verify_resources/Makefile
src/test/ck_job_name/Makefile
src/test/cnt2server/Makefile
src/test/cvtdate/Makefile
src/test/get_server/Makefile
src/test/locate_job/Makefile
src/test/parse_at/Makefile
src/test/parse_depend/Makefile
src/test/parse_destid/Makefile
src/test/parse_equal/Makefile
src/test/parse_jobid/Makefile
src/test/parse_stage/Makefile
src/test/prepare_path/Makefile
src/test/prt_job_err/Makefile
src/test/set_attr/Makefile
src/test/set_resource/Makefile
src/test/csv/Makefile
src/test/discui_/Makefile
src/test/discul_/Makefile
src/test/disi10d_/Makefile
src/test/disi10l_/Makefile
src/test/disiui_/Makefile
src/test/disp10d_/Makefile
src/test/disp10l_/Makefile
src/test/disrcs/Makefile
src/test/disrd/Makefile
src/test/disrf/Makefile
src/test/disrfcs/Makefile
src/test/disrfst/Makefile
src/test/disrl/Makefile
src/test/disrl_/Makefile
src/test/disrsc/Makefile
src/test/disrsi/Makefile
src/test/disrsi_/Makefile
src/test/disrsl/Makefile
src/test/disrsl_/Makefile
src/test/disrss/Makefile
src/test/disrst/Makefile
src/test/disruc/Makefile
src/test/disrui/Makefile
src/test/disrul/Makefile
src/test/disrus/Makefile
src/test/diswcs/Makefile
src/test/diswf/Makefile
src/test/diswl_/Makefile
src/test/diswsi/Makefile
src/test/diswsl/Makefile
src/test/diswui/Makefile
src/test/diswui_/Makefile
src/test/diswul/Makefile
src/test/PBSD_gpuctrl2/Makefile
src/test/PBSD_manage2/Makefile
src/test/PBSD_manager_caps/Makefile
src/test/PBSD_msg2/Makefile
src/test/PBSD_rdrpy/Makefile
src/test/PBSD_sig2/Makefile
src/test/PBSD_status/Makefile
src/test/PBSD_status2/Makefile
src/test/PBSD_submit_caps/Makefile
src/test/PBS_attr/Makefile
src/test/dec_Authen/Makefile
src/test/dec_CpyFil/Makefile
src/test/dec_Gpu/Makefile
src/test/dec_JobCred/Makefile
src/test/dec_JobFile/Makefile
src/test/dec_JobId/Makefile
src/test/dec_JobObit/Makefile
src/test/dec_Manage/Makefile
src/test/dec_MoveJob/Makefile
src/test/dec_MsgJob/Makefile
src/test/dec_QueueJob/Makefile
src/test/dec_Reg/Makefile
src/test/dec_ReqExt/Makefile
src/test/dec_ReqHdr/Makefile
src/test/dec_Resc/Makefile
src/test/dec_ReturnFile/Makefile
src/test/dec_RunJob/Makefile
src/test/dec_Shut/Makefile
src/test/dec_Sig/Makefile
src/test/dec_Status/Makefile
src/test/dec_Track/Makefile
src/test/dec_attrl/Makefile
src/test/dec_attropl/Makefile
src/test/dec_rpyc/Makefile
src/test/dec_rpys/Makefile
src/test/dec_svrattrl/Makefile
src/test/enc_CpyFil/Makefile
src/test/enc_Gpu/Makefile
src/test/enc_JobCred/Makefile
src/test/enc_JobFile/Makefile
src/test/enc_JobId/Makefile
src/test/enc_JobObit/Makefile
src/test/enc_Manage/Makefile
src/test/enc_MoveJob/Makefile
src/test/enc_MsgJob/Makefile
src/test/enc_QueueJob/Makefile
src/test/enc_QueueJob_hash/Makefile
src/test/enc_Reg/Makefile
src/test/enc_ReqExt/Makefile
src/test/enc_ReqHdr/Makefile
src/test/enc_ReturnFile/Makefile
src/test/enc_RunJob/Makefile
src/test/enc_Shut/Makefile
src/test/enc_Sig/Makefile
src/test/enc_Status/Makefile
src/test/enc_Track/Makefile
src/test/enc_attrl/Makefile
src/test/enc_attropl/Makefile
src/test/enc_attropl_hash/Makefile
src/test/enc_reply/Makefile
src/test/enc_svrattrl/Makefile
src/test/get_svrport/Makefile
src/test/list_link/Makefile
src/test/nonblock/Makefile
src/test/pbsD_alterjo/Makefile
src/test/pbsD_asyrun/Makefile
src/test/pbsD_chkptjob/Makefile
src/test/pbsD_connect/Makefile
src/test/pbsD_deljob/Makefile
src/test/pbsD_gpuctrl/Makefile
src/test/pbsD_holdjob/Makefile
src/test/pbsD_locjob/Makefile
src/test/pbsD_manager/Makefile
src/test/pbsD_movejob/Makefile
src/test/pbsD_msgjob/Makefile
src/test/pbsD_orderjo/Makefile
src/test/pbsD_rerunjo/Makefile
src/test/pbsD_resc/Makefile
src/test/pbsD_rlsjob/Makefile
src/test/pbsD_runjob/Makefile
src/test/pbsD_selectj/Makefile
src/test/pbsD_sigjob/Makefile
src/test/pbsD_stagein/Makefile
src/test/pbsD_statjob/Makefile
src/test/pbsD_statnode/Makefile
src/test/pbsD_statque/Makefile
src/test/pbsD_statsrv/Makefile
src/test/pbsD_submit/Makefile
src/test/pbsD_submit_hash/Makefile
src/test/pbsD_termin/Makefile
src/test/pbs_geterrmg/Makefile
src/test/pbs_statfree/Makefile
src/test/tcp_dis/Makefile
src/test/tm/Makefile
src/test/torquecfg/Makefile
src/test/trq_auth/Makefile
src/test/trq_auth_daemon/Makefile
src/test/chk_file_sec/Makefile
src/test/log_event/Makefile
src/test/pbs_log/Makefile
src/test/pbs_messages/Makefile
src/test/setup_env/Makefile
src/test/conn_table/Makefile
src/test/get_hostaddr/Makefile
src/test/get_hostname/Makefile
src/test/md5/Makefile
src/test/net_client/Makefile
src/test/net_common/Makefile
src/test/net_server/Makefile
src/test/net_cache/Makefile
src/test/net_set_clse/Makefile
src/test/port_forwarding/Makefile
src/test/rm/Makefile
src/test/server_core/Makefile
src/test/site_allow_u/Makefile
src/test/site_alt_rte/Makefile
src/test/site_check_u/Makefile
src/test/site_map_usr/Makefile
src/test/site_mom_chu/Makefile
src/test/site_mom_ckp/Makefile
src/test/site_mom_jst/Makefile
src/test/authorized_hosts/Makefile
src/test/u_MXML/Makefile
src/test/u_groups/Makefile
src/test/u_hash_map_structs/Makefile
src/test/u_lock_ctl/Makefile
src/test/u_misc/Makefile
src/test/u_mom_hierarchy/Makefile
src/test/u_mu/Makefile
src/test/u_mutex_mgr/Makefile
src/test/u_putenv/Makefile
src/test/u_threadpool/Makefile
src/test/u_tree/Makefile
src/test/u_users/Makefile
src/test/u_xml/Makefile
src/test/MXML/Makefile
src/test/common_cmds/Makefile
src/test/pbs_track/Makefile
src/test/pbsdsh/Makefile
src/test/pbsnodes/Makefile
src/test/pbspd/Makefile
src/test/pbspoe/Makefile
src/test/qalter/Makefile
src/test/qchkpt/Makefile
src/test/qdel/Makefile
src/test/qdisable/Makefile
src/test/qenable/Makefile
src/test/qgpumode/Makefile
src/test/qgpureset/Makefile
src/test/qhold/Makefile
src/test/qmgr/Makefile
src/test/qmove/Makefile
src/test/qmsg/Makefile
src/test/qorder/Makefile
src/test/qrerun/Makefile
src/test/qrls/Makefile
src/test/qrun/Makefile
src/test/qselect/Makefile
src/test/qsig/Makefile
src/test/qstart/Makefile
src/test/qstat/Makefile
src/test/qstop/Makefile
src/test/qsub_functions/Makefile
src/test/qterm/Makefile
src/test/momctl/Makefile
src/drmaa/test/Makefile
src/test/allocation/Makefile
src/test/machine/Makefile
src/test/numa_core/Makefile
src/test/numa_chip/Makefile
src/test/numa_socket/Makefile
src/test/numa_pci_device/Makefile
src/test/pam_pbssimpleauth/Makefile
src/test/alps_reservations/Makefile
src/test/catch_child/Makefile
src/test/checkpoint/Makefile
src/test/cray_cpa/Makefile
src/test/cray_energy/Makefile
src/test/generate_alps_status/Makefile
src/test/mom_job_func/Makefile
src/test/mom_comm/Makefile
src/test/mom_inter/Makefile
src/test/mom_main/Makefile
src/test/mom_server/Makefile
src/test/mom_process_request/Makefile
src/test/mom_req_quejob/Makefile
src/test/parse_config/Makefile
src/test/pbs_demux/Makefile
src/test/pmix_interface/Makefile
src/test/pmix_operation/Makefile
src/test/pmix_tracker/Makefile
src/test/prolog/Makefile
src/test/release_reservation/Makefile
src/test/requests/Makefile
src/test/start_exec/Makefile
src/test/tmsock_recov/Makefile
src/test/mom_mach/Makefile
src/test/mom_start/Makefile
src/resmom/linux/test/Makefile
src/resmom/linux/test/cpuset/Makefile
src/resmom/linux/test/sys_file/Makefile
src/resmom/linux/test/numa_node/Makefile
src/resmom/linux/test/node_internals/Makefile
src/test/pe_input/Makefile
src/test/Makefile
src/tools/test/Makefile
src/tools/test/chk_tree/Makefile
src/tools/test/hostn/Makefile
src/tools/test/pbsTclInit/Makefile
src/tools/test/pbsTkInit/Makefile
src/tools/test/printjob/Makefile
src/tools/test/printserverdb/Makefile
src/tools/test/printtracking/Makefile
src/tools/test/tracejob/Makefile)
else
AM_SILENT_RULES(no)
fi
])
if test "x$have_check" = "xyes"; then
AC_DEFINE(UNIT_TEST, 1, [turns on unit test conditionals in code])
fi
dnl
dnl ######################################################################
dnl Autorun mode?
dnl
AC_MSG_CHECKING([whether to turn on the AUTORUN_JOBS flag])
AC_ARG_ENABLE(autorun,
[ --enable-autorun turn on the AUTORUN_JOBS flag],
enable_autorun=$enableval, enable_autorun=no)
AC_MSG_RESULT($enable_autorun)
if test "x$enable_autorun" = "xyes" ; then
AC_DEFINE(AUTORUN_JOBS, 1, [turns on the compilation of AUTORUN_JOBS code])
fi
dnl
dnl ######################################################################
dnl Resource max not default mode?
dnl
dnl NOTE: due to confusion we are changing MAX to not be default by default
dnl
AC_MSG_CHECKING([whether to turn on the RESOURCEMAXDEFAULT flag])
AC_ARG_ENABLE(maxdefault,
[ --enable-maxdefault turn on the RESOURCEMAXDEFAULT flag],
enable_maxdefault=$enableval, enable_maxdefault=no)
AC_MSG_RESULT($enable_maxdefault)
if test "x$enable_maxdefault" = "xyes" ; then
AC_DEFINE(RESOURCEMAXDEFAULT, 1, [turns on the compilation of RESOURCEMAXDEFAULT code])
fi
dnl
dnl ######################################################################
dnl Quick commit mode?
dnl
AC_MSG_CHECKING([whether to turn on the QUICKCOMMIT flag])
AC_ARG_ENABLE(quickcommit,
[ --enable-quickcommit turn on the QUICKCOMMIT flag],
enable_quickcommit=$enableval, enable_quickcommit=no)
AC_MSG_RESULT($enable_quickcommit)
if test "x$enable_quickcommit" = "xyes" ; then
AC_DEFINE(QUICKCOMMIT, 1, [turns on the compilation of QUICKCOMMIT code])
fi
dnl
dnl ######################################################################
dnl Disable qsub keep(-k) override?
dnl
AC_ARG_ENABLE(qsub-keep-override, [
--disable-qsub-keep-override
do not allow the qsub -k flag to override -o -e.],
[case "${enableval}" in
yes) ;;
no) QSUB_KEEP_NO_OVERRIDE=1;
AC_DEFINE(QSUB_KEEP_NO_OVERRIDE, 1, [turns on the QSUB_KEEP_NO_OVERRIDE flag]) ;;
*) AC_MSG_ERROR(--enable-qsub-keep-override cannot take a value) ;;
esac])dnl
dnl
dnl ######################################################################
dnl Let the user choose, what parts of PBS he wants to compile and install
dnl
partdefault=yes
if test "x$PBS_MACH" = "xunknown"; then
partdefault=no
fi
AC_MSG_CHECKING([whether to include server and scheduler])
AC_ARG_ENABLE(server,
[ --disable-server do not include server and scheduler],
build_server=$enableval, build_server=$partdefault)
AC_MSG_RESULT($build_server)
AM_CONDITIONAL(INCLUDE_SERVER, [test "x$build_server" = "xyes"])
AC_SUBST(build_server)
AC_MSG_CHECKING([whether to include the mom daemon])
AC_ARG_ENABLE(mom,
[ --disable-mom do not include the mom daemon],
build_mom=$enableval, build_mom=$partdefault)
AC_MSG_RESULT($build_mom)
AM_CONDITIONAL(INCLUDE_MOM, [test "x$build_mom" = "xyes"])
AC_SUBST(build_mom)
AC_MSG_CHECKING([whether to include the clients])
AC_ARG_ENABLE(clients,
[ --disable-clients do not include the clients],
build_clients=$enableval, build_clients=yes)
AC_MSG_RESULT($build_clients)
AM_CONDITIONAL(INCLUDE_CLIENTS, [test "x$build_clients" = "xyes"])
AC_SUBST(build_clients)
AC_MSG_CHECKING([whether to build DRMAA lib])
AC_ARG_ENABLE(drmaa,
[ --enable-drmaa build the DRMAA 1.0 library (default is off)],
build_drmaa=$enableval, build_drmaa=no)
AC_MSG_RESULT($build_drmaa)
AM_CONDITIONAL(INCLUDE_DRMAA, [test "x$build_drmaa" = "xyes"])
AC_SUBST(build_drmaa)
dnl
dnl #######################################################################
dnl Starting in version 5.1.3 we are not using the gperf tool to create the
dnl drmaa source files. However, we want to keep the information around in
dnl case we ever need to update the perfect hash for drmaa version 2 or later.
dnl
dnl if test "x$build_drmaa" = "xyes";then
dnl AC_PATH_PROG(GPERF, gperf)
dnl if test -z "$GPERF";then
dnl AC_MSG_ERROR([When building with drmaa, gperf must be installed. Please install gperf and then continue.])
dnl fi
dnl fi
dnl
dnl ######################################################################
dnl Check for the C compiler (some tests rely on it)
dnl this needs to be before AC_ARG_ENABLE(debug)
dnl
dnl did the user provide CC and CFLAGS variables? store for later
dnl user_choosed_cc_set=${CC+set}
dnl user_choosed_cflags_set=${CFLAGS+set}
dnl SPECIFIED_CFLAGS=$CFLAGS
dnl look for the C-Compiler
#AC_PROG_CC
#AC_PROG_GCC_TRADITIONAL
dnl
dnl ######################################################################
dnl Check for programs
dnl
AC_CHECK_PROGS(AR,ar,exit)
dnl wrapped libtool macro to remove annoying warning message
AC_PROG_LIBTOOL
TAC_PROG_LIBTOOL_PATCH
AC_PROG_LN_S
dnl needed for scheduler.basl
AM_PROG_LEX
AC_PROG_YACC
dnl Check for troff and its family. Prefer groff because we know
dnl its fonts whereas various troffs name their fonts differently.
dnl (e.g. CO vs C)
AC_CHECK_PROGS(TBL, gtbl tbl, exit)
AC_CHECK_PROGS(PIC, gpic pic, exit)
AC_CHECK_PROGS(ROFF, groff troff, exit)
dnl
dnl ######################################################################
dnl Check how to compile
dnl
dnl
dnl add _GNU_SOURCE
dnl
AC_DEFINE([_GNU_SOURCE], 1, [Define _GNU_SOURCE for portability])
dnl
dnl ######################################################################
dnl compile in debug code?
dnl
AC_MSG_CHECKING([whether to turn on the compilation of DEBUG code])
AC_ARG_ENABLE(debug,
[ --enable-debug turn on the compilation of DEBUG code (for debugging symbols, use --with-debug)],
enable_debug=$enableval, enable_debug=no)
AC_MSG_RESULT($enable_debug)
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE(DEBUG, 1, [turns on the compilation of DEBUG code])
fi
dnl
dnl ######################################################################
dnl compile with debugging symbols
dnl this needs to be after AC_PROG_CC and before AX_CFLAGS_GCC_OPTION
dnl and TAC_SYS_LARGEFILE
dnl
AC_MSG_CHECKING([whether to compile with debugging symbols])
AC_ARG_WITH([debug],
AC_HELP_STRING([--with-debug], [compile with debugging symbols]),
DEBUG_SYMBOLS=$withval, DEBUG_SYMBOLS="yes")
AC_MSG_RESULT([DEBUG_SYMBOLS=$DEBUG_SYMBOLS])
dnl remove -O* and add -g
if test "$DEBUG_SYMBOLS" = 'yes'; then
AC_MSG_RESULT([before tweak CFLAGS=$CFLAGS])
CFLAGS=`echo $CFLAGS | sed 's/ \?-O[[^ ]]*//g'`
AC_MSG_RESULT([mid tweak CFLAGS=$CFLAGS])
case $CFLAGS in
*-g*)
;;
*)
if test "$CFLAGS" = ''; then
CFLAGS="-g"
else
CFLAGS="-g $CFLAGS"
fi
if test "$CXXFLAGS" = ''; then
CXXFLAGS="-g"
else
CXXFLAGS="-g $CXXFLAGS"
fi
;;
esac
AC_MSG_RESULT([after tweak CFLAGS=$CFLAGS])
AC_MSG_RESULT([before tweak CXXFLAGS=$CXXFLAGS])
CXXFLAGS=`echo $CXXFLAGS | sed 's/ \?-O[[^ ]]*//g'`
AC_MSG_RESULT([mid tweak CXXFLAGS=$CXXFLAGS])
case $CXXFLAGS in
*-g*)
;;
*)
if test "$CXXFLAGS" = ''; then
CXXFLAGS="-g"
else
CXXFLAGS="-g $CXXFLAGS"
fi
;;
esac
AC_MSG_RESULT([after tweak CXXFLAGS=$CXXFLAGS])
fi
dnl if using gcc, we can be very strict
AC_ARG_ENABLE(gcc_warnings, [
--disable-gcc-warnings Disable gcc strictness and warnings. If using
gcc, default is to not error on any warnings])
if test "x$GCC" = "xyes" ;then
AC_MSG_CHECKING([whether to disable strict gcc warnings])
if test "${enable_gcc_warnings}" = "no" ; then
AC_MSG_RESULT([yes])
gccwarnings=no
else
AC_MSG_RESULT([no])
fi
fi
dnl Torque's own largefile support
TAC_SYS_LARGEFILE
dnl We need pthreads
AC_CHECK_LIB(pthread, pthread_create,
PTHREAD_LIBS="$PTHREAD_LIBS -lpthread -lrt",
[AC_MSG_ERROR([TORQUE needs pthreads in order to build]) ])
LIBS="$LIBS $PTHREAD_LIBS"
dnl
dnl we need libxml2
dnl
xmlLib=`xml2-config --libs | sed 's/-L@<:@^@<:@:space:@:>@@:>@* //g;s/-l//'`
dnl skip the first two chars because its -l<libname>
AC_CHECK_LIB(${xmlLib}, xmlGetProp,
[],
[AC_MSG_ERROR([TORQUE needs libxml2-devel in order to build]) ])
dnl find zlib
AC_CHECK_LIB(z, gzopen,
[],
[AC_MSG_ERROR([TORQUE needs zlib-devel in order to build]) ])
dnl ###########################################
dnl Make only top dir mode?
dnl
AC_ARG_ENABLE(top_tempdir_only, [
--enable-top-tempdir-only Creates only the top directory when creating the temporary dir for the job])
if test "x$GCC" = "xyes" ; then
AC_MSG_CHECKING([whether to create only the top temporary job directory])
if test "${enable_top_tempdir_only}" == "yes" ; then
AC_MSG_RESULT([yes])
CFLAGS="$CFLAGS -DTOP_TEMPDIR_ONLY"
else
AC_MSG_RESULT([no])
fi
fi
dnl
dnl If hpux and gcc, force the XOPEN interface.
AC_MSG_CHECKING([whether to force XOPEN networking stack])
AC_ARG_ENABLE(xopen_networking, [
--disable-xopen-networking
With HPUX and GCC, don't force usage of XOPEN and libxnet])
if test "${enable_xopen_networking}" != "no" ; then
case $GCC,$PBS_MACH in
yes,hpux*) AC_MSG_RESULT([yes])
AC_MSG_WARN([On HPUX and gcc, forcing XOPEN network stack.])
AC_MSG_WARN([Use --disable-xopen-networking to prevent it])
AC_CHECK_LIB([xnet], [getpeername],
[LIBS="-lxnet $LIBS"
CFLAGS="$CFLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"],
[AC_MSG_WARN([This build will likely fail in mysterious ways at run-time])
sleep 10])
;;
*) AC_MSG_RESULT([no... phew!])
esac
else
AC_MSG_RESULT([disabled])
fi
dnl
dnl ######################################################################
dnl Check for headers
dnl
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h malloc.h netdb.h \
netinet/in.h stddef.h sys/file.h sys/param.h sys/tty.h \
sys/socket.h sys/time.h sys/ioctl.h sys/mount.h \
sys/vfs.h sys/statfs.h sys/statvfs.h sys/ucred.h sys/un.h sys/uio.h \
syslog.h readline/readline.h \
termios.h err.h sys/poll.h pam/pam_modules.h security/pam_appl.h \
mach/shared_region.h])
# On Solaris, pam_modules.h requires pam_appl.h
AC_CHECK_HEADERS([security/pam_modules.h], [], [],
[#if HAVE_SECURITY_PAM_APPL_H
# include <security/pam_appl.h>
# endif
])
dnl
dnl ######################################################################
dnl System specific settings
dnl
AC_ARG_ENABLE(nodemask, [ --enable-nodemask enable nodemask-based scheduling on the Origin 2000])
if test "${enable_nodemask}" = "yes" ; then
case "${PBS_MACH}" in
irix6*) AC_DEFINE(NODEMASK, 1, [use nodemask-based scheduling on O2k]) ;;
*) AC_MSG_ERROR([Cannot --enable-nodemask on a machine not running IRIX6]);;
esac
fi
AC_ARG_ENABLE(pemask,
[ --enable-pemask enable pemask-based scheduling on the Cray T3e])
if test "${enable_pemask}" = "yes" ; then
case "${PBS_MACH}" in
unicosmk*) AC_DEFINE(PE_MASK, 1, [use pemask-based scheduling on Cray T3e]) ;;
*) AC_MSG_ERROR([Cannot --enable-pemask on a machine not running UNICOS/mk]);;
esac
fi
MOMLIBS=""
PBSPOE=""
PBSPOEO=""
AC_ARG_ENABLE(sp2,
[ --enable-sp2 build PBS for an IBM SP2])
IBM_SP2=0
if test "x$enable_sp2" = "xyes" ; then
MOMLIBS="-ljm_client -lSDR"
case "$PBS_MACH" in
aix*) AC_CHECK_LIB(switchtbl, swtbl_load_table,
[ IBM_SP2=2
LIBS="-lswitchtbl $LIBS"
PBSPOE="pbspd pbspoe"
PBSPOEO="pbspoe.o pbspd.o" ],
[ IBM_SP2=1 ])
;;
*) AC_MSG_ERROR([Cannot --enable-sp2 on a machine not running AIX]) ;;
esac
fi
AC_DEFINE_UNQUOTED(IBM_SP2, ${IBM_SP2}, [defined if this is an SP2])
AC_SUBST(PBSPOE)
AC_SUBST(PBSPOEO)
AC_ARG_ENABLE(maxint-jobids, [ --enable-maxint-jobids enables job ids to go up to maxint])
maxint_ids=0
AC_MSG_CHECKING([whether to enable maxint job ids])
if test "x$enable_maxint_jobids" = "xyes" ; then
AC_MSG_RESULT([yes])
maxint_ids=1
CFLAGS="$CFLAGS -DUSE_MAXINT_JOBIDS"
else
AC_MSG_RESULT([no])
fi
dnl
dnl Specify whether or not to use the resource plugin library
dnl
AC_ARG_WITH(resource-plugin, [
--with-resource-plugin=PATH
Specifies the path to the resource plugin library to link against.
For example: ./configure --with-resource-plugin=/opt/torque-plugin
tells Torque that libresource_plugin.so is in /opt/torque-plugin/],
[PLUGIN_PATH="${withval}"], [PLUGIN_PATH=""])
AC_MSG_CHECKING([Whether to use the resource plugin libary])
if test "x$PLUGIN_PATH" != "x"; then
dnl A plugin library has been specified
AC_MSG_RESULT([yes])
AC_DEFINE(USE_RESOURCE_PLUGIN, 1, [Define to use the resource plugin])
MOMLIBS="$MOMLIBS -L$PLUGIN_PATH -lresource_plugin"
else
AC_MSG_RESULT([no])
fi
AC_ARG_ENABLE(cgroups, [ --enable-cgroups enable Linux control groups])
build_linux_cgroups=no
AC_MSG_CHECKING([whether to enable cgroups])
if test "x$enable_cgroups" = "xyes"; then
AC_MSG_RESULT([yes])
build_linux_cgroups=yes
AC_DEFINE(PENABLE_LINUX_CGROUPS, 1, [Define to enable Linux cgroups])
RPM_AC_OPTS="$RPM_AC_OPTS --with cgroups"
else
AC_MSG_RESULT([no])
RPM_AC_OPTS="$RPM_AC_OPTS --without cgroups"
fi
AM_CONDITIONAL([BUILD_LINUX_CGROUPS], test "$build_linux_cgroups" = yes)
AC_ARG_ENABLE(cpuset,[ --enable-cpuset enable Linux 2.6 kernel cpusets])
build_l26_cpuset=no
cpuset=0
AC_MSG_CHECKING([whether to enable cpusets])
if test "x$enable_cpuset" = "xyes" ; then
AC_MSG_RESULT([yes])
build_l26_cpuset=yes
cpuset=1
AC_DEFINE(PENABLE_LINUX26_CPUSETS, 1, [Define to enable Linux 2.6 cpusets])
dnl define geometry requests to allow these to be requested here
dnl CFLAGS="$CFLAGS -DGEOMETRY_REQUESTS"
RPM_AC_OPTS="$RPM_AC_OPTS --with cpuset"
else
AC_MSG_RESULT([no])
RPM_AC_OPTS="$RPM_AC_OPTS --without cpuset"
fi
AM_CONDITIONAL([BUILD_L26_CPUSETS], test "$build_l26_cpuset" = yes)
dnl turn on the new feature to request a specific geometry for a process
dnl this uses cpusets to bind the job to that geometry
dnl --enable-geometry-requests
AC_ARG_ENABLE(geometry_requests, [
--enable-geometry-requests Enables the user to request a specific geometry using a cpuset implementation])