source: ThirdParty/mpqc_open/configure.ac@ 51662a

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_levmar Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 51662a was 482400e, checked in by Frederik Heber <heber@…>, 8 years ago

Changes to mpqc_open to be usable as autoconf subdir.

  • Property mode set to 100644
File size: 44.6 KB
Line 
1define([sc_mmm_version],[2.3.1])
2define([sc_buildid],[])
3define([sc_so_version],[8:0:1])
4
5dnl Process this file with autoconf to produce a configure script.
6define([AC_CACHE_LOAD], )dnl for debugging configure.in
7define([AC_CACHE_SAVE], )dnl for debugging configure.in
8AC_INIT(src/lib/util/ref/ref.h)
9AC_PREREQ(2.55)
10AC_CONFIG_HEADER(src/lib/scconfig.h)
11AC_CONFIG_AUX_DIR(bin)
12
13AC_CANONICAL_SYSTEM
14
15AC_DEFINE_UNQUOTED(HOST_ARCH, "$host", ["host"])
16AC_DEFINE_UNQUOTED(TARGET_ARCH, "$target", ["target"])
17
18define([default_prefix_dash],ifelse(sc_buildid, ,[],[-]))
19define([default_prefix],builtin(format,"/usr/local/mpqc/%s%s%s",
20 sc_mmm_version,default_prefix_dash,sc_buildid))
21
22SC_MMM_VERSION=sc_mmm_version
23
24SC_SO_VERSION=sc_so_version
25AC_SUBST(SC_SO_VERSION)
26
27changequote(<<, >>)dnl
28SC_MAJOR_VERSION=`echo $SC_MMM_VERSION|sed 's/\([0-9]*\)\.[0-9]*\.[0-9]*/\1/'`
29SC_MINOR_VERSION=`echo $SC_MMM_VERSION|sed 's/[0-9]*\.\([0-9]*\)\.[0-9]*/\1/'`
30SC_MICRO_VERSION=`echo $SC_MMM_VERSION|sed 's/[0-9]*\.[0-9]*\.\([0-9]*\)/\1/'`
31changequote([, ])dnl
32AC_DEFINE_UNQUOTED(SC_MAJOR_VERSION,$SC_MAJOR_VERSION, ["major version number"])
33AC_DEFINE_UNQUOTED(SC_MINOR_VERSION,$SC_MINOR_VERSION, ["minor version number"])
34AC_DEFINE_UNQUOTED(SC_MICRO_VERSION,$SC_MICRO_VERSION, ["micro version number"])
35
36EXCLUDED_DIRS=
37
38dnl --------- Features ---------
39
40AC_ARG_ENABLE(debug,
41[ --enable-debug Compile with debugging options],
42[
43case $enableval in
44 yes)
45 DEBUG=yes
46 ;;
47 no)
48 DEBUG=no
49 ;;
50 opt)
51 DEBUG=opt
52 ;;
53 *)
54 AC_MSG_ERROR([Invalid value for --enable-debug ($enableval)])
55 ;;
56esac
57],[
58 DEBUG=no
59]
60)
61
62AC_ARG_ENABLE(strict-arch,
63[ --enable-strict-arch Code might only work on target cpu type],
64[
65case $enableval in
66 yes)
67 STRICT_ARCH=yes
68 ;;
69 no)
70 STRICT_ARCH=no
71 ;;
72 *)
73 AC_MSG_ERROR([Invalid value for --enable-strict-arch ($enableval)])
74 ;;
75esac
76],[
77 STRICT_ARCH=no
78]
79)
80
81enableproduction=no
82AC_ARG_ENABLE(production,
83[ --enable-production Prepare for a production install.],
84[
85case $enableval in
86 yes)
87 enableproduction=yes
88 ;;
89 no)
90 ;;
91 *)
92 AC_MSG_ERROR([Invalid value for --enable-production ($enableval)])
93 ;;
94esac
95])
96
97AC_ARG_ENABLE(sysv-ipc,
98[ --disable-sysv-ipc Disable use of SysV IPC.],
99[
100case $enableval in
101 yes)
102 SYSVIPC=yes
103 ;;
104 no)
105 SYSVIPC=no
106 ;;
107 *)
108 AC_MSG_ERROR([Invalid value for --enable-sysv-ipc ($enableval)])
109 ;;
110esac
111],[
112 SYSVIPC=yes
113]
114)
115
116AC_ARG_ENABLE(parallel,
117[ --disable-parallel Compile for serial execution.],
118[
119case $enableval in
120 yes)
121 PARALLEL=yes
122 ;;
123 no)
124 PARALLEL=no
125 ;;
126 *)
127 AC_MSG_ERROR([Invalid value for --enable-parallel ($enableval)])
128 ;;
129esac
130],[
131 PARALLEL=yes
132]
133)
134
135AC_ARG_ENABLE(always-use-mpi,
136[ --enable-always-use-mpi Causes MPI_Init to always be called from main],
137[
138case $enableval in
139 yes)
140 ALWAYS_USE_MPI=yes
141 ;;
142 no)
143 ALWAYS_USE_MPI=no
144 ;;
145 *)
146 AC_MSG_ERROR([Invalid value for --enable-always-use-mpi ($enableval)])
147 ;;
148esac
149],[
150 ALWAYS_USE_MPI=no
151]
152)
153
154DEFAULT_PARALLEL=none
155AC_ARG_WITH(default-parallel,
156[ --with-default-parallel Default parallism model: none, mpi, armcimpi or mtmpi],
157DEFAULT_PARALLEL=$withval
158)
159if test $DEFAULT_PARALLEL = mpi; then
160 AC_DEFINE(DEFAULT_MPI, 1, ["use MPI as default"])
161elif test $DEFAULT_PARALLEL = mtmpi; then
162 AC_DEFINE(DEFAULT_MPI, 1, ["use MPI as default"])
163 AC_DEFINE(DEFAULT_MTMPI, 1, ["use multi-threaded MPI as default"])
164elif test $DEFAULT_PARALLEL = armcimpi; then
165 AC_DEFINE(DEFAULT_MPI, 1, ["use MPI as default"])
166 AC_DEFINE(DEFAULT_ARMCI, 1, ["use ARMCI as default"])
167fi
168
169SC_MPI_THREAD_LEVEL=MPI_THREAD_MULTIPLE
170AC_ARG_WITH(mpi-thread,
171[ --with-mpi-thread Thread level for MPI (multiple,serialized,funneled,single)],
172[
173 case $withval in
174 multiple)
175 SC_MPI_THREAD_LEVEL=MPI_THREAD_MULTIPLE
176 ;;
177 serialized)
178 SC_MPI_THREAD_LEVEL=MPI_THREAD_SERIALIZED
179 ;;
180 funneled)
181 SC_MPI_THREAD_LEVEL=MPI_THREAD_FUNNELED
182 ;;
183 single)
184 SC_MPI_THREAD_LEVEL=MPI_THREAD_SINGLE
185 ;;
186 *)
187 AC_MSG_ERROR([Invalid value for --with-mpi-thread ($withval)])
188 ;;
189 esac
190]
191)
192AC_DEFINE_UNQUOTED(SC_MPI_THREAD_LEVEL,$SC_MPI_THREAD_LEVEL, ["thread level for MPI"])
193
194AC_ARG_ENABLE(long-long,
195[ --disable-long-long Disable use of long long.],
196[
197case $enableval in
198 yes)
199 LONGLONG=yes
200 ;;
201 no)
202 LONGLONG=no
203 ;;
204 *)
205 AC_MSG_ERROR([Invalid value for --enable-long-long ($enableval)])
206 ;;
207esac
208],[
209 LONGLONG=yes
210]
211)
212
213AC_ARG_ENABLE(threads,
214[ --enable-threads Compile allowing use of threads, if possible.],
215[
216case $enableval in
217 yes)
218 THREADS=yes
219 ;;
220 no)
221 THREADS=no
222 ;;
223 *)
224 AC_MSG_ERROR([Invalid value for --enable-threads ($enableval)])
225 ;;
226esac
227],[
228 THREADS=yes
229]
230)
231
232AC_ARG_ENABLE(ref-debug,
233[ --enable-ref-debug Check for reference count overwrites/overflows/etc],
234[
235case $enableval in
236 yes)
237 ;;
238 no)
239 AC_DEFINE(REF_OPTIMIZE, 1, ["do not check for reference count overwrites"])
240 ;;
241 *)
242 AC_MSG_ERROR([Invalid value for --enable-ref-debug ($enableval)])
243 ;;
244esac
245],[
246 if test $DEBUG = no -o $DEBUG = opt; then
247 AC_DEFINE(REF_OPTIMIZE, 1, ["do not check for reference count overwrites"])
248 fi
249]
250)
251
252AC_ARG_ENABLE(cross-compile,
253[ --enable-cross-compile Rather than checking, assume cross compilation.],
254[
255case $enableval in
256 yes)
257 cross_compiling=yes
258 ;;
259 no)
260 ;;
261 *)
262 AC_MSG_ERROR([Invalid value for --enable-cross-compile ($enableval)])
263 ;;
264esac
265])
266
267DOXYGEN_MAN=YES
268AC_ARG_ENABLE(doxygen-man,
269[ --disable-doxygen-man Disable doxygen man pages.],
270[
271case $enableval in
272 yes)
273 ;;
274 no)
275 DOXYGEN_MAN=NO
276 ;;
277 *)
278 AC_MSG_ERROR([Invalid value for --(dis|en)able-doxygen-man ($enableval)])
279 ;;
280esac
281]
282)
283AC_SUBST(DOXYGEN_MAN)
284
285AC_ARG_ENABLE(sourceforge,
286[ --enable-sourceforge Enable SourceForge web page generation],
287[
288case $enableval in
289 yes)
290 FOOTER_HTML=sf_footer.html
291 ;;
292 no)
293 FOOTER_HTML=footer.html
294 ;;
295 *)
296 AC_MSG_ERROR([Invalid value for --enable-sourceforge ($enableval)])
297 ;;
298esac
299],[
300 FOOTER_HTML=footer.html
301]
302)
303AC_SUBST(FOOTER_HTML)
304
305AC_ARG_ENABLE(components,
306[ --enable-components Enable CCA components],
307[
308case $enableval in
309 yes)
310 components=yes
311 ;;
312 no)
313 components=no
314 ;;
315 *)
316 AC_MSG_ERROR([Invalid value for --enable-components ($enableval)])
317 ;;
318esac
319],[
320 components=no
321]
322)
323ENABLECCA=$components
324AC_SUBST(ENABLECCA)
325
326BUILDID="sc_buildid"
327AC_ARG_WITH(build-id,
328[ --with-build-id Gives an identifier for the build.],
329BUILDID=$withval
330)
331AC_SUBST(BUILDID)
332AC_DEFINE_UNQUOTED(SC_BUILDID,"$BUILDID", ["build identifier"])
333
334DEFAULT_SC_MEMORY=32000000
335AC_ARG_WITH(default-memory,
336[ --with-default-memory Gives the default memory allocation.],
337DEFAULT_SC_MEMORY=$withval
338)
339AC_DEFINE_UNQUOTED(DEFAULT_SC_MEMORY,$DEFAULT_SC_MEMORY, ["default memory allocation"])
340
341if test "$BUILDID"; then
342 SC_VERSION="$SC_MMM_VERSION-$BUILDID"
343else
344 SC_VERSION="$SC_MMM_VERSION"
345fi
346
347AC_DEFINE_UNQUOTED(SC_VERSION, "$SC_VERSION", ["SC version"])
348AC_SUBST(SC_VERSION)
349
350ac_default_prefix="/usr/local/mpqc/$SC_VERSION"
351
352AC_ARG_WITH(cc,
353[ --with-cc Gives the name of the C compiler to use.],
354CC=$withval
355)
356
357AC_ARG_WITH(cxx,
358[ --with-cxx Gives the name of the C++ compiler to use.],
359CXX=$withval
360)
361
362AC_ARG_WITH(f77,
363[ --with-f77 Gives the name of the FORTRAN 77 compiler to use.],
364F77=$withval
365)
366
367AC_ARG_WITH(cxx-optflags,
368[ --with-cxx-optflags Optimization flags to use with the C++ compiler.],
369GIVEN_CXXOPTIONS_OPT=$withval
370)
371
372AC_ARG_WITH(cc-optflags,
373[ --with-cc-optflags Optimization flags to use with the C compiler.],
374GIVEN_COPTIONS_OPT=$withval
375)
376
377DOT=yes
378AC_ARG_WITH(dot,
379[ --with-dot Gives the path to the dot graph generator.],
380DOT=$withval
381)
382
383AC_ARG_WITH(ranlib,
384[ --with-ranlib Gives the name of the ranlib program.],
385RANLIB=$withval
386)
387
388AC_ARG_WITH(ar,
389[ --with-ar Names the archive creator.],
390AR=$withval
391)
392
393ARFLAGS=r
394AC_ARG_WITH(ar-flags,
395[ --with-ar-flags Flags for the the archive creator.],
396ARFLAGS=$withval
397)
398AC_SUBST(ARFLAGS)
399
400AC_ARG_WITH(ld,
401[ --with-ld Names the object linker.],
402LD=$withval
403)
404
405changequote(<<, >>)dnl
406LAUNCH="%MPQC% [-o %OUTPUT%] %INPUT%"
407changequote([, ])dnl
408AC_ARG_WITH(launch,
409[ --with-launch The mpqcrun script launch string.],
410LAUNCH=$withval
411)
412AC_SUBST(LAUNCH)
413
414changequote(<<, >>)dnl
415CCALAUNCH="%CCAFE% --ccafe-rc %INPUT% --ccafe-remap-stdio --ccafe-outputdir %OUTPUT%";
416changequote([, ])dnl
417AC_ARG_WITH(cca-launch,
418[ --with-cca-launch The ccarun script launch string.],
419CCALAUNCH=$withval
420)
421AC_SUBST(CCALAUNCH)
422
423if test $prefix = $ac_default_prefix -o $prefix = NONE; then
424 scdatadir=$datadir
425else
426 scdatadir=$datadir/mpqc/$SC_VERSION
427fi
428AC_ARG_WITH(sc-datadir,
429[ --with-sc-datadir Specifies arch-independent install subdir.],
430scdatadir=$withval
431)
432AC_SUBST(scdatadir)
433
434AC_ARG_WITH(include,
435[ --with-include Specifies include directories (-Idir1 -Idir2).],
436EXTRAINCLUDE=$withval
437CPPFLAGS=$withval
438echo Using extra include directories: $withval
439)
440
441template_instantiation=none
442AC_ARG_WITH(template,
443[ --with-template Specifies template instantation model.],
444template_instantiation=$withval
445echo Using extra include directories: $withval
446)
447
448scincludedir=$includedir
449AC_ARG_WITH(sc-includedir,
450[ --with-sc-includedir Specifies include file install subdir.],
451scincludedir=$withval
452)
453AC_SUBST(scincludedir)
454
455AC_ARG_WITH(libs,
456[ --with-libs Specifies libraries (-llib1 -llib2).],
457LIBS=$withval
458echo Using extra libraries: $withval
459)
460
461XTRA_FLIBS=
462AC_ARG_WITH(extra-flibs,
463[ --with-extra-flibs Specifies libs needing a F77 runtime (-llib1 -llib2).],
464XTRA_FLIBS=$withval
465echo Using extra FORTRAN libraries: $withval
466)
467
468have_flibs=no
469AC_ARG_WITH(flibs,
470[ --with-flibs Specifies the F77 runtime (by default, will guess).],
471FLIBS=$withval
472have_flibs=yes
473echo Using FORTRAN runtime libraries: $withval
474)
475
476LDFLAGS=
477LIBDIRS=
478AC_ARG_WITH(libdirs,
479[ --with-libdirs Specifies library directories (-Ldir1 -Ldir2).],
480LIBDIRS=$withval
481LDFLAGS=$withval
482echo Using extra library directories: $withval
483)
484
485AC_ARG_WITH(cca-chem-config,
486[ --with-cca-chem-config Specifies full pathname of cca-chem-config script.],
487[
488 CCA_CHEM_CONFIG=$withval
489 echo Using cca-chem-config: $withval
490],[
491 if test "$components" == "yes"; then
492 AC_PATH_PROG(CCA_CHEM_CONFIG,cca-chem-config,"not-found")
493 fi
494]
495)
496
497dnl --------- Want absolute path for srcdir, not relative. ---------
498
499if test X$ac_srcdir_defaulted = Xyes; then
500 case $srcdir in
501 .|..|./*|../*)
502 srcdir=`(cd $srcdir; pwd)`
503 #srcdir=`(cd $srcdir; echo $PWD)`
504 ;;
505 esac
506fi
507
508dnl --------- Get the path to the compile dir. ---------
509
510compiledir=`pwd`
511AC_SUBST(compiledir)
512
513dnl --------- Need actual paths for substitution outside of a makefile. ---------
514
515if test $exec_prefix = "NONE"; then
516 if test $prefix = "NONE"; then
517 scbindir=$ac_default_prefix/bin;
518 sclibdir=$ac_default_prefix/lib;
519 else
520 scbindir=$prefix/bin;
521 sclibdir=$prefix/lib;
522 fi
523else
524 scbindir=$exec_prefix/bin
525 sclibdir=$exec_prefix/lib
526fi
527AC_SUBST(scbindir)
528AC_SUBST(sclibdir)
529
530dnl --------- Checks for programs. ---------
531AC_PROG_LN_S
532AC_PROG_INSTALL
533AC_PROG_RANLIB
534AC_PROG_CC
535dnl ac_prog_cxx's order isn't what i need
536AC_CHECK_PROGS(CXX, g++ c++ gcc CC cxx xlC_r, gcc)
537dnl sees if CXX is a GNU compiler
538AC_PROG_CXX
539if test ! "$F77" = no ; then
540 AC_PROG_F77
541 if test "X$have_flibs" = Xno; then
542 AC_F77_LIBRARY_LDFLAGS
543 fi
544fi
545FLIBS="$XTRA_FLIBS $FLIBS"
546AC_PROG_CPP
547AC_PROG_CXXCPP
548AC_CHECK_PROG(AR,ar,ar)
549AC_CHECK_PROG(PERL,perl,perl)
550AC_CHECK_PROG(WISH,wish,/usr/bin/wish)
551
552dnl The lack of certain tools is a show stopper
553
554changequote(<<, >>)dnl
555
556if [ X$PERL = X ]; then
557 echo "Could not find the program perl. It can be obtained at"
558 echo "ftp://prep.ai.mit.edu/pub/gnu"
559 exit 1
560fi
561
562changequote([, ])dnl
563
564dnl --------- Check for the graph generator used by doxygen
565
566DOT_PATH=""
567if test X$DOT = Xno; then
568 HAVE_DOT=NO
569elif test X$DOT = Xyes; then
570 AC_CHECK_PROG(HAVE_DOT,dot,YES,NO)
571else
572 HAVE_DOT=YES
573 DOT_PATH=$DOT
574fi
575AC_SUBST(DOT_PATH)
576AC_SUBST(HAVE_DOT)
577
578dnl -------- Checks for cross compiling. ----------
579
580# obsolete starting at autoconf 2.12
581#if test X$cross_compiling != Xyes; then
582#AC_C_CROSS
583#fi
584
585#if test X$cross_compiling = Xyes -a X$target = X$host; then
586# AC_MSG_ERROR([Cross compiling, but target is host (use --host).])
587#fi
588
589dnl -------- Checks for compiler/linker options. ----------
590
591# options needed only for optimization
592COPTIONS_OPT=-O
593# options needed only for debugging
594COPTIONS_DBG=-g
595# options that are always needed
596COPTIONS_MISC=
597
598# options needed only for optimization
599CXXOPTIONS_OPT=-O
600# options needed only for debugging
601CXXOPTIONS_DBG=-g
602# options that are always needed
603CXXOPTIONS_MISC=
604
605OBJSUF=o
606LIBSUF=a
607
608dnl -- check how dependency information is built --
609
610# The GNU compilers work with:
611CCDEPENDSUF=none
612CXXDEPENDSUF=none
613CCDEPENDFLAGS=-M
614CXXDEPENDFLAGS=-M
615
616/bin/rm -f depcheck.u depcheck.c depcheck.o
617
618# Check for an IBM visual age C compiler
619echo "#include <stdio.h>" > depcheck.c
620$CC $CPPFLAGS $CFLAGS -M depcheck.c > /dev/null 2>&1
621if test -f depcheck.u; then
622 CCDEPENDSUF=u
623fi
624/bin/rm -f depcheck.u depcheck.c depcheck.o
625
626# Check for an IBM visual age C++ compiler
627echo "#include <iostream>" > depcheck.cc
628$CXX $CPPFLAGS $CXXFLAGS -M -E depcheck.cc > /dev/null 2>&1
629if test -f depcheck.u; then
630 CXXDEPENDSUF=u
631 CXXDEPENDFLAGS="-M -E"
632fi
633/bin/rm -f depcheck.u depcheck.c depcheck.o
634
635dnl -- special misc options --
636
637AC_MSG_CHECKING([for miscellaneous flags])
638case $target in
639 *-cray-unicos*)
640 if test ! X$GXX = Xyes; then
641 CXXOPTIONS_MISC="$CXXOPTIONS_MISC -h new_for_init"
642 fi
643 AC_MSG_RESULT(cray)
644 ;;
645 *)
646 AC_MSG_RESULT(none)
647 ;;
648esac
649
650dnl -- special optimization options --
651
652AC_MSG_CHECKING([for special optimization options])
653case $target in
654 rs6000-ibm-aix3.2.* | rs6000-ibm-aix4.* | powerpc-ibm-aix4.* | powerpc-ibm-aix5.*)
655 if test X$GCC != Xyes; then
656 COPTIONS_OPT="-O -qnolm"
657 fi
658 if test X$GXX != Xyes; then
659 CXXOPTIONS_OPT="-O -qnolm -qrtti"
660 fi
661 AC_MSG_RESULT("rs6000 or powerpc")
662 ;;
663 alphaev6-*)
664 if test X$GCC = Xyes; then
665 COPTIONS_OPT="-O3 -mcpu=ev6"
666 else
667 COPTIONS_OPT="-O5 -arch ev6"
668 fi
669 if test X$GXX = Xyes; then
670 CXXOPTIONS_OPT="-O3 -mcpu=ev6"
671 else
672 CXXOPTIONS_OPT="-O5 -arch ev6"
673 fi
674 AC_MSG_RESULT("alphaev6")
675 ;;
676 alphaev56-*)
677 if test X$GCC = Xyes; then
678 COPTIONS_OPT="-O3 -mcpu=ev56"
679 else
680 COPTIONS_OPT="-O5 -arch ev56"
681 fi
682 if test X$GXX = Xyes; then
683 CXXOPTIONS_OPT="-O3 -mcpu=ev56"
684 else
685 CXXOPTIONS_OPT="-O5 -arch ev56"
686 fi
687 AC_MSG_RESULT("alphaev56")
688 ;;
689 mips*-sgi-irix5*)
690 if test X$GCC != Xyes; then
691 COPTIONS_OPT="-O -Olimit 2000"
692 fi
693 AC_MSG_RESULT("mips*-sgi-irix5")
694 ;;
695changequote(<<, >>)dnl
696 mips*-sgi-irix6.[01]*)
697changequote([, ])dnl
698 if test X$GCC != Xyes; then
699 COPTIONS_OPT="-O2 -TENV:use_fp \
700 -OPT:const_copy_limit=20000:fold_arith_limit=20000:global_limit=20000"
701 fi
702 if test X$GXX != Xyes; then
703 CXXOPTIONS_OPT="-O2 -TENV:use_fp \
704 -OPT:const_copy_limit=20000:fold_arith_limit=20000:global_limit=20000"
705 fi
706 AC_MSG_RESULT("mips*-sgi-irix6.0 or mips*-sgi-irix6.1")
707 ;;
708 mips*-sgi-irix*)
709 if test X$GCC != Xyes; then
710 COPTIONS_OPT="-O2 -OPT:Olimit=0"
711 fi
712 if test X$GXX != Xyes; then
713 CXXOPTIONS_OPT="-O2 -OPT:Olimit=0"
714 fi
715 AC_MSG_RESULT("mips*-sgi-irix")
716 ;;
717changequote(<<, >>)dnl
718 i[56]86-*)
719changequote([, ])dnl
720 if test X$GCC = Xyes; then
721 COPTIONS_OPT="-O2"
722 fi
723 if test X$GXX = Xyes; then
724 CXXOPTIONS_OPT="-O2"
725 fi
726 AC_MSG_RESULT("i586 or i686")
727 ;;
728 i860-intel-*)
729 if test X$GCC != Xyes; then
730 COPTIONS_OPT="-O3 -Knoieee"
731 fi
732 AC_MSG_RESULT("i860")
733 ;;
734 *)
735 AC_MSG_RESULT("none")
736 ;;
737esac
738
739dnl -- special architecture options --
740
741case $target_cpu in
742 i786)
743 opt_target_cpu=pentium4
744 ;;
745 *)
746 opt_target_cpu=$target_cpu
747 ;;
748esac
749
750if test X$GXX == Xyes; then
751 AC_MSG_CHECKING([for C++ cpu tuning flag])
752 AC_LANG_SAVE
753 AC_LANG_CPLUSPLUS
754 CXXFLAGS_SAV=$CXXFLAGS
755 CXXFLAGS="-mtune=$opt_target_cpu $CXXFLAGS_SAV"
756 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int main(){}])],cxx_tuneflag="-mtune",cxx_tuneflag="-mcpu")
757 CXXFLAGS=$CXXFLAGS_SAV
758 AC_LANG_RESTORE
759 AC_MSG_RESULT($cxx_tuneflag)
760fi
761
762if test X$GCC == Xyes; then
763 AC_MSG_CHECKING([for C cpu tuning flag])
764 CFLAGS_SAV=$CFLAGS
765 CFLAGS="-mtune=$opt_target_cpu $CFLAGS_SAV"
766 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int main(){}])],cc_tuneflag="-mtune",cc_tuneflag="-mcpu")
767 CFLAGS=$CFLAGS_SAV
768 AC_MSG_RESULT($cc_tuneflag)
769fi
770
771AC_MSG_CHECKING([for special architecture options])
772case $target in
773 *-solaris2*)
774 if test X$GCC != Xyes; then
775 CCDEPENDFLAGS="-xM"
776 fi
777 if test X$GXX != Xyes; then
778 CXXDEPENDFLAGS="-xM"
779 fi
780 ;;
781 rs6000-ibm-aix* | powerpc-ibm-aix*)
782 if test X$GCC != Xyes; then
783 LDFLAGS="$LDFLAGS -bmaxdata:0x70000000"
784 fi
785 AC_MSG_RESULT(rs6000 or powerpc)
786 ;;
787 i686-intel-cougar*)
788 COPTIONS_MISC="$COPTIONS_MISC -mcougar"
789 CXXOPTIONS_MISC="$CXXOPTIONS_MISC -mcougar"
790 EXTRADEFINES="-D_REENTRANT $EXTRADEFINES"
791 if test X$cross_compiling = Xyes; then
792 AR=tflop-ar
793 fi
794 AC_MSG_RESULT(teraflop cougar)
795 ;;
796changequote(<<, >>)dnl
797 i[4567]86-* | pentium-* | pentium4-* | pentiumpro-* | k6-* | athlon-*)
798changequote([, ])dnl
799
800 if test X$STRICT_ARCH = Xyes; then
801 cxx_cpu_arch_option="-march=$opt_target_cpu"
802 cc_cpu_arch_option="-march=$opt_target_cpu"
803 else
804 cxx_cpu_arch_option="$cxx_tuneflag=$opt_target_cpu"
805 cc_cpu_arch_option="$cc_tuneflag=$opt_target_cpu"
806 fi
807 if test X$GCC = Xyes; then
808 COPTIONS_OPT="$COPTIONS_OPT $cc_cpu_arch_option"
809 fi
810 if test X$GXX = Xyes; then
811 CXXOPTIONS_OPT="$CXXOPTIONS_OPT $cxx_cpu_arch_option"
812 fi
813 AC_MSG_RESULT(IA-32: $cpu_arch_option)
814 ;;
815 i860-intel-puma*)
816 if test X$GCC = Xyes; then
817 COPTIONS_MISC="$COPTIONS_MISC -mpuma"
818 else
819 COPTIONS_MISC="$COPTIONS_MISC -D__PUMAGON__"
820 COPTIONS_MISC="$COPTIONS_MISC -L$PARAGON_XDEV/paragon/lib-coff/puma"
821 COPTIONS_MISC="$COPTIONS_MISC -YS,$PARAGON_XDEV/paragon/lib-coff/puma"
822 COPTIONS_MISC="$COPTIONS_MISC -lpuma -lm -lkmath"
823 COPTIONS_MISC="$COPTIONS_MISC $PARAGON_XDEV/paragon/lib-coff/puma/libstubs.o"
824 fi
825 if test X$GXX = Xyes; then
826 CXXOPTIONS_MISC="$CXXOPTIONS_MISC -mpuma"
827 fi
828 if test X$cross_compiling = Xyes; then
829 AR=ar860
830 fi
831 AC_MSG_RESULT(paragon puma)
832 ;;
833 i860-intel-sunmos*)
834 if test X$GCC = Xyes; then
835 COPTIONS_MISC="$COPTIONS_MISC -msunmos"
836 else
837 COPTIONS_MISC="$COPTIONS_MISC -DSUNMOS -D__PUMAGON__"
838 COPTIONS_MISC="$COPTIONS_MISC -L$PARAGON_XDEV/paragon/lib-coff/sunmos"
839 COPTIONS_MISC="$COPTIONS_MISC -Wl,-d0x4000000,-k"
840 COPTIONS_MISC="$COPTIONS_MISC -YS,$PARAGON_XDEV/paragon/lib-coff/sunmos"
841 COPTIONS_MISC="$COPTIONS_MISC -lm -lsunmos -lm"
842 fi
843 if test X$GXX = Xyes; then
844 CXXOPTIONS_MISC="$CXXOPTIONS_MISC -msunmos"
845 fi
846 if test X$cross_compiling = Xyes; then
847 AR=ar860
848 fi
849 AC_MSG_RESULT(paragon sunmos)
850 ;;
851 i860-intel-osf*)
852 if test X$GCC = Xyes; then
853 COPTIONS_MISC="$COPTIONS_MISC -mnx"
854 fi
855 if test X$GXX = Xyes; then
856 CXXOPTIONS_MISC="$CXXOPTIONS_MISC -mnx"
857 fi
858 if test X$cross_compiling = Xyes; then
859 AR=ar860
860 fi
861 AC_MSG_RESULT(paragon osf)
862 ;;
863 *)
864 AC_MSG_RESULT("none")
865 ;;
866esac
867
868dnl -- check for overriden optimization options --
869
870if test -n "$GIVEN_COPTIONS_OPT"; then
871 COPTIONS_OPT=$GIVEN_COPTIONS_OPT
872 AC_MSG_NOTICE("overriding C optimization flags with $COPTIONS_OPT")
873fi
874
875if test -n "$GIVEN_CXXOPTIONS_OPT"; then
876 CXXOPTIONS_OPT=$GIVEN_CXXOPTIONS_OPT
877 AC_MSG_NOTICE("overriding C++ optimization flags with $CXXOPTIONS_OPT")
878fi
879
880dnl ----------- check for C++ typename ---------------
881dnl This is done before template flags are set to avoid
882dnl undefined symbol problems.
883
884AC_LANG_SAVE
885AC_LANG_CPLUSPLUS
886AC_MSG_CHECKING("for C++ typename keyword")
887AC_TRY_LINK([
888 class X { public: typedef int t; X(){} };
889 template <class T> void f(T i) {typename T::t x;}
890],[
891 X g;
892 f(g);
893],[
894AC_DEFINE(HAVE_TYPENAME, 1, ["use typename keyword"])
895AC_MSG_RESULT("yes")
896],
897AC_MSG_RESULT("no")
898AC_DEFINE(typename, [], ["remove usage of absent typename keyword by empty define"])
899);
900AC_LANG_RESTORE
901
902dnl ----------- check for C++ restrict extension ---------------
903
904AC_LANG_SAVE
905AC_LANG_CPLUSPLUS
906AC_TRY_LINK(,[double *restrict x=0;],
907 AC_DEFINE(CXX_RESTRICT, 1, ["c++ restricted extensions"])
908 AC_DEFINE(restrictxx, [restrict], ["convert keyword for c++ restricted extensions"]),
909
910 AC_DEFINE(restrictxx, [], ["convert keyword to none for c++ restricted extensions"]),
911)
912AC_LANG_RESTORE
913
914dnl ---------- Checks for C++ header files. -----------
915
916AC_LANG_SAVE
917AC_LANG_CPLUSPLUS
918AC_CHECK_HEADERS(iostream sstream)
919AC_LANG_RESTORE
920
921AC_MSG_CHECKING(iostream name)
922if test x$ac_cv_header_iostream = xyes; then
923 iostream=iostream
924else
925 iostream=iostream.h
926fi
927AC_MSG_RESULT($iostream)
928
929dnl ----------- check for namespace std ---------------
930
931AC_LANG_SAVE
932AC_LANG_CPLUSPLUS
933AC_MSG_CHECKING("for namespace std")
934AC_TRY_LINK([
935#include <$iostream>
936using namespace std;
937],[
938 ostream &o = cout;
939 o << endl;
940],[
941AC_DEFINE(USING_NAMESPACE_STD, 1, ["using namespace std"])
942NAMESPACE_STD=std::
943AC_MSG_RESULT("yes")
944],
945NAMESPACE_STD=
946AC_MSG_RESULT("no")
947);
948AC_LANG_RESTORE
949
950dnl ----------- check for GNU libc++-v3 prerelease bug ---------------
951
952if test X$GXX = Xyes; then
953AC_LANG_SAVE
954AC_LANG_CPLUSPLUS
955AC_MSG_CHECKING("for GNU libc++-v3 prerelease bug")
956AC_TRY_LINK([
957#include <stdio.h>
958#include <$iostream>
959],[
960],[
961AC_MSG_RESULT("no")
962],
963EXTRADEFINES="$EXTRADEFINES -D_ISOC99_SOURCE=1"
964AC_MSG_RESULT("yes")
965);
966AC_LANG_RESTORE
967fi
968
969dnl -- other options --
970
971if test $DEBUG = yes; then
972 CFLAGS="$COPTIONS_DBG $COPTIONS_MISC"
973 CXXFLAGS="$CXXOPTIONS_DBG $CXXOPTIONS_MISC"
974 LDFLAGS="$LDFLAGS -g"
975elif test $DEBUG = opt; then
976 CFLAGS="$COPTIONS_DBG $COPTIONS_OPT $COPTIONS_MISC"
977 CXXFLAGS="$CXXOPTIONS_DBG $CXXOPTIONS_OPT $CXXOPTIONS_MISC"
978 LDFLAGS="$LDFLAGS -g"
979else
980 CFLAGS="$COPTIONS_OPT $COPTIONS_MISC"
981 CXXFLAGS="$CXXOPTIONS_OPT $CXXOPTIONS_MISC"
982fi
983
984AC_SUBST(EXTRAINCLUDE)
985
986AC_SUBST(CFLAGS)
987AC_SUBST(CXXFLAGS)
988
989AC_SUBST(LDFLAGS)
990AC_SUBST(LIBDIRS)
991
992AC_SUBST(OBJSUF)
993AC_SUBST(LIBSUF)
994AC_SUBST(CCDEPENDSUF)
995AC_SUBST(CXXDEPENDSUF)
996AC_SUBST(CCDEPENDFLAGS)
997AC_SUBST(CXXDEPENDFLAGS)
998
999dnl -------- Checks for architecture specific features. --------
1000dnl (Doesn't work for cross compilation.)
1001dnl AC_CHECK_SIZEOF(void*)
1002
1003dnl This version works on more machines without the need to run
1004dnl a test program.
1005AC_DEFUN([SC_C_BIGENDIAN],
1006[AC_CHECK_HEADERS(fp.h endian.h machine/endian.h sys/endian.h sys/machine.h)
1007AC_CACHE_CHECK(whether byte ordering is bigendian, sc_cv_c_bigendian,
1008[sc_cv_c_bigendian=unknown
1009# See if sys/param.h defines the BYTE_ORDER macro.
1010AC_TRY_COMPILE([#include "confdefs.h"
1011#ifdef HAVE_FP_H
1012#include <fp.h>
1013#endif
1014#ifdef HAVE_ENDIAN_H
1015#include <endian.h>
1016#endif
1017#ifdef HAVE_MACHINE_ENDIAN_H
1018#include <machine/endian.h>
1019#endif
1020#ifdef HAVE_SYS_ENDIAN_H
1021#include <sys/endian.h>
1022#endif
1023#ifdef HAVE_SYS_MACHINE_H
1024#include <sys/machine.h>
1025#endif
1026#include <sys/types.h>
1027#include <sys/param.h>], [
1028#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1029 bogus endian macros
1030#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
1031AC_TRY_COMPILE([#include "confdefs.h"
1032#ifdef HAVE_FP_H
1033#include <fp.h>
1034#endif
1035#ifdef HAVE_MP_H
1036#include <mp.h>
1037#endif
1038#ifdef HAVE_ENDIAN_H
1039#include <endian.h>
1040#endif
1041#ifdef HAVE_MACHINE_ENDIAN_H
1042#include <machine/endian.h>
1043#endif
1044#ifdef HAVE_SYS_ENDIAN_H
1045#include <sys/endian.h>
1046#endif
1047#ifdef HAVE_SYS_MACHINE_H
1048#include <sys/machine.h>
1049#endif
1050#include <sys/types.h>
1051#include <sys/param.h>], [
1052#if BYTE_ORDER != BIG_ENDIAN
1053 not big endian
1054#endif], sc_cv_c_bigendian=yes, sc_cv_c_bigendian=no)])
1055if test $sc_cv_c_bigendian = unknown; then
1056AC_TRY_RUN([main () {
1057 /* Are we little or big endian? From Harbison&Steele. */
1058 union
1059 {
1060 long l;
1061 char c[sizeof (long)];
1062 } u;
1063 u.l = 1;
1064 exit (u.c[sizeof (long) - 1] == 1);
1065}], sc_cv_c_bigendian=no, sc_cv_c_bigendian=yes,
1066AC_MSG_ERROR([Could not determine endianness and cross compiling])
1067)
1068fi])
1069if test $sc_cv_c_bigendian = yes; then
1070 AC_DEFINE(WORDS_BIGENDIAN, 1, ["use big endian encoding"])
1071fi
1072])
1073
1074SC_C_BIGENDIAN
1075
1076dnl --------- Checks for libraries. ---------
1077dnl -- libpthread should be linked in last.
1078dnl -- Check on pthread_join since pthread_create, but not pthread_join,
1079dnl -- seems to be in libc on IRIX and we must generate a -lpthread in LIBS.
1080if test "(" X$PARALLEL = Xyes -a X$THREADS != Xno ")" -o X$THREADS = Xyes; then
1081
1082AC_MSG_CHECKING([pthreads])
1083dnl see if posix threads are automatically linked ...
1084AC_LANG_SAVE
1085AC_LANG_CPLUSPLUS
1086LIBSSAV="$LIBS"
1087AC_TRY_LINK([#include <pthread.h>],[pthread_join(0,0);],[
1088HAVE_PTHREAD=yes],[
1089HAVE_PTHREAD=no])
1090AC_LANG_RESTORE
1091
1092dnl see if posix threads are in -lpthread
1093if test $HAVE_PTHREAD = no; then
1094AC_LANG_SAVE
1095AC_LANG_CPLUSPLUS
1096LIBSSAV="$LIBS"
1097LIBS="$LIBS -lpthread"
1098AC_TRY_LINK([#include <pthread.h>],[pthread_join(0,0);],[
1099HAVE_PTHREAD=yes],[
1100HAVE_PTHREAD=no
1101LIBS="$LIBSSAV"])
1102AC_LANG_RESTORE
1103fi
1104
1105dnl see if posix threads are in -lpthreads
1106if test $HAVE_PTHREAD = no; then
1107AC_LANG_SAVE
1108AC_LANG_CPLUSPLUS
1109LIBSSAV="$LIBS"
1110LIBS="$LIBS -lpthreads"
1111AC_TRY_LINK([#include <pthread.h>],[pthread_join(0,0);],[
1112HAVE_PTHREAD=yes],[
1113HAVE_PTHREAD=no
1114LIBS="$LIBSSAV"])
1115AC_LANG_RESTORE
1116fi
1117
1118AC_MSG_RESULT($HAVE_PTHREAD)
1119fi
1120if test X$HAVE_PTHREAD = Xyes; then
1121 AC_DEFINE(HAVE_PTHREAD, 1, ["use pthreads"])
1122 EXTRADEFINES="-D_REENTRANT $EXTRADEFINES"
1123 AC_CHECK_FUNC(pthread_attr_getstacksize)
1124 AC_CHECK_FUNC(pthread_attr_setstacksize)
1125 AC_CHECK_FUNC(pthread_attr_setscope)
1126 AC_CHECK_FUNC(pthread_attr_getscope)
1127 AC_CHECK_FUNC(pthread_attr_setinheritsched)
1128 AC_CHECK_FUNC(pthread_attr_getinheritsched)
1129 AC_CHECK_FUNC(pthread_attr_setschedpolicy)
1130 AC_CHECK_FUNC(pthread_attr_getschedpolicy)
1131 AC_CHECK_FUNC(pthread_attr_setschedparam)
1132 AC_CHECK_FUNC(pthread_attr_getschedparam)
1133 AC_CHECK_FUNC(sched_get_priority_max)
1134 AC_CHECK_FUNC(sched_get_priority_min)
1135fi
1136
1137AC_CHECK_LIB(dl,main)
1138dnl commented out for Cray X1 (-lsun falsely detected)
1139dnl AC_CHECK_LIB(sun,main)
1140AC_CHECK_LIB(m,main)
1141AC_CHECK_LIB(fl,main)
1142AC_CHECK_HEADER(perf.h,[
1143 AC_CHECK_LIB(perf,perf_set_config,[
1144 HAVE_PERF=yes
1145 LIBS="-lperf $LIBS"
1146 AC_DEFINE(HAVE_PERF, 1, ["use perf"])
1147 ])
1148 ]
1149)
1150
1151AC_CHECK_HEADER(execinfo.h,HAVE_EXECINFO_H_INC=1)
1152AC_CHECK_FUNC(backtrace, HAVE_BACKTRACE_FUNC=1)
1153AC_CHECK_FUNC(backtrace_symbols_fd, HAVE_BACKTRACE_SYMBOLS_FD_FUNC=1)
1154if test -n "$HAVE_EXECINFO_H_INC" -a -n "$HAVE_BACKTRACE_FUNC" -a -n "$HAVE_BACKTRACE_SYMBOLS_FD_FUNC"; then
1155 AC_DEFINE(HAVE_BACKTRACE, 1, ["use backtrace"])
1156fi
1157
1158if test X$PARALLEL = Xyes; then
1159
1160 dnl ----- check for the mpi library
1161 AC_LANG_SAVE
1162 AC_LANG_CPLUSPLUS
1163 dnl Must use try_link since check_header runs cpp which doesn't
1164 dnl always find mpi.h (if mpicc and no -I is used for example)
1165 AC_MSG_CHECKING(for mpi.h)
1166 AC_TRY_LINK([#include <mpi.h>],[],have_mpi_h=yes,have_mpi_h=no)
1167 AC_MSG_RESULT($have_mpi_h)
1168 if test "$have_mpi_h" = yes; then
1169 AC_CHECK_FUNC(MPI_Init,HAVE_MPI=yes,HAVE_MPI=no)
1170 if test "$HAVE_MPI" = no; then
1171 AC_CHECK_LIB(mpi,MPI_Init,[HAVE_MPI=yes;LIBS="-lmpi $LIBS"])
1172 fi
1173 if test "$HAVE_MPI" = no; then
1174 AC_CHECK_LIB(mpich,MPI_Init,[HAVE_MPI=yes;LIBS="-lmpich $LIBS"])
1175 fi
1176 fi
1177 if test X$HAVE_MPI = Xyes; then
1178 AC_DEFINE(HAVE_MPI, 1, ["have MPI"])
1179 AC_CHECK_FUNC(MPI_File_open,
1180 [HAVE_MPIIO=yes;AC_DEFINE(HAVE_MPIIO, 1, ["have MPI IO extensions"])])
1181 AC_CHECK_FUNC(MPI_Init_thread,
1182 [AC_DEFINE(HAVE_MPI_INIT_THREAD, 1, ["have MPI init thread"])])
1183 HAVE_MPIPP=no;
1184 AC_CHECK_LIB(mpi++,MPI_Abort,[HAVE_MPIPP=yes;LIBS="-lmpi++ $LIBS"])
1185 if test X$HAVE_MPIPP = Xno; then
1186 AC_CHECK_LIB(pmpich++,MPI_Abort,[HAVE_MPIPP=yes;LIBS="-lpmpich++ $LIBS"])
1187 fi
1188 AC_DEFINE(HAVE_MPIPP, 1, ["have MPI PP"])
1189 fi
1190 AC_LANG_RESTORE
1191fi
1192
1193if test X$HAVE_MPI != Xyes -a $ALWAYS_USE_MPI = yes; then
1194 AC_MSG_ERROR([--enable-always-use-mpi is set but MPI is not available])
1195elif test $ALWAYS_USE_MPI = yes; then
1196 AC_DEFINE(ALWAYS_USE_MPI, 1, ["always use MPI"])
1197fi
1198
1199 dnl ------ check for the armci library
1200 AC_LANG_SAVE
1201 AC_LANG_CPLUSPLUS
1202 AC_CHECK_HEADER(armci.h,[
1203 AC_CHECK_FUNC(ARMCI_Init,HAVE_ARMCI=yes,[
1204 AC_CHECK_LIB(armci,ARMCI_Init,[HAVE_ARMCI=yes;LIBS="-larmci $LIBS"])
1205 ])
1206 ])
1207 AC_LANG_RESTORE
1208
1209 if test X$HAVE_ARMCI = Xyes; then
1210 AC_DEFINE(HAVE_ARMCI, 1, ["use ARMCI"])
1211 fi
1212
1213if test $DEFAULT_PARALLEL = mtmpi -a X$HAVE_MPI != Xyes; then
1214 AC_MSG_ERROR([--with-default-parallel=mtmpi but MPI not available])
1215fi
1216if test $DEFAULT_PARALLEL = armcimpi -a X$HAVE_MPI != Xyes; then
1217 AC_MSG_ERROR([--with-default-parallel=armcimpi but MPI not available])
1218fi
1219if test $DEFAULT_PARALLEL = armcimpi -a X$HAVE_ARMCI != Xyes; then
1220 AC_MSG_ERROR([--with-default-parallel=armcimpi but ARMCI not available])
1221fi
1222
1223AC_SUBST(HAVE_PERF)
1224AC_SUBST(HAVE_MPI)
1225AC_SUBST(ALWAYS_USE_MPI)
1226AC_SUBST(HAVE_ARMCI)
1227AC_SUBST(HAVE_MPIIO)
1228AC_SUBST(HAVE_PTHREAD)
1229AC_SUBST(EXTRADEFINES)
1230
1231dnl ---------- Checks for header files. -----------
1232
1233AC_HEADER_STDC
1234AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h pwd.h)
1235AC_CHECK_HEADERS(sys/times.h sys/resource.h time.h machine/fpu.h asm/fpu.h)
1236AC_CHECK_HEADERS(termios.h sys/stat.h sys/types.h dlfcn.h stdint.h)
1237
1238dnl -- Checks for typedefs, structures, and compiler characteristics. --
1239AC_C_CONST
1240AC_TYPE_SIZE_T
1241AC_STRUCT_TM
1242
1243dnl --------- Checks for library functions. ---------
1244AC_TYPE_SIGNAL
1245AC_FUNC_VPRINTF
1246AC_CHECK_FUNCS(strerror sigfillset signal system getpwuid geteuid)
1247AC_CHECK_FUNCS(gethostname time ctime)
1248AC_CHECK_FUNCS(setrlimit setenv)
1249
1250dnl --------- Check for an isnan and make sure it can be used
1251dnl with iostream (it can't on OS X)
1252AC_LANG_SAVE
1253AC_LANG_CPLUSPLUS
1254AC_MSG_CHECKING(isnan and iostream)
1255AC_LINK_IFELSE([AC_LANG_PROGRAM([
1256 #include <iostream>
1257 #include <math.h>
1258 int main(int,char**) { isnan(1.0); return 0; }
1259 ])],
1260 AC_DEFINE(HAVE_ISNAN,1, ["isnan available"])
1261 AC_MSG_RESULT(yes),
1262 AC_MSG_RESULT(no)
1263)
1264AC_LANG_RESTORE
1265
1266dnl --------- Check for the glibc extensions to C99 fenv.h. ---------
1267
1268AC_CHECK_HEADERS(fenv.h)
1269AC_CHECK_FUNCS(feenableexcept fedisableexcept)
1270
1271dnl --------- Checks for a C++ linkable fchdir. ---------
1272AC_LANG_SAVE
1273AC_LANG_CPLUSPLUS
1274AC_MSG_CHECKING([fchdir])
1275AC_TRY_COMPILE([#include <unistd.h>],[
1276fchdir(0);
1277],[HAVE_FCHDIR=yes
1278AC_DEFINE(HAVE_FCHDIR, 1, ["have fchdir"])
1279AC_MSG_RESULT(yes)],[
1280AC_MSG_RESULT(no)
1281HAVE_FCHDIR=no
1282])
1283AC_LANG_RESTORE
1284AC_SUBST(HAVE_FCHDIR)
1285
1286dnl --------- Check for ios::fmtflags. ---------
1287
1288AC_LANG_SAVE
1289AC_LANG_CPLUSPLUS
1290AC_MSG_CHECKING([ios::fmtflags])
1291AC_TRY_COMPILE([#include <$iostream>],[
1292$NAMESPACE_STD ios::fmtflags flags;
1293],[HAVE_IOS_FMTFLAGS=yes
1294AC_DEFINE(HAVE_IOS_FMTFLAGS, 1, ["have iostream format flags"])
1295AC_MSG_RESULT(yes)],[
1296AC_MSG_RESULT(no)
1297HAVE_IOS_FMTFLAGS=no
1298])
1299AC_LANG_RESTORE
1300AC_SUBST(HAVE_IOS_FMTFLAGS)
1301
1302dnl --------- check for long long ---------
1303
1304if test X"$LONGLONG" = Xyes; then
1305AC_LANG_SAVE
1306AC_LANG_CPLUSPLUS
1307AC_MSG_CHECKING(long long)
1308AC_TRY_COMPILE([],[
1309long long i;
1310],[AC_DEFINE(HAVE_LONG_LONG, 1, ["have long long"])
1311AC_MSG_RESULT(yes)],[
1312AC_MSG_RESULT(no)
1313])
1314AC_LANG_RESTORE
1315fi
1316
1317dnl --------- Check for sgetn. ---------
1318
1319AC_LANG_SAVE
1320AC_LANG_CPLUSPLUS
1321AC_MSG_CHECKING([sgetn])
1322AC_TRY_COMPILE([#include <$iostream>],[
1323char *c=0;
1324$NAMESPACE_STD streambuf *s=0; s->sgetn(c,0);
1325],[HAVE_SGETN=yes
1326AC_DEFINE(HAVE_SGETN, 1, ["have sgetn"])
1327AC_MSG_RESULT(yes)],[
1328AC_MSG_RESULT(no)
1329HAVE_SGETN=no
1330])
1331AC_LANG_RESTORE
1332AC_SUBST(HAVE_SGETN)
1333
1334dnl --------- Check for pubseekoff. ---------
1335
1336AC_LANG_SAVE
1337AC_LANG_CPLUSPLUS
1338AC_MSG_CHECKING([pubseekoff])
1339AC_TRY_COMPILE([#include <$iostream>],[
1340$NAMESPACE_STD cout.rdbuf()->pubseekoff(0,$NAMESPACE_STD ios::beg,
1341 $NAMESPACE_STD ios::out);
1342],[HAVE_PUBSEEKOFF=yes
1343AC_DEFINE(HAVE_PUBSEEKOFF, 1, ["have pubseekoff"])
1344AC_MSG_RESULT(yes)],[
1345AC_MSG_RESULT(no)
1346HAVE_PUBSEEKOFF=no
1347])
1348AC_LANG_RESTORE
1349AC_SUBST(HAVE_PUBSEEKOFF)
1350
1351dnl --------- Check for seekoff. ---------
1352
1353AC_LANG_SAVE
1354AC_LANG_CPLUSPLUS
1355AC_MSG_CHECKING([seekoff])
1356AC_TRY_COMPILE([#include <$iostream>],[
1357$NAMESPACE_STD cout.rdbuf()->seekoff(0,$NAMESPACE_STD ios::beg,
1358 $NAMESPACE_STD ios::out);
1359],[HAVE_SEEKOFF=yes
1360AC_DEFINE(HAVE_SEEKOFF, 1, ["have seekoff"])
1361AC_MSG_RESULT(yes)],[
1362AC_MSG_RESULT(no)
1363HAVE_SEEKOFF=no
1364])
1365AC_LANG_RESTORE
1366AC_SUBST(HAVE_SEEKOFF)
1367
1368dnl --------- Check for signal handler argument lists. ---------
1369
1370AC_LANG_SAVE
1371AC_LANG_CPLUSPLUS
1372AC_MSG_CHECKING([signal handler needs ellipsis])
1373AC_TRY_LINK([
1374#include <signal.h>
1375extern "C" {
1376 typedef void (*signal_handler)(...);
1377 void handler(int);
1378}
1379void handler(int) {}
1380],[
1381 signal(SIGINT, (signal_handler)handler);
1382],
1383AC_DEFINE(SIGHASELLIP, 1, ["signal handler needs ellipsis"]) AC_MSG_RESULT(yes),
1384AC_MSG_RESULT(no))
1385AC_LANG_RESTORE
1386
1387dnl --------- Checks for rand functions ---------
1388
1389AC_LANG_SAVE
1390AC_LANG_CPLUSPLUS
1391AC_CHECK_FUNCS(drand48)
1392AC_LANG_RESTORE
1393
1394dnl --------- Checks for SYSV IPC. ---------
1395
1396if test "X$SYSVIPC" = Xyes; then
1397 AC_CHECK_FUNCS(shmget semget)
1398 AC_CHECK_HEADERS(sys/ipc.h sys/sem.h sys/shm.h)
1399 AC_MSG_CHECKING([for SYSV IPC])
1400 if test X$ac_cv_func_shmget = Xyes -a \
1401 X$ac_cv_func_semget = Xyes -a \
1402 X$ac_cv_header_sys_ipc_h = Xyes -a \
1403 X$ac_cv_header_sys_sem_h = Xyes -a \
1404 X$ac_cv_header_sys_shm_h = Xyes; then
1405 HAVE_SYSV_IPC=yes
1406 AC_DEFINE(HAVE_SYSV_IPC, 1, ["use SYSVIPC"])
1407 else
1408 HAVE_SYSV_IPC=no
1409 fi
1410 AC_MSG_RESULT($HAVE_SYSV_IPC)
1411 AC_SUBST(HAVE_SYSV_IPC)
1412else
1413 HAVE_SYSV_IPC=no
1414 AC_SUBST(HAVE_SYSV_IPC)
1415fi
1416
1417AC_LANG_SAVE
1418AC_LANG_CPLUSPLUS
1419AC_MSG_CHECKING([if semctl requires semun])
1420AC_TRY_LINK([
1421#include <sys/types.h>
1422#include <sys/ipc.h>
1423#include <sys/sem.h>
1424],[
1425 int val = 0;
1426 semctl(0,0,0,val);
1427],[
1428case $target in
1429 *-sgi-irix*)
1430 AC_DEFINE(SEMCTL_REQUIRES_SEMUN, 1, ["semctl requires semun"]) AC_MSG_RESULT(sgi-irix -- yes)
1431 ;;
1432 *)
1433 AC_MSG_RESULT(no)
1434 ;;
1435esac
1436],
1437AC_DEFINE(SEMCTL_REQUIRES_SEMUN, 1, ["semctl requires semun"]) AC_MSG_RESULT(yes))
1438AC_LANG_RESTORE
1439AC_DEFINE(SHMTYPE, [char *], ["type to use in shared memory"])
1440
1441dnl ----------- See if Fortran works --------------
1442
1443AC_MSG_CHECKING(if fortran compiler works)
1444if test -n "$F77" -a "$F77" != no ; then
1445 /bin/rm -f ffunc.f flink.c
1446 echo " program main" > ffunc.f
1447 echo " end" >> ffunc.f
1448 if $F77 -o ffunc ffunc.f 1>&5 2>&5; then
1449 AC_MSG_RESULT(yes)
1450 else
1451 AC_MSG_RESULT(no)
1452 AC_MSG_FAILURE(fortran compiler does not work)
1453 fi
1454 /bin/rm -f ffunc ffunc.f
1455fi
1456
1457dnl ----------- Fortran symbol names --------------
1458
1459AC_MSG_CHECKING(fortran symbols)
1460if test -n "$F77" -a "$F77" != no ; then
1461 /bin/rm -f ffunc.f flink.c
1462 echo " subroutine ffunc()" > ffunc.f
1463 echo " return" >> ffunc.f
1464 echo " end" >> ffunc.f
1465 $F77 -c ffunc.f 1>/dev/null 2>/dev/null
1466 echo "main(){ FF(); return 0; }" > flink.c
1467 if $CC -o flink -DFF=ffunc flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
1468 AC_MSG_RESULT(same as C)
1469 F77_SYMBOLS=symbol
1470 elif $CC -o flink -DFF=ffunc_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
1471 AC_MSG_RESULT(lowercase with underscore)
1472 F77_SYMBOLS=symbol_
1473 elif $CC -o flink -DFF=FFUNC flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
1474 AC_MSG_RESULT(uppercase)
1475 F77_SYMBOLS=SYMBOL
1476 elif $CC -o flink -DFF=FFUNC_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
1477 AC_MSG_RESULT(uppercase with underscore)
1478 F77_SYMBOLS=SYMBOL_
1479 else
1480 AC_MSG_RESULT(giving up)
1481 AC_MSG_ERROR(could not determine F77 symbol names)
1482 fi
1483 /bin/rm -f ffunc.f ffunc.o flink flink.c flink.o ffunc
1484else
1485 F77_SYMBOLS=symbol_
1486 AC_MSG_RESULT(guessing lowercase with underscore)
1487fi
1488AC_SUBST(F77_SYMBOLS)
1489
1490dnl ----------- check for FORTRAN libraries --------------
1491
1492AC_LANG_SAVE
1493AC_LANG_CPLUSPLUS
1494LIBSSAV="$LIBS"
1495LIBS="$LIBSSAV $FLIBS"
1496
1497LIBBLAS=""
1498F77_DGEMM=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DAXPY`
1499AC_CHECK_FUNC($F77_DGEMM,HAVE_BLAS=yes,[
1500 AC_CHECK_LIB(essl,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lessl"],
1501 AC_CHECK_LIB(blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lblas"])
1502 )]
1503)
1504if test X$HAVE_BLAS != Xyes; then
1505 LIBSSAV2="$LIBS"
1506 LIBS="-latlas $LIBS"
1507 AC_CHECK_LIB(f77blas,$F77_DGEMM,[HAVE_BLAS=yes;LIBBLAS="-lf77blas -latlas"],
1508 LIBS="$LIBSSAV2")
1509fi
1510AC_SUBST(HAVE_BLAS)
1511if test X$HAVE_BLAS != Xyes; then
1512 echo "WARNING: Could not link to the BLAS library. It can be obtained at"
1513 echo "http://www.netlib.org/blas. Use --with-libdirs and/or --with-libs"
1514 echo "to specify the name of the library."
1515 AC_MSG_ERROR([BLAS is required to complete the build])
1516fi
1517
1518LIBS="$LIBSSAV $LIBBLAS $FLIBS"
1519
1520LIBLAPACK=""
1521F77_DGESVD=`$PERL $srcdir/bin/mkf77sym.pl.in -method $F77_SYMBOLS DGESVD`
1522AC_CHECK_FUNC($F77_DGESVD,HAVE_LAPACK=yes,[
1523 AC_CHECK_LIB(lapack,$F77_DGESVD,[HAVE_LAPACK=yes;LIBLAPACK="-llapack"]
1524 )]
1525)
1526AC_SUBST(HAVE_LAPACK)
1527if test X$HAVE_LAPACK != Xyes; then
1528 echo "Could not link to the LAPACK library. It can be obtained at"
1529 echo "http://www.netlib.org/lapack. Use --with-libdirs and/or --with-libs"
1530 echo "to specify the name of the library."
1531 AC_MSG_ERROR([LAPACK is required to complete the build])
1532fi
1533
1534FLIBS="$LIBLAPACK $LIBBLAS $FLIBS"
1535AC_LANG_RESTORE
1536
1537dnl ----------- check for Scalable BLAS library --------------
1538
1539LIBSSAV="$LIBS"
1540LIBS="$LIBS $FLIBS"
1541HAVE_SCALABLE_BLAS=no
1542AC_CHECK_FUNC(sB_init,
1543 HAVE_SCALABLE_BLAS=yes,[
1544 AC_CHECK_LIB(sB_BLAS,sB_init,[
1545 HAVE_SCALABLE_BLAS=yes
1546 LIBSSAV="-lsB_BLAS $LIBSSAV"
1547 ])]
1548)
1549LIBS="$LIBSSAV"
1550if test $HAVE_SCALABLE_BLAS = yes; then
1551 AC_DEFINE(HAVE_SCALABLE_BLAS, 1, ["have scalabale blas"])
1552fi
1553
1554dnl ----------- NIAMA library checks --------------
1555
1556AC_LANG_SAVE
1557AC_LANG_CPLUSPLUS
1558AC_CHECK_PROG(NIAMACFG,niama-config,niama-config)
1559if test X$NIAMACFG != X; then
1560 LIBSSAV="$LIBS"
1561 CPPSAV="$CPPFLAGS"
1562 NIAMALIBS="`niama-config --libs` `niama-config --corbalibs`"
1563 CPPFLAGS="$CPPFLAGS `niama-config --cppflags`"
1564 LIBS="$NIAMALIBS $LIBS"
1565AC_TRY_LINK([
1566#include <niama.h>
1567],[
1568 exit(0);
1569],[
1570 AC_DEFINE(HAVE_NIAMA, 1, ["have NIAMA"])
1571],[
1572 LIBS="$LIBSSAV"
1573 CPPFLAGS="$CPPSAV"
1574]
1575)
1576fi
1577AC_LANG_RESTORE
1578
1579dnl ----------- libint library checks --------------
1580
1581AC_LANG_SAVE
1582AC_LANG_CPLUSPLUS
1583AC_CHECK_HEADERS(libint/libint.h,
1584 AC_CHECK_LIB(int,init_libint_base,
1585 HAVE_LIBINT=yes
1586 AC_DEFINE(HAVE_LIBINT, 1, ["have libint"])
1587 AC_SUBST(HAVE_LIBINT)
1588 LIBS="-lint $LIBS"
1589 )
1590 )
1591AC_LANG_RESTORE
1592
1593dnl ----------- libr12 library checks --------------
1594
1595AC_LANG_SAVE
1596AC_LANG_CPLUSPLUS
1597AC_CHECK_HEADERS(libr12/libr12.h,
1598 AC_CHECK_LIB(r12,init_libr12_base,
1599 HAVE_LIBR12=yes
1600 AC_DEFINE(HAVE_LIBR12, 1, ["have libr12"])
1601 AC_SUBST(HAVE_LIBR12)
1602 LIBS="-lr12 $LIBS"
1603 )
1604 )
1605AC_LANG_RESTORE
1606
1607dnl ----------- libderiv library checks --------------
1608
1609AC_LANG_SAVE
1610AC_LANG_CPLUSPLUS
1611AC_CHECK_HEADERS(libderiv/libderiv.h,
1612 AC_CHECK_LIB(deriv,init_libderiv_base,
1613 HAVE_LIBDERIV=yes
1614 AC_DEFINE(HAVE_LIBDERIV, 1, ["have libderiv"])
1615 AC_SUBST(HAVE_LIBDERIV)
1616 LIBS="-lderiv $LIBS"
1617 )
1618 )
1619AC_LANG_RESTORE
1620
1621dnl ----------- make sure we have everything for cints and mbptr12 ----------
1622
1623if test ! X$HAVE_LIBR12 = Xyes -o ! X$HAVE_LIBINT = Xyes; then
1624 EXCLUDED_DIRS="-x SRC_LIB_CHEMISTRY_QC_CINTS -x SRC_LIB_CHEMISTRY_QC_MBPTR12 $EXCLUDED_DIRS"
1625fi
1626
1627dnl --------- Template instantiation. ---------
1628
1629if test $template_instantiation = auto; then
1630AC_MSG_CHECKING(choosing template instantiation method)
1631 if test X$GXX = Xyes; then
1632 AC_MSG_RESULT("gcc (none)")
1633 else
1634 case $target in
1635 *-sgi-irix6.0*)
1636 AC_MSG_RESULT("*-sgi-irix6.0* (none)")
1637 ;;
1638 *-sgi-irix*)
1639 template_instantiation=ptused
1640 AC_MSG_RESULT("*-sgi-irix* (ptused)")
1641 ;;
1642 *-cray-unicos*)
1643 template_instantiation=craysimp
1644 AC_MSG_RESULT("*-cray-unicos* (craysimp)")
1645 ;;
1646 *-dec-osf*)
1647 template_instantiation=repodir
1648 AC_MSG_RESULT("*-dec-osf* (repodir)")
1649 ;;
1650 alpha*)
1651 template_instantiation=repodir
1652 AC_MSG_RESULT("alpha* non-GNU C++ (repodir)")
1653 ;;
1654 *-solaris*)
1655 template_instantiation=sunexpl
1656 AC_MSG_RESULT("*-solaris* (sunexpl)")
1657 ;;
1658 *)
1659 AC_MSG_RESULT("generic non GNU (none)")
1660 ;;
1661 esac
1662 fi
1663fi
1664
1665if test $template_instantiation = auto; then
1666 template_instantiation=none
1667fi
1668
1669AC_MSG_CHECKING(template instantiation flags)
1670TMPLINST=no
1671TMPLREPO=
1672TMPLINLIB=no
1673case $template_instantiation in
1674 repodir)
1675 TMPLREPO=cxx_repository
1676 TMPLINLIB=yes
1677 ;;
1678 craysimp)
1679 CXXFLAGS="$CXXFLAGS -h simple_templates"
1680 ;;
1681 gnurepo)
1682 TMPLINST=yes
1683 CXXFLAGS="$CXXFLAGS -frepo"
1684 AC_MSG_RESULT(gnurepo)
1685 ;;
1686 gnuexpl)
1687 # automatic template instantiation causes problems with libstc++-v3
1688 CXXFLAGS="$CXXFLAGS -fno-implicit-templates"
1689 EXPLICIT_TEMPLATE_INSTANTIATION=yes
1690 AC_DEFINE(EXPLICIT_TEMPLATE_INSTANTIATION, 1, ["template instantiation flags"])
1691 ;;
1692 sunexpl)
1693 CXXFLAGS="$CXXFLAGS -instances=explicit"
1694 AC_DEFINE(EXPLICIT_TEMPLATE_INSTANTIATION, 1, ["template instantiation flags"])
1695 ;;
1696 ptused)
1697 CXXFLAGS="$CXXFLAGS -ptused"
1698 ;;
1699 none)
1700 AC_MSG_RESULT(none)
1701 ;;
1702 *)
1703 AC_MSG_RESULT($template_instantiation)
1704 AC_MSG_ERROR(unknown template instantiation method)
1705esac
1706
1707AC_SUBST(TMPLINST)
1708AC_SUBST(TMPLREPO)
1709AC_SUBST(TMPLINLIB)
1710
1711dnl --------- Checks that must be done last. ---------
1712
1713AC_MSG_CHECKING([for special flags that must be set last])
1714case $target in
1715 i860-intel-puma*)
1716 LDFLAGS="$LDFLAGS -mpuma -mnoieee"
1717 AC_MSG_RESULT(paragon puma)
1718 ;;
1719 i686-intel-cougar*)
1720 LDFLAGS="$LDFLAGS -mcougar -mnoieee"
1721 AC_MSG_RESULT(teraflop cougar)
1722 ;;
1723 i860-intel-sunmos*)
1724 LDFLAGS="$LDFLAGS -msunmos -mnoieee"
1725 AC_MSG_RESULT(paragon sunmos)
1726 ;;
1727 i860-intel-osf*)
1728 LDFLAGS="$LDFLAGS -mnx -mnoieee"
1729 AC_MSG_RESULT(osf paragon)
1730 ;;
1731 *)
1732 AC_MSG_RESULT(none)
1733 ;;
1734esac
1735
1736dnl --------- Shared library configuration. ---------
1737
1738enablelibtool=yes
1739AC_ARG_ENABLE(libtool,
1740[ --disable-libtool Do not use libtool.],
1741[
1742case $enableval in
1743 yes)
1744 ;;
1745 no)
1746 enablelibtool=no
1747 ;;
1748 *)
1749 AC_MSG_ERROR([Invalid value for --(dis|en)able-libtool ($enableval)])
1750 ;;
1751esac
1752])
1753
1754if test "$enablelibtool" = yes; then
1755
1756dnl by default make only static libraries
1757AC_DISABLE_SHARED
1758AC_PROG_LIBTOOL
1759
1760OBJSUF=lo
1761LIBSUF=la
1762
1763else
1764
1765enable_shared=no
1766
1767fi
1768
1769if test "$enable_shared" = "no"; then
1770 OBJSUF=o
1771 LIBSUF=a
1772fi
1773
1774ENABLESHARED=$enable_shared
1775AC_SUBST(ENABLESHARED)
1776
1777dnl --------- CCA component configuration ---------
1778
1779if test $components == "yes"; then
1780
1781 if test $HAVE_MPI == "yes" &&
1782 test $HAVE_MPIPP == "no"; then
1783 AC_MSG_ERROR([libmpi++ needed for mpi cca components])
1784 fi
1785
1786 if test -z $CCA_CHEM_CONFIG && ! test -x $CCA_CHEM_CONFIG; then
1787 AC_MSG_ERROR([cca-chem-config is required to build CCA component code])
1788 fi
1789
1790 CCA_CHEM_INCLUDE=`$CCA_CHEM_CONFIG --includedir`
1791 CCA_CHEM_LIB=`$CCA_CHEM_CONFIG --libdir`
1792 CCA_CHEM_PREFIX=`$CCA_CHEM_CONFIG --prefix`
1793 CCA_CHEM_REPO=$CCA_CHEM_PREFIX/repo
1794 AC_SUBST(CCA_CHEM_INCLUDE)
1795 AC_SUBST(CCA_CHEM_LIB)
1796 AC_SUBST(CCA_CHEM_REPO)
1797
1798 CCAFE_CONFIG=`$CCA_CHEM_CONFIG --ccafe-config`
1799 ENABLE_PYTHON="no" # no need for python checks
1800 AC_CHECK_CCA()
1801
1802 LIBS="-L$CCAFE_LIB $LIBS"
1803 CCA_CHEM_INCLUDE=-I$CCA_CHEM_INCLUDE
1804 BABEL_INCLUDE=-I$BABEL_INCLUDE
1805 CCA_SPEC_BABEL_INCLUDE=-I$CCA_SPEC_BABEL_INCLUDE
1806 CCAFE_INCLUDE="-I$CCAFE_INCLUDE -I$CCAFE_INCLUDE/dc/babel/babel-cca/server"
1807 CPPFLAGS="$CPPFLAGS $BABEL_INCLUDE $CCA_SPEC_BABEL_INCLUDE $CCA_CHEM_INCLUDE $CCAFE_INCLUDE"
1808
1809 AC_CHECK_HEADER(sidl.h,
1810 AC_DEFINE(HAVE_SIDL_HEADERS, 1, ["have sidl"]),
1811 AC_MSG_ERROR([problem with babel headers]) )
1812 AC_CHECK_HEADER(gov_cca_IOR.h,
1813 AC_DEFINE(HAVE_CCA_SPEC_BABEL_HEADERS, 1, ["have CCA spec babel headers"]),
1814 AC_MSG_ERROR([problem with cca-spec-babel headers]) )
1815 AC_CHECK_HEADER(Chemistry_QC_Model_IOR.h,
1816 AC_DEFINE(HAVE_CCA_CHEM_HEADERS, 1, ["have CCA chem headers"]),
1817 AC_MSG_ERROR([problem with cca-chem-generic headers]) )
1818
1819else
1820 EXCLUDED_DIRS="-x LIB_CCA -x SRC_LIB_CHEMISTRY_CCA -x SRC_LIB_CHEMISTRY_QC_INTCCA $EXCLUDED_DIRS"
1821fi
1822
1823dnl --------- Find the list of all sc libraries. ---------
1824
1825SCLIBS=`$PERL $srcdir/bin/listlibs.pl -I$srcdir/src/lib -DLIBSUF=$LIBSUF $srcdir/src/lib`
1826AC_SUBST(SCLIBS)
1827
1828dnl --------- Define the library directory macros. ---------
1829
1830if test "$enableproduction" = "no"; then
1831AC_DEFINE_DIR(SRC_SCLIBDIR, srcdir/lib, ["source SC libdir"])
1832fi
1833AC_DEFINE_DIR(INSTALLED_SCLIBDIR, prefix/lib, ["install SC libdir"])
1834AC_DEFINE_DIR(SCDATADIR, scdatadir, ["SC data dir"])
1835
1836dnl --------- Create the stub Makefiles. ---------
1837
1838$PERL $srcdir/bin/objectdir.pl $EXCLUDED_DIRS $srcdir
1839
1840AC_OUTPUT(lib/LocalMakefile lib/cca/components.cca bin/sc-config bin/mkf77sym.pl src/bin/mpqc/mpqcrun src/bin/mpqc/ccarun src/bin/mpqc/validate/makeccain.pl doc/doxygen.cfg doc/doxygen.man1.cfg doc/doxygen.man3.cfg)
1841chmod +x bin/sc-config
1842chmod +x src/bin/mpqc/mpqcrun
1843chmod +x src/bin/mpqc/ccarun
1844chmod +x src/bin/mpqc/validate/makeccain.pl
Note: See TracBrowser for help on using the repository browser.