~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Definitions
2
 
#define([psi],[Psi])
3
 
define([psi_mmm_version],[3.2.3])
4
 
define([psi_buildid],[stable])
5
 
define([psi_so_version],[1:0:0])
6
 
define([psi_email],[psicode@users.sourceforge.net])
7
 
 
8
 
# Process this file with autoconf to produce a configure script.
9
 
define([AC_CACHE_LOAD], )dnl for debugging configure.in
10
 
define([AC_CACHE_SAVE], )dnl for debugging configure.in
11
 
AC_PREREQ(2.52)
12
 
AC_INIT(psi,psi_mmm_version,psi_email)
13
 
AC_CONFIG_SRCDIR(aclocal.m4)
14
 
AC_CONFIG_HEADER(include/psiconfig.h)
15
 
AC_SET_MAKE
16
 
 
17
 
# Make srcdir an absolute path
18
 
srcdir=`(cd $srcdir; pwd)`
19
 
 
20
 
# That's where extra scripts necessary for configuration (config.guess, etc.) are located
21
 
AC_CONFIG_AUX_DIR(bin)
22
 
 
23
 
# Set up the default paths.
24
 
AC_PREFIX_DEFAULT(/usr/local/psi)
25
 
 
26
 
incdir=$includedir
27
 
docdir='$(prefix)/doc'
28
 
mandir='$(docdir)/man'
29
 
txtdir='$(docdir)/txt'
30
 
htmldir='$(docdir)/html'
31
 
dvidir='$(docdir)/dvi'
32
 
 
33
 
# To make a "make all" at the top level work before the utilities
34
 
# and include files are installed, the include files
35
 
# will be put into an objincdir and the utilities will be accessed
36
 
# from src/util in the object directory.
37
 
 
38
 
objincdir='$(top_objdir)/include'
39
 
AC_SUBST(objincdir)
40
 
 
41
 
AC_SUBST(bindir)
42
 
AC_SUBST(libdir)
43
 
AC_SUBST(docdir)
44
 
AC_SUBST(mandir)
45
 
AC_SUBST(htmldir)
46
 
AC_SUBST(dvidir)
47
 
AC_SUBST(txtdir)
48
 
AC_SUBST(datadir)
49
 
AC_SUBST(incdir)
50
 
AC_SUBST(top_objdir)
51
 
 
52
 
PSI_MMM_VERSION=psi_mmm_version
53
 
PSI_BUILDID=psi_buildid
54
 
AC_SUBST(PSI_MMM_VERSION)
55
 
AC_SUBST(PSI_BUILDID)
56
 
 
57
 
# get the target
58
 
AC_CANONICAL_TARGET
59
 
cpu=$target_cpu
60
 
vendor=$target_vendor
61
 
os=$target_os
62
 
AC_SUBST(target)
63
 
 
64
 
 
65
 
#########################################
66
 
#
67
 
# Package-specific arguments and checks
68
 
#
69
 
#########################################
70
 
 
71
 
LIBINT_NEW_AM=8
72
 
LIBINT_OPT_AM=4
73
 
AC_ARG_WITH(max-am-eri,[  --with-max-am-eri       Maximum ERI AM],[ 
74
 
    LIBINT_NEW_AM=$((2*($withval)))
75
 
    LIBINT_OPT_AM=$(($withval))
76
 
])
77
 
AC_SUBST(LIBINT_NEW_AM,$LIBINT_NEW_AM)
78
 
AC_SUBST(LIBINT_OPT_AM,$LIBINT_OPT_AM)
79
 
 
80
 
LIBDERIV_NEW_AM1=6
81
 
AC_ARG_WITH(max-am-deriv1,[  --with-max-am-deriv1    Maximum deriv1 ERI AM],[
82
 
    LIBDERIV_NEW_AM1=$((2*($withval)))
83
 
])
84
 
AC_SUBST(LIBDERIV_NEW_AM1)
85
 
LIBDERIV_NEW_AM2=4
86
 
AC_ARG_WITH(max-am-deriv2,[  --with-max-am-deriv2    Maximum deriv2 ERI AM],[
87
 
    LIBDERIV_NEW_AM2=$((2*($withval)))
88
 
])
89
 
AC_SUBST(LIBDERIV_NEW_AM2)
90
 
 
91
 
LIBR12_NEW_AM=6
92
 
LIBR12_OPT_AM=6
93
 
AC_ARG_WITH(max-am-r12,[  --with-max-am-r12       Maximum R12 AM],[
94
 
    LIBR12_NEW_AM=$((2*($withval)))
95
 
    LIBR12_OPT_AM=$((2*($withval)))
96
 
])
97
 
AC_SUBST(LIBR12_NEW_AM)
98
 
AC_SUBST(LIBR12_OPT_AM)
99
 
 
100
 
######################
101
 
#
102
 
# Check for programs
103
 
#
104
 
######################
105
 
 
106
 
# potential names of compilers
107
 
FC_LIST="g77 f77 fc f2c"
108
 
CC_LIST="gcc cc"
109
 
CXX_LIST="g++ c++ cxx"
110
 
 
111
 
# set up os specific options
112
 
case $os in
113
 
  aix*)
114
 
    FC_LIST="xlf_r $FC_LIST"
115
 
    CC_LIST="cc_r gcc"
116
 
    CXX_LIST="xlC_r g++ c++"
117
 
    ;;
118
 
  irix*)
119
 
    FC_LIST="f77 $FC_LIST"
120
 
    CC_LIST="cc gcc"
121
 
    CXX_LIST="CC g++ c++"
122
 
    ;;
123
 
esac
124
 
 
125
 
AC_ARG_WITH(cc,[  --with-cc               which cc command to use],[
126
 
case $withval in
127
 
  yes)
128
 
    CC='cc'
129
 
    ;;
130
 
  no)
131
 
    CC=''
132
 
    ;;
133
 
  *)
134
 
    CC=$withval
135
 
    ;;
136
 
esac
137
 
])
138
 
 
139
 
AC_ARG_WITH(cxx,[  --with-cxx              which cxx command to use],[
140
 
case $withval in
141
 
  yes)
142
 
    CXX='c++'
143
 
    ;;
144
 
  no)
145
 
    CXX=''
146
 
    ;;
147
 
  *)
148
 
    CXX=$withval
149
 
    ;;
150
 
esac
151
 
])
152
 
 
153
 
AC_ARG_WITH(fc,[  --with-fc               which fortran compiler to use],[
154
 
case $withval in
155
 
  yes)
156
 
    FC='fc'
157
 
    ;;
158
 
  no)
159
 
    FC=''
160
 
    ;;
161
 
  *)
162
 
    FC=$withval
163
 
    ;;
164
 
esac
165
 
])
166
 
 
167
 
AC_ARG_WITH(ranlib,
168
 
[  --with-ranlib           Gives the name of the ranlib program.],
169
 
RANLIB=$withval
170
 
)
171
 
 
172
 
AC_CHECK_PROGS(AR,ar,ar)
173
 
AC_ARG_WITH(ar,
174
 
[  --with-ar               Names the archive creator.],
175
 
AR=$withval
176
 
)
177
 
AC_SUBST(AR)
178
 
 
179
 
ARFLAGS=r
180
 
AC_ARG_WITH(ar-flags,
181
 
[  --with-ar-flags         Flags for the the archive creator.],
182
 
ARFLAGS=$withval
183
 
)
184
 
# set up os specific archiver options
185
 
case $os in
186
 
  aix*)
187
 
    ARFLAGS="-X32_64 $ARFLAGS"
188
 
    ;;
189
 
esac
190
 
AC_SUBST(ARFLAGS)
191
 
 
192
 
AC_ARG_WITH(ld,
193
 
[  --with-ld               Names the object linker.],
194
 
LD=$withval
195
 
)
196
 
AC_SUBST(LD)
197
 
 
198
 
EXTRAINCDIRS=
199
 
CPPFLAGS=
200
 
AC_ARG_WITH(incdirs,
201
 
[  --with-incdirs          Specifies include directories (-Idir1 -Idir2).],
202
 
EXTRAINCDIRS=$withval
203
 
CPPFLAGS=$withval
204
 
echo Using extra include directories: $withval
205
 
)
206
 
 
207
 
AC_ARG_WITH(libs,
208
 
[  --with-libs             Specifies libraries (-llib1 -llib2).],
209
 
LDLIBS=$withval
210
 
echo Using extra libraries: $withval
211
 
)
212
 
AC_SUBST(LDLIBS)
213
 
 
214
 
LDFLAGS=
215
 
LIBDIRS=
216
 
AC_ARG_WITH(libdirs,
217
 
[  --with-libdirs          Specifies library directories (-Ldir1 -Ldir2).],
218
 
LIBDIRS=$withval
219
 
LDFLAGS=$withval
220
 
echo Using extra library directories: $withval
221
 
)
222
 
 
223
 
AC_PATH_PROG(PERL, perl, , $PATH:/usr/bin:/usr/local/bin)
224
 
AC_ARG_WITH(perl,
225
 
[  --with-perl             Names the Perl interpreter.],
226
 
PERL=$withval
227
 
)
228
 
AC_SUBST(PERL)
229
 
 
230
 
# Find out which compilers are available.
231
 
if test -z "$FC"; then
232
 
  AC_PROGRAMS_CHECK(FC,$FC_LIST,f77)
233
 
fi
234
 
 
235
 
F77=$FC
236
 
 
237
 
if test -z "$CC"; then
238
 
  AC_PROGRAMS_CHECK(CC,$CC_LIST,cc)
239
 
fi
240
 
 
241
 
if test -z "$CXX"; then
242
 
  AC_PROGRAMS_CHECK(CXX,$CXX_LIST,c++)
243
 
fi
244
 
 
245
 
# Figure out libraries needed to link Fortran programs in C ..
246
 
AC_F77_LIBRARY_LDFLAGS
247
 
# .. and check if they work
248
 
AC_CHECK_LIB(c,exit,[],[
249
 
FLIBS=
250
 
AC_MSG_WARN([F77 libraries don't seem to link with C programs])
251
 
],$FLIBS)
252
 
 
253
 
# Get info on the utility programs.
254
 
AC_PROG_CPP()
255
 
AC_PROG_CXXCPP()
256
 
AC_PROG_YACC()
257
 
AC_PROG_RANLIB()
258
 
if test "X$RANLIB" = "Xfalse"; then
259
 
  RANLIB=":"
260
 
fi
261
 
AC_PROG_INSTALL()
262
 
AC_PROG_LN_S()
263
 
INSTALL_INCLUDE='$(top_srcdir)/bin/installinc.sh' AC_SUBST(INSTALL_INCLUDE)
264
 
MKDIRS='$(top_srcdir)/bin/mkdirs.sh' AC_SUBST(MKDIRS)
265
 
 
266
 
# check if some of the programs are missing
267
 
if test "X$PERL" = "X"; then
268
 
  AC_MSG_ERROR([Could not find the program perl. It can be obtained at www.gnu.org])
269
 
fi
270
 
 
271
 
# Under AIX we use lex rather than flex -- the latter didn't work well in 64-bit
272
 
# environment (as of 1998)
273
 
if echo $os | grep aix >/dev/null 2>&1; then
274
 
    test -z "$LEX" && AC_PATH_PROG(LEX,lex) AC_SUBST(LEX)
275
 
    test -z "$LEXLIB" && LEXLIB=`echo $LEX|sed "s bin/lex.* lib/libl.a "`
276
 
    if test -n "$LEXLIB" && test -f "$LEXLIB"; then
277
 
      test -n "$verbose" && echo "setting LEXLIB to $LEXLIB"
278
 
    fi
279
 
else
280
 
    AC_PROG_LEX()
281
 
fi
282
 
 
283
 
# If we got flex but didn't get LEXLIB try to find LEXLIB
284
 
case "$LEX" in
285
 
  flex*)
286
 
    if test -z "$LEXLIB"; then
287
 
      AC_PROGRAM_PATH(FLEXPATH,flex)
288
 
      FLEXLIBPATH=`echo $FLEXPATH|sed "s bin/flex.* lib/libfl.a "`
289
 
      if test -n "$FLEXLIBPATH" && test -f "$FLEXLIBPATH"; then
290
 
        LEXLIB=$FLEXLIBPATH
291
 
        test -n "$verbose" && echo "setting LEXLIB to $LEXLIB"
292
 
      fi
293
 
    fi
294
 
  ;;
295
 
  *)
296
 
  ;;
297
 
esac
298
 
 
299
 
# Figure out the suffix used for fortran for files (as $(FC) needs
300
 
# them--not F since that is psipp's input suffix).
301
 
test -z "$F77SUF" && F77SUF=f AC_SUBST(F77SUF)
302
 
 
303
 
# Figure out the library suffix.
304
 
test -z "$LIBSUF" && LIBSUF=a AC_SUBST(LIBSUF)
305
 
 
306
 
# Figure out the object file suffix.
307
 
test -z "$OBJSUF" && OBJSUF=o AC_SUBST(OBJSUF)
308
 
 
309
 
# See if the C compiler can do dependency checking.
310
 
AC_CC_PROCESS_CHECK(C dependency processing,[
311
 
#include "nosuchincludefile.h"
312
 
],-M,CCDEPEND='$(CC) -M'; DODEPEND=yes,CCDEPEND=":"; DODEPEND=no)
313
 
AC_SUBST(CCDEPEND)
314
 
AC_SUBST(DODEPEND)
315
 
AC_MSG_RESULT(CCDEPEND is $CCDEPEND)
316
 
AC_MSG_RESULT(DODEPEND is $DODEPEND)
317
 
 
318
 
# find the c libraries
319
 
AC_CHECK_LIB(m,exit,CLIBS="$CLIBS -lm")
320
 
AC_CHECK_LIB(bsd,exit,CLIBS="$CLIBS -lbsd")
321
 
AC_MSG_RESULT(c libs: $CLIBS)
322
 
 
323
 
AC_SUBST(CLIBS)
324
 
 
325
 
# some c libraries are also c++ libraries
326
 
AC_CHECK_LIB(m,exit,CXXLIBS="$CXXLIBS -lm")
327
 
AC_MSG_RESULT(c++ libs: $CXXLIBS)
328
 
 
329
 
AC_SUBST(CXXLIBS)
330
 
 
331
 
# find BLAS and LAPACK libraries
332
 
AC_LANG_PUSH(Fortran 77)
333
 
AC_ARG_WITH(blas,[  --with-blas             which blas library to use],[
334
 
case $withval in
335
 
  yes)
336
 
    BLAS='-lblas'
337
 
    ;;
338
 
  no)
339
 
    BLAS=''
340
 
    ;;
341
 
  *)
342
 
    BLAS=$withval
343
 
    ;;
344
 
esac
345
 
])
346
 
if test "X$BLAS" = X; then
347
 
  AC_CHECK_LIB(essl, DGEMM, BLAS="-lessl")
348
 
fi
349
 
if test "X$BLAS" = X; then
350
 
  AC_CHECK_LIB(scs, DGEMM, BLAS="-lscs")
351
 
fi
352
 
if test "X$BLAS" = X; then
353
 
  AC_CHECK_LIB(atlas, DGEMM, BLAS="-latlas")
354
 
fi
355
 
if test "X$BLAS" = X; then
356
 
  AC_CHECK_LIB(blas, DGEMM, BLAS="-lblas")
357
 
fi
358
 
if test "X$BLAS" = X; then
359
 
 AC_MSG_ERROR("Did not find a BLAS library")
360
 
fi
361
 
AC_SUBST(BLAS)
362
 
 
363
 
AC_ARG_WITH(lapack,[  --with-lapack           which lapack library to use],[
364
 
case $withval in
365
 
  yes)
366
 
    LAPACK='-llapack'
367
 
    ;;
368
 
  no)
369
 
    LAPACK=''
370
 
    ;;
371
 
  *)
372
 
    LAPACK=" $withval"
373
 
    ;;
374
 
esac
375
 
])
376
 
# first test if BLAS-containing library contains LAPACK as well
377
 
if test "X$LAPACK" = X; then
378
 
  CURRENT_LIBS=$LIBS
379
 
  LIBS="$BLAS $LIBS"
380
 
  AC_MSG_CHECKING(whether BLAS library contains LAPACK)
381
 
  AC_TRY_LINK_FUNC(DGEEV,[LAPACK=" ";AC_MSG_RESULT(yes)],AC_MSG_RESULT(no))
382
 
  LIBS=$CURRENT_LIBS
383
 
fi
384
 
if test "X$LAPACK" = X; then
385
 
  AC_CHECK_LIB(lapack,DGEEV, LAPACK="-llapack",,$BLAS)
386
 
fi
387
 
if test "X$LAPACK" = X; then
388
 
 AC_MSG_ERROR("Did not find a LAPACK library")
389
 
fi
390
 
AC_SUBST(LAPACK)
391
 
AC_LANG_POP(Fortran 77)
392
 
 
393
 
############################################################################
394
 
# Set up compiler flags:
395
 
#
396
 
# FDBG   Fortran debug flags.
397
 
# FOPT   Fortran opt flags.
398
 
# FDEF   Fortran defines (for psipp).
399
 
# FINC   Fortran include directories (for psipp).
400
 
# FOTH   Other fortran flags.
401
 
# CDBG   C debug flags.
402
 
# COPT   C opt flags.
403
 
# CDEF   C defines.
404
 
# COTH   Other C flags.
405
 
# CINC   C include directories (with -I in front).
406
 
# CXXDBG C++ debug flags.
407
 
# CXXOPT C++ opt flags.
408
 
# CXXDEF C++ defines.
409
 
# CXXOTH Other C++ flags.
410
 
# CXXINC C++ include directories (with -I in front).
411
 
 
412
 
PSICPPFLAGS='-I. -I$(objincdir) -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I$(top_objdir)/src/lib' AC_SUBST(PSICPPFLAGS)
413
 
FDBG='-g' AC_SUBST(FDBG)
414
 
FOPT='-O' AC_SUBST(FOPT)
415
 
FDEF='' AC_SUBST(FDEF)
416
 
FOTH='' AC_SUBST(FOTH)
417
 
FSTATIC='' AC_SUBST(FSTATIC)
418
 
FINC='$(CPPFLAGS) $(PSICPPFLAGS)' AC_SUBST(FINC)
419
 
CDBG='-g' AC_SUBST(CDBG)
420
 
COPT='-O2' AC_SUBST(COPT)
421
 
CDEF='' AC_SUBST(CDEF)
422
 
COTH='' AC_SUBST(COTH)
423
 
CINC='$(CPPFLAGS) $(PSICPPFLAGS)' AC_SUBST(CINC)
424
 
CXXDBG='-g' AC_SUBST(CXXDBG)
425
 
CXXOPT='-O2' AC_SUBST(CXXOPT)
426
 
CXXDEF='' AC_SUBST(CXXDEF)
427
 
CXXOTH='' AC_SUBST(CXXOTH)
428
 
CXXINC='$(CPPFLAGS) $(PSICPPFLAGS)' AC_SUBST(CXXINC)
429
 
 
430
 
#check for const
431
 
AC_C_CONST()
432
 
 
433
 
# check for header files
434
 
AC_HAVE_HEADERS(errno.h fcntl.h unistd.h stdint.h sys/types.h sys/times.h sys/param.h)
435
 
 
436
 
# check for C++ headers
437
 
AC_CXX_PROCESS_CHECK([cmath],[#include <cmath>],,[HAVE_CMATH=1],[HAVE_CMATH=0]) CXXDEF="$CXXDEF -DHAVE_CMATH=$HAVE_CMATH"
438
 
AC_CXX_PROCESS_CHECK([cstdio],[#include <cstdio>],,[HAVE_CSTDIO=1],[HAVE_CSTDIO=0]) CXXDEF="$CXXDEF -DHAVE_CSTDIO=$HAVE_CSTDIO"
439
 
AC_CXX_PROCESS_CHECK([cstdlib],[#include <cstdlib>],,[HAVE_CSTDLIB=1],[HAVE_CSTDLIB=0]) CXXDEF="$CXXDEF -DHAVE_CSTDLIB=$HAVE_CSTDLIB"
440
 
AC_CXX_PROCESS_CHECK([cstring],[#include <cstring>],,[HAVE_CSTRING=1],[HAVE_CSTRING=0]) CXXDEF="$CXXDEF -DHAVE_CSTRING=$HAVE_CSTRING"
441
 
AC_CXX_PROCESS_CHECK([cstddef],[#include <cstddef>],,[HAVE_CSTDDEF=1],[HAVE_CSTDDEF=0]) CXXDEF="$CXXDEF -DHAVE_CSTDDEF=$HAVE_CSTDDEF"
442
 
 
443
 
/bin/rm -f a.out
444
 
 
445
 
#check to see if void* is allowed
446
 
AC_MSG_CHECKING(for void pointers)
447
 
psi_ac_voidptr=yes
448
 
AC_TRY_COMPILE(,[
449
 
;}
450
 
void *func(void*ptr) { return ptr;
451
 
],,psi_ac_voidptr=no)
452
 
AC_MSG_RESULT($psi_ac_voidptr)
453
 
if test $psi_ac_voidptr = "no"; then
454
 
  CDEF="$CDEF -DNO_VOID_PTR"
455
 
fi
456
 
 
457
 
AC_CHECK_DECLS([putenv],[extradef="-DHAVE_DECL_PUTENV=1"])
458
 
CDEF="$CDEF $extradef"
459
 
CXXDEF="$CXXDEF $extradef"
460
 
AC_CHECK_FUNC(putenv,[extradef="-DHAVE_PUTENV=1"])
461
 
CDEF="$CDEF $extradef"
462
 
CXXDEF="$CXXDEF $extradef"
463
 
 
464
 
AC_CHECK_DECLS([setenv],[extradef="-DHAVE_DECL_SETENV=1"])
465
 
CDEF="$CDEF $extradef"
466
 
CXXDEF="$CXXDEF $extradef"
467
 
AC_CHECK_FUNC(setenv,[extradef="-DHAVE_SETENV=1"])
468
 
CDEF="$CDEF $extradef"
469
 
CXXDEF="$CXXDEF $extradef"
470
 
 
471
 
AC_CHECK_LIB(m,isinf,[extradef="-DHAVE_FUNC_ISINF=1"],[extradef=""])
472
 
if test X$extradef = X; then
473
 
  AC_CHECK_LIB(m,finite,[extradef="-DHAVE_FUNC_FINITE=1"],[extradef=""])
474
 
fi
475
 
if test X$extradef = X; then
476
 
  AC_ERROR([Did not find isinf() or finite() functions.])
477
 
else
478
 
  CDEF="$CDEF $extradef"
479
 
  CXXDEF="$CXXDEF $extradef"
480
 
fi
481
 
 
482
 
# set up cpu specific flags
483
 
AC_MSG_CHECKING([for architecture/compiler specific optimization flags])
484
 
case $cpu in
485
 
  rs6000)
486
 
    if test "$FC" = xlf_r ; then
487
 
      FOPT="-O2 -qarch=com -qxflag=xalias -qdpc -qfloat=fold -qfloat=maf -qmaxmem=-1"
488
 
    fi
489
 
    if test "$CC" = xlc_r -o "$CC" = cc_r ; then
490
 
      COPT="-O2 -qarch=com -qfloat=maf -qfloat=fold -qmaxmem=-1"
491
 
    fi
492
 
    if test "$CXX" = xlC_r ; then
493
 
      CXXOPT="-O2 -qarch=com -qfloat=maf -qfloat=fold -qmaxmem=-1"
494
 
    fi
495
 
    ;;
496
 
  powerpc)
497
 
    if test "$FC" = xlf_r ; then
498
 
      FOPT="-O2 -qarch=ppc -qxflag=xalias -qdpc -qfloat=fold -qmaxmem=-1 -qfloat=maf"
499
 
    fi
500
 
    if test "$CC" = xlc_r -o "$CC" = cc_r ; then
501
 
      COPT="-O2 -qarch=ppc -qfloat=maf -qfloat=fold -qmaxmem=-1"
502
 
    fi
503
 
    if test "$CXX" = xlC_r ; then
504
 
      CXXOPT="-O2 -qarch=ppc -qfloat=maf -qfloat=fold -qmaxmem=-1"
505
 
    fi
506
 
    ;;
507
 
  i686)
508
 
    if test "$FC" = g77 ; then
509
 
      FOPT="-O2 -march=pentiumpro"
510
 
    fi
511
 
    if test "$CC" = gcc -o "$CC" = cc ; then
512
 
      COPT="-O2 -march=pentiumpro"
513
 
    fi
514
 
    if test "$CXX" = g++ -o "$CXX" = c++ -o "$CXX" = gcc ; then
515
 
      CXXOPT="-O2 -march=pentiumpro"
516
 
    fi
517
 
    ;;
518
 
esac
519
 
AC_MSG_RESULT([C optimization flags: $COPT])
520
 
AC_MSG_RESULT([C++ optimization flags: $CXXOPT])
521
 
 
522
 
# OS specific flags
523
 
AC_MSG_CHECKING([for OS specific flags])
524
 
case $os in
525
 
  aix*)
526
 
# _ALL_SOURCE is required because some include files on AIX don't seem to work with pure POSIX
527
 
    EXTRADEFS="-DAIX -D_LARGE_FILES -D_ALL_SOURCE"
528
 
    FDEF="$FDEF $EXTRADEFS"
529
 
    CDEF="$CDEF $EXTRADEFS"
530
 
    CXXDEF="$CXXDEF $EXTRADEFS"
531
 
    ;;
532
 
  linux*)
533
 
    EXTRADEFS="-DLinux -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
534
 
    FDEF="$FDEF $EXTRADEFS"
535
 
    CDEF="$CDEF $EXTRADEFS"
536
 
    CXXDEF="$CXXDEF $EXTRADEFS"
537
 
    ;;
538
 
esac
539
 
AC_MSG_RESULT([C preprocessor directives: $CDEF])
540
 
AC_MSG_RESULT([C++ preprocessor directives: $CXXDEF])
541
 
 
542
 
# Set up CFLAGS and FFLAGS.
543
 
 
544
 
CFLAGS='$(CDBG) $(COPT) $(CDEF) $(COTH) $(CINC)' AC_SUBST(CFLAGS)
545
 
CXXFLAGS='$(CXXDBG) $(CXXOPT) $(CXXDEF) $(CXXOTH) $(CXXINC)' AC_SUBST(CXXFLAGS)
546
 
FFLAGS='$(FDBG) $(FOPT) $(FOTH) $(FSTATIC)' AC_SUBST(FFLAGS)
547
 
 
548
 
# Adjust the debug flags.
549
 
# The default is to not debug.  --with-debug will turn on debugging.
550
 
AC_ARG_WITH(debug,[  --with-debug            will turn on debugging],[
551
 
case $withval in
552
 
  yes)
553
 
    ;;
554
 
  no)
555
 
    CDBG=''
556
 
    CXXDBG=''
557
 
    FDBG=''
558
 
    ;;
559
 
  *)
560
 
    CDBG="$withval"
561
 
    CXXDBG="$withval"
562
 
    FDBG="$withval"
563
 
    ;;
564
 
esac
565
 
],CDBG='' CXXDBG='' FDBG='')
566
 
 
567
 
# Adjust the optimize flags.
568
 
# The default is to optimize.  --with-opt=no or --without-opt will turn
569
 
# off optimization.
570
 
AC_ARG_WITH(opt,[  --with-opt              --with-opt=no will turn off optimization],[
571
 
case $withval in
572
 
  yes)
573
 
    ;;
574
 
  no)
575
 
    COPT=''
576
 
    CXXOPT=''
577
 
    FOPT=''
578
 
    ;;
579
 
  *)
580
 
    COPT="$withval"
581
 
    CXXOPT="$withval"
582
 
    FOPT="$withval"
583
 
    ;;
584
 
esac
585
 
])
586
 
 
587
 
# Adjust the flags dealing with strictness of the compilers.
588
 
# The default is to disable strict language checks.  --with-opt=no or --without-opt will turn
589
 
# off optimization.
590
 
AC_ARG_WITH(strict,[  --with-strict           --with-strict=yes will turn on strict compiler warnings],[
591
 
case $withval in
592
 
  yes)
593
 
    # "Strict" flags only known for GNU compilers
594
 
    if test "$G77" = yes ; then
595
 
      FOTH="$FOTH -Wall"
596
 
    fi
597
 
    if test "$GCC" = yes ; then
598
 
      COTH="$COTH -Wall -ansi"
599
 
    fi
600
 
    if test "$GXX" = yes ; then
601
 
      CXXOTH="$CXXOTH -Wall -ansi"
602
 
    fi
603
 
    ;;
604
 
  no)
605
 
    ;;
606
 
esac
607
 
])
608
 
AC_MSG_RESULT([C extra flags: $COTH])
609
 
AC_MSG_RESULT([C++ extra flags: $CXXOTH])
610
 
 
611
 
# check Fortran symbol convention
612
 
AC_MSG_CHECKING(fortran symbols)
613
 
if test -n "$FC" ; then
614
 
  /bin/rm -f ffunc.f flink.c
615
 
  echo "      subroutine ffunc()" > ffunc.f
616
 
  echo "      return" >> ffunc.f
617
 
  echo "      end" >> ffunc.f
618
 
  $FC -c ffunc.f 1>/dev/null 2>/dev/null
619
 
  echo "main(){ FF(); return 0; }" > flink.c
620
 
  if $CC -o flink -DFF=ffunc flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
621
 
    AC_MSG_RESULT(same as C)
622
 
    FC_SYMBOL=1
623
 
  elif $CC -o flink -DFF=ffunc_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
624
 
    AC_MSG_RESULT(lowercase with underscore)
625
 
    FC_SYMBOL=2
626
 
  elif $CC -o flink -DFF=FFUNC flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
627
 
    AC_MSG_RESULT(uppercase)
628
 
    FC_SYMBOL=3
629
 
  elif $CC -o flink -DFF=FFUNC_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
630
 
    AC_MSG_RESULT(uppercase with underscore)
631
 
    FC_SYMBOL=4
632
 
  else
633
 
    AC_MSG_RESULT(giving up)
634
 
    AC_MSG_ERROR(could not determine fortran symbol names)
635
 
  fi
636
 
  /bin/rm -f ffunc.f ffunc.o flink flink.c flink.o ffunc
637
 
else
638
 
  FC_SYMBOL=2
639
 
  AC_MSG_RESULT(guessing lowercase with underscore)
640
 
fi
641
 
AC_SUBST(FC_SYMBOL)
642
 
 
643
 
#
644
 
# Check for LaTeX, DVIPS, and LaTeX2HTML
645
 
#
646
 
AC_PROG_LATEX()
647
 
AC_PROG_DVIPS()
648
 
AC_PROG_LATEX2HTML()
649
 
 
650
 
#
651
 
# Support for dependency rules
652
 
#
653
 
 
654
 
# The GNU compilers work with:
655
 
CCDEPENDSUF=none
656
 
CXXDEPENDSUF=none
657
 
CCDEPENDFLAGS=-M
658
 
CXXDEPENDFLAGS=-M
659
 
 
660
 
/bin/rm -f depcheck.u depcheck.c depcheck.o depcheck.cc
661
 
 
662
 
# Check for an IBM visual age C compiler
663
 
echo "#include <stdio.h>" > depcheck.c
664
 
$CC $CPPFLAGS $CFLAGS -M depcheck.c > /dev/null 2>&1
665
 
if test -f depcheck.u; then
666
 
  CCDEPENDSUF=u
667
 
fi
668
 
/bin/rm -f depcheck.u depcheck.c depcheck.o depcheck.cc
669
 
 
670
 
# Check for an IBM visual age C++ compiler
671
 
echo "#include <iostream>" > depcheck.cc
672
 
$CXX $CPPFLAGS $CXXFLAGS -M -E depcheck.cc > /dev/null 2>&1
673
 
if test -f depcheck.u; then
674
 
  CXXDEPENDSUF=u
675
 
  CXXDEPENDFLAGS="-M -E"
676
 
fi
677
 
/bin/rm -f depcheck.u depcheck.c depcheck.o depcheck.cc
678
 
 
679
 
AC_SUBST(CCDEPENDSUF)
680
 
AC_SUBST(CXXDEPENDSUF)
681
 
AC_SUBST(CCDEPENDFLAGS)
682
 
AC_SUBST(CXXDEPENDFLAGS)
683
 
 
684
 
AC_OUTPUT(include/sizeof.h include/Makefile
685
 
          include/chkpt_params.h
686
 
          Makefile lib/Makefile src/Makefile
687
 
          src/lib/Makefile src/lib/MakeRules src/lib/MakeVars
688
 
          src/util/Makefile src/util/MakeRules src/util/MakeVars
689
 
 
690
 
          src/util/tocprint/Makefile
691
 
          src/util/psi2molden/Makefile
692
 
 
693
 
          src/lib/libciomr/Makefile
694
 
          src/lib/libciomr/iomrparam.h
695
 
          src/lib/libipv1/Makefile
696
 
          src/lib/libchkpt/Makefile
697
 
 
698
 
          src/lib/libderiv/Makefile
699
 
          src/lib/libderiv/MakeVars
700
 
          src/lib/libderiv/libderiv_config.h
701
 
          src/lib/libdpd/Makefile
702
 
          src/lib/libint/Makefile
703
 
          src/lib/libint/MakeVars
704
 
          src/lib/libint/libint_config.h
705
 
          src/lib/libiwl/Makefile
706
 
          src/lib/libpsio/Makefile
707
 
          src/lib/libqt/Makefile
708
 
          src/lib/libr12/Makefile
709
 
          src/lib/libr12/MakeVars
710
 
          src/lib/libr12/libr12_config.h
711
 
          src/lib/libbasis/Makefile
712
 
          src/bin/Makefile src/bin/MakeRules src/bin/MakeVars
713
 
 
714
 
          src/bin/cphf/Makefile
715
 
          src/bin/psi3/Makefile
716
 
          src/bin/ccdensity/Makefile
717
 
          src/bin/ccenergy/Makefile
718
 
          src/bin/cchbar/Makefile
719
 
          src/bin/cclambda/Makefile
720
 
          src/bin/ccsort/Makefile
721
 
          src/bin/cctriples/Makefile
722
 
          src/bin/cceom/Makefile
723
 
          src/bin/cceom-d/Makefile
724
 
          src/bin/ccresponse/Makefile
725
 
          src/bin/cints/Makefile
726
 
          src/bin/cis/Makefile
727
 
          src/bin/clag/Makefile
728
 
          src/bin/cscf/Makefile
729
 
          src/bin/detci/Makefile
730
 
          src/bin/detcas/Makefile
731
 
          src/bin/detcasman/Makefile
732
 
          src/bin/extrema/Makefile
733
 
          src/bin/geom/Makefile
734
 
          src/bin/input/Makefile
735
 
          src/bin/mp2/Makefile
736
 
          src/bin/mp2r12/Makefile
737
 
          src/bin/oeprop/Makefile
738
 
          src/bin/optking/Makefile
739
 
          src/bin/psiclean/Makefile
740
 
          src/bin/transqt/Makefile
741
 
          src/bin/mvo/Makefile
742
 
          src/bin/dboc/Makefile
743
 
          src/bin/cusp/Makefile
744
 
          src/bin/mocube/Makefile
745
 
          src/bin/localize/Makefile
746
 
          src/bin/stable/Makefile
747
 
          src/bin/response/Makefile
748
 
 
749
 
          tests/Makefile
750
 
          tests/MakeVars
751
 
          tests/MakeRules
752
 
          tests/runtest.pl
753
 
          tests/scf-opt/Makefile
754
 
          tests/scf-opt2/Makefile
755
 
          tests/scf-opt3/Makefile
756
 
          tests/scf-opt4/Makefile
757
 
          tests/scf-opt5/Makefile
758
 
          tests/scf-opt6/Makefile
759
 
          tests/scf-opt7/Makefile
760
 
          tests/scf-opt8/Makefile
761
 
          tests/scf-opt9/Makefile
762
 
          tests/scf-opt10/Makefile
763
 
          tests/scf-opt11/Makefile
764
 
          tests/scf-opt-numer/Makefile
765
 
          tests/scf-freq/Makefile
766
 
          tests/scf-freq-numer/Makefile
767
 
          tests/scf-freq-symm-numer/Makefile
768
 
          tests/scf-polar/Makefile
769
 
          tests/rhf-oeprop/Makefile
770
 
          tests/rhf-stab/Makefile
771
 
          tests/rhf-stab/rhf-stab.pl
772
 
          tests/uhf-stab/Makefile
773
 
          tests/uhf-stab/uhf-stab.pl
774
 
          tests/rohf-stab/Makefile
775
 
          tests/rohf-stab/rohf-stab.pl
776
 
          tests/cis-sp/Makefile
777
 
          tests/cisd-sp/Makefile
778
 
          tests/cisd-opt-numer/Makefile
779
 
          tests/casscf-sp/Makefile
780
 
          tests/mp2-sp/Makefile
781
 
          tests/mp2-direct-sp/Makefile
782
 
          tests/mp2-oeprop/Makefile
783
 
          tests/cc1/Makefile
784
 
          tests/cc2/Makefile
785
 
          tests/cc3/Makefile
786
 
          tests/cc4/Makefile
787
 
          tests/cc5/Makefile
788
 
          tests/cc6/Makefile
789
 
          tests/cc7/Makefile
790
 
          tests/cc8/Makefile
791
 
          tests/cc9/Makefile
792
 
          tests/cc10/Makefile
793
 
          tests/cc11/Makefile
794
 
          tests/cc12/Makefile
795
 
          tests/cc13/Makefile
796
 
          tests/cc14/Makefile
797
 
          tests/cc15/Makefile
798
 
          tests/cc16/Makefile
799
 
          tests/cc17/Makefile
800
 
          tests/cc18/Makefile
801
 
          tests/cc19/Makefile
802
 
          tests/dboc-rhf1/Makefile
803
 
          tests/dboc-rohf1/Makefile
804
 
          tests/dboc-uhf1/Makefile
805
 
          tests/dboc-rcisd1/Makefile
806
 
          tests/dboc-rocisd1/Makefile
807
 
          tests/extrema-zmat/Makefile
808
 
          tests/extrema-zmat/extrema-zmat.pl
809
 
          tests/extrema-deloc/Makefile
810
 
          tests/extrema-deloc/extrema-deloc.pl
811
 
          tests/mp2r12-sp1/Makefile
812
 
          tests/mp2-opt-numer/Makefile
813
 
          tests/rhf-lindep1/Makefile
814
 
          tests/rohf-lindep1/Makefile
815
 
          tests/uhf-lindep1/Makefile
816
 
          tests/rohf-grad1/Makefile
817
 
          tests/uhf-grad1/Makefile
818
 
          tests/psi_start/Makefile
819
 
          tests/psi_start/psi_start.pl
820
 
 
821
 
          doc/MakeVars doc/MakeRules doc/Makefile
822
 
          doc/macros.tex
823
 
          doc/installation/Makefile
824
 
          doc/progman/Makefile doc/userman/Makefile
825
 
          )
826
 
# The following should be added to config_files/ac_output for 
827
 
# libmathtools/ccman.  You have to move those lines up above this
828
 
# comment.
829
 
#         src/lib/libmathtools/Makefile
830
 
#         src/lib/libmathtools/containers/templates/Makefile
831
 
#         src/lib/libmathtools/solvers/templates/Makefile
832
 
#         src/lib/libmathtools/general/Makefile
833
 
#         src/lib/libmathtools/tensor/Makefile
834
 
#         src/bin/ccman/Makefile