File: configure.in

package info (click to toggle)
deal.ii 6.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 130,276 kB
  • ctags: 254,694
  • sloc: cpp: 664,750; ansic: 30,376; sh: 3,290; makefile: 3,152; perl: 1,046; asm: 802; fortran: 801; lisp: 84; pascal: 71
file content (879 lines) | stat: -rw-r--r-- 29,831 bytes parent folder | download
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
dnl $Id: configure.in 21534 2010-07-18 20:11:46Z bangerth $
dnl
dnl    This is the input for the ./configure script of the deal.II
dnl    libraries. All options and paths are stored in
dnl    the file common/Make.global_options.
dnl
dnl    In doc/Makefile some information on the kind of documentation
dnl    is stored.
dnl
dnl
dnl Copyright: The deal.II authors
dnl          1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
dnl


dnl -------------------------------------------------------------
dnl                          Administrativa
dnl -------------------------------------------------------------

dnl switch off caching, since that leads to insurmountable trouble if
dnl you call ./configure subsequently on different systems without
dnl clearing the cache
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl

AC_INIT(deal.II, 6.3.1, dealii@dealii.org, deal.II)

AC_REVISION($Revision: 21534 $)
AC_PREREQ(2.61)


dnl Where the output config file is located
AC_CONFIG_HEADER(base/include/base/config.h)

dnl Have the auxiliary tools like config.guess etc in contrib/config
AC_CONFIG_AUX_DIR(contrib/config)




dnl -------------------------------------------------------------
dnl                    Globals: Paths and versions
dnl -------------------------------------------------------------

dnl    Set the path to the deal.II libraries to `pwd`
AC_PREFIX_DEFAULT(`pwd`)
DEAL_II_PATH=`pwd`


dnl    Split version number in major and minor
DEAL_II_MAJOR=`echo $PACKAGE_VERSION | perl -pi -e 's/^(\d+)\..*/$1/;'`
DEAL_II_MINOR=`echo $PACKAGE_VERSION | perl -pi -e 's/^\d+\.(\d+).*/$1/;'`
AC_DEFINE_UNQUOTED(DEAL_II_MAJOR, $DEAL_II_MAJOR,
                   [Major version number of deal.II])
AC_DEFINE_UNQUOTED(DEAL_II_MINOR, $DEAL_II_MINOR,
                   [Minor version number of deal.II])
AC_DEFINE_UNQUOTED(DEAL_II_PATH, "$DEAL_II_PATH",
                   [Path to the deal.II directory])
AC_MSG_RESULT(Configuring deal.II version $PACKAGE_VERSION)
AC_SUBST(DEAL_II_MAJOR)
AC_SUBST(DEAL_II_MINOR)
AC_SUBST(DEAL_II_PATH)

dnl    For backward compatibility, also have DEAL2_DIR alias DEAL_II_PATH
DEAL2_DIR="$DEAL_II_PATH"
AC_SUBST(DEAL2_DIR)

dnl    Check for machine type operating system
AC_CANONICAL_TARGET
AC_SUBST(target)

dnl    Set the language for which subsequent tests shall be
dnl    performed to C++
AC_LANG(C++)




dnl -------------------------------------------------------------
dnl                          C/C++ compilers
dnl -------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- configuring C/C++ compilers ----------------)

dnl Find a C compiler. This modifies the variable CC.
dnl In order to get the absolute path of the compiler, use the
dnl second line
dnl
dnl Likewise, find the right C++ compiler. Note that for historical
dnl reasons, the compiler name and version is in the name GXX_VERSION,
dnl even if the compiler is not GCC.
dnl
dnl Note that on MIPS systems, the AC_PROG_CXX call erroneously sets
dnl -g in CXXFLAGS, which is not exactly what we want, so we store
dnl the old value temporarily
OLDCFLAGS="$CFLAGS"
AC_PROG_CC
CFLAGS="$OLDCFLAGS"
DEAL_II_PATH_PROG(CC,$CC)

OLDCXXFLAGS="$CXXFLAGS"
AC_PROG_CXX
CXXFLAGS="$OLDCXXFLAGS"
DEAL_II_PATH_PROG(CXX,$CXX)

dnl Next determine which C++ compiler we have here and set compilation
dnl flags accordingly. Note that for historical reasons the name and
dnl version of the compiler is written to the variable GXX_VERSION.
DEAL_II_DETERMINE_CXX_BRAND
DEAL_II_DETERMINE_IF_SUPPORTS_MPI
DEAL_II_SET_CXX_FLAGS
DEAL_II_SET_CXX_DEBUG_FLAG

AC_SUBST(GXX_VERSION)
AC_SUBST(GXX_VERSION_DETAILED)
AC_SUBST(DEAL_II_COMPILER_SUPPORTS_MPI)
AC_SUBST(CXXFLAGSG)
AC_SUBST(CXXFLAGSO)
AC_SUBST(CXXFLAGSPIC)
AC_SUBST(SHLIBLD)
AC_SUBST(SHLIBFLAGS)
AC_SUBST(OBJEXT)
AC_SUBST(EXEEXT)


dnl Do the same for the C compiler. we only use the C compiler for third-party
dnl code and only for things we optimize, so no need to determine debug flags
dnl and similar things
DEAL_II_DETERMINE_CC_BRAND
DEAL_II_SET_CC_FLAGS

AC_SUBST(CC_VERSION)
AC_SUBST(CFLAGS)
AC_SUBST(CFLAGSPIC)

dnl -------------------------------------------------------------
dnl                          Multithreading
dnl -------------------------------------------------------------

dnl Test whether multithreading support is requested. This
dnl does not tell deal.II to actually use it, but the
dnl compiler flags are set to allow for it.
DEAL_II_CHECK_MULTITHREADING
DEAL_II_CHECK_PARTLY_BRACKETED_INITIALIZER
AC_SUBST(enablethreads)



dnl --------------------------------------------------------------
dnl                   Kludges and C++ compatibility
dnl --------------------------------------------------------------

dnl Various kludges for various systems: some systems need special
dnl treatment for some things. Since they sometimes depend on
dnl whether other flags are set (e.g. the need for defining
dnl -D__EXTENSIONS__ depends on whether we use/not use threading
dnl options), this is done after checking for multithreading

DEAL_II_CHECK_ASSERT_THROW(debug, $CXXFLAGSG,
                           [CXXFLAGSG="-DDISABLE_ASSERT_THROW $CXXFLAGSG"])
DEAL_II_CHECK_ASSERT_THROW(optimized, $CXXFLAGSO,
                           [CXXFLAGSO="-DDISABLE_ASSERT_THROW $CXXFLAGSO"])
DEAL_II_CHECK_LOCAL_TYPEDEF_COMP
DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS
DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST
DEAL_II_CHECK_EXPLICIT_DESTRUCTOR_BUG
DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG
DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG2
DEAL_II_CHECK_TEMPL_SPEC_FRIEND_BUG
DEAL_II_CHECK_IMPLEMENTED_PURE_FUNCTION_BUG
DEAL_II_CHECK_TEMPLATE_TEMPLATE_TYPEDEF_BUG
DEAL_II_CHECK_FUNPTR_TEMPLATE_TEMPLATE_BUG
DEAL_II_CHECK_NESTED_CLASS_FRIEND_BUG
DEAL_II_CHECK_NESTED_CLASS_TEMPL_FRIEND_BUG
DEAL_II_CHECK_MEMBER_VAR_SPECIALIZATION_BUG
DEAL_II_CHECK_MEMBER_ARRAY_SPECIALIZATION_BUG
DEAL_II_CHECK_MEMBER_TEMPLATE_SPECIALIZATION_BUG
DEAL_II_CHECK_LONG_DOUBLE_LOOP_BUG
DEAL_II_CHECK_ANON_NAMESPACE_BUG
DEAL_II_CHECK_ANON_NAMESPACE_BUG2
DEAL_II_CHECK_ANON_NAMESPACE_BUG3
DEAL_II_CHECK_WEAK_LINKAGE_BUG
DEAL_II_CHECK_SFINAE_BUG
DEAL_II_CHECK_TEMPL_OP_DISAMBIGUATION_BUG
DEAL_II_CHECK_ARRAY_CONDITIONAL_DECAY_BUG
DEAL_II_CHECK_ARRAY_ARG_BUG
DEAL_II_CHECK_EXPLICIT_CONSTRUCTOR_BUG
DEAL_II_CHECK_BOOST_BIND_COMPILER_BUG
DEAL_II_CHECK_BOOST_GRAPH_COMPILER_BUG
DEAL_II_CHECK_CONST_MEMBER_DEDUCTION_BUG
DEAL_II_CHECK_TYPE_QUALIFIER_BUG
DEAL_II_CHECK_WSYNTH_AND_STD_COMPLEX
DEAL_II_CHECK_CTOR_DTOR_PRIVACY
DEAL_II_CHECK_VECTOR_ITERATOR_IS_POINTER
DEAL_II_HAVE_PRETTY_FUNCTION
DEAL_II_HAVE_STD_ITERATOR
DEAL_II_HAVE_STD_STRINGSTREAM
DEAL_II_HAVE_STD_NUMERIC_LIMITS
DEAL_II_HAVE_STD_OSTREAM_HEADER
DEAL_II_HAVE_STD_IOSFWD_HEADER
DEAL_II_HAVE_BUILTIN_EXPECT
DEAL_II_HAVE_VERBOSE_TERMINATE
DEAL_II_HAVE_GLIBC_STACKTRACE
DEAL_II_HAVE_DEMANGLER
DEAL_II_CHECK_MIN_VECTOR_CAPACITY
DEAL_II_CHECK_ABORT
DEAL_II_CHECK_GETRUSAGE
DEAL_II_CHECK_ISNAN
DEAL_II_CHECK_ISFINITE
DEAL_II_CHECK_RAND_R
DEAL_II_CHECK_QUAD_DEFINE
DEAL_II_CHECK_ERROR_CODES_DEFINITION
AC_CHECK_FUNCS_ONCE([gethostname getpid])
AC_CHECK_HEADERS_ONCE([sys/syscall.h])
DEAL_II_CHECK_BROKEN_SOCKETS


dnl -------------------------------------------------------------
dnl                        Fortran 77 compilers
dnl -------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- configuring F77 compilers ------------------)

dnl Find path to a Fortran 77 compiler. By default try to find a
dnl vendor compiler which is usually named `f77', and only if that could
dnl not be found, use `g77' instead. The reasoning is that usually vendor
dnl compilers are much better adapted to the system at hand, and since
dnl Fortran code is often used for efficiency reasons, this is
dnl important. Likewise, if external Fortran code is imported, it is
dnl usually code that is well tested and does not need much debugging, so
dnl good optimizations are helpful again.
dnl
dnl It is possible that no Fortran 77 compiler was found. Don't care,
dnl it may be that we don't need one (but we check below, when we must
dnl have it).
AC_PATH_PROGS(F77, [gfortran f77 g77])

dnl Next determine which f77 compiler we have here and set compilation
dnl flags accordingly. Only do that if we have an F77 compiler at all.
if test "x$F77" != "x" ; then
  DEAL_II_DETERMINE_F77_BRAND
  DEAL_II_SET_F77_FLAGS
fi

AC_SUBST(F77_VERSION)
AC_SUBST(F77FLAGSO)
AC_SUBST(F77FLAGSG)
AC_SUBST(F77FLAGSPIC)
AC_SUBST(F77LIBS)





dnl --------------------------------------------------------------
dnl                         Shared libraries
dnl --------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- configuring shared/static libs -------------)

AC_ARG_ENABLE(shared,
[  --enable-shared         Set compiler flags to generate shared libraries],
    enableshared="$enableval",
    enableshared=yes)

dnl On AIX 4.x and alpha, shared libs don't work for us at present, so
dnl disable them (we should probably use libtool there). Likewise on
dnl a few other systems.
dnl
dnl For Cygwin Windows systems, the shared library suffix becomes ".dll",
dnl on Mac OS X it is .dylib.
case "$target" in
   *-aix4* | alpha*-linux* | alpha*-osf[45]* | hppa64-unknown-linux-gnu )
	   AC_MSG_WARN(Shared libraries not supported on $target. Using static libs instead)
	   enableshared=no
	   ;;
   *cygwin )
           shared_lib_suffix=".dll"
           cygwin_shared_lib="yes"
           ;;
   *-apple-darwin* )
           shared_lib_suffix=".dylib"
           darwin_shared_lib="yes"
           ;;
   * )
           shared_lib_suffix=".so"
           static_lib_suffix=".a"
           ;;
esac

if test "x$enableshared" = "xyes" ; then
  CFLAGS="$CFLAGS $CFLAGSPIC"
  CXXFLAGSG="$CXXFLAGSG $CXXFLAGSPIC"
  CXXFLAGSO="$CXXFLAGSO $CXXFLAGSPIC"
  F77FLAGSG="$F77FLAGSG $F77FLAGSPIC"
  F77FLAGSO="$F77FLAGSO $F77FLAGSPIC"
  SHLIBFLAGS="-shared"

  case "$target" in
    *-apple-darwin* )
           SHLIBFLAGS="-dynamiclib"
           DEAL_II_CHECK_DYNAMIC_CAST_BUG
	   ;;
  esac

  case "${GXX_VERSION}" in
    ibm_xlc* )
           SHLIBFLAGS="-qmkshrobj"
	   ;;
  esac

  dnl See if we can use -Wl,-soname,... for linking
  DEAL_II_CHECK_LINK_SONAME
fi

dnl Check if the linker supports -rpath. Do so independently whether we
dnl actually build deal.II as shared libs since, for example, the TBB
dnl library is always shared
DEAL_II_CHECK_RPATH


AC_SUBST(enableshared)
AC_SUBST(static_lib_suffix)
AC_SUBST(shared_lib_suffix)

dnl Also look for RANLIB, since some rather old systems (ah, and MAC OS X!)
dnl still require it for statically linked libraries. On other systems,
dnl RANLIB is not available, so skip the second check that tries to get
dnl the full path for the executable that was found in the first one.
dnl We also check for AR, since on some systems we will want to pass different
dnl flags to AR if for example both 32- and 64-bit binaries are supported
AC_CHECK_PROG(AR,ar,ar)
AC_PATH_PROG(AR,$AR)
AC_PROG_RANLIB
if test "$RANLIB" != ":" ; then
  AC_PATH_PROG(RANLIB,$RANLIB)
fi
AC_SUBST(AR)
AC_SUBST(RANLIB)


dnl --------------------------------------------------------------
dnl                       Optional features
dnl --------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- configuring optional features --------------)

AC_ARG_ENABLE(parser,
              AS_HELP_STRING([--enable-parser],[While switched on by default, this option allows to switch off support for the function parser in the contrib directory.]),
	      [ enableparser="$enableval"
	        if test "x$enableval" = "xno" ; then
 	          AC_MSG_RESULT(Function parser disabled)
		  AC_DEFINE(DEAL_II_DISABLE_PARSER, 1,
                            [disable the function parser in contrib])
                else
 	          AC_MSG_RESULT(Function parser enabled)
		fi],
	      enableparser=yes)


AC_SUBST(enableparser)
AC_SUBST(DEAL_II_DISABLE_PARSER)

AC_ARG_ENABLE(mgcompatibility,
	AS_HELP_STRING([--enable-mgcompatibility],
	[Use preconditioner interface in MGSmootherRelaxation instead of the new interface using the function step. Defaults to disabled.]),
	[ if test "x$enableval" = "xyes" ; then
	    AC_MSG_RESULT(enable multigrid compatibility mode)
	    AC_DEFINE(DEAL_II_MULTIGRID_COMPATIBILITY, 1, [enable multigrid compatibility mode])
	  fi])

dnl --------------------------------------------------------------
dnl                   Backward compatibility functions
dnl --------------------------------------------------------------
DEAL_II_CHECK_COMPAT_BLOCKER




dnl -------------------------------------------------------------
dnl                  Additional libraries
dnl -------------------------------------------------------------
dnl  Do this in two steps:
dnl
dnl   1) For each library required by another, make sure
dnl      --with-library is set
dnl
dnl   2) Then check for libraries in reverse order to have them
dnl      included in LIBS
dnl
dnl -------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- configuring additional libs ----------------)

dnl Check for boost option and make sure we get all files.
dnl Since we may want to use an external boost installation
dnl this test needs to run after we determine whether -rpath
dnl works
BOOST_INCLUDE_DIR="-I$DEAL_II_PATH/contrib/boost/include"
DEAL_II_CHECK_BOOST
AC_SUBST(BOOST_INCLUDE_DIR)

DEAL_II_CONFIGURE_PETSC
AC_SUBST(USE_CONTRIB_PETSC)
AC_SUBST(DEAL_II_PETSC_DIR)
AC_SUBST(DEAL_II_PETSC_ARCH)
AC_SUBST(DEAL_II_PETSC_VERSION_MAJOR)
AC_SUBST(DEAL_II_PETSC_VERSION_MINOR)
AC_SUBST(DEAL_II_PETSC_VERSION_SUBMINOR)
AC_SUBST(DEAL_II_PETSC_MPIUNI_LIB)
AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_PETSC)

DEAL_II_CONFIGURE_SLEPC
AC_SUBST(USE_CONTRIB_SLEPC)
AC_SUBST(DEAL_II_SLEPC_DIR)
AC_SUBST(DEAL_II_SLEPC_VERSION_MAJOR)
AC_SUBST(DEAL_II_SLEPC_VERSION_MINOR)
AC_SUBST(DEAL_II_SLEPC_VERSION_SUBMINOR)
AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_SLEPC)

DEAL_II_CONFIGURE_TRILINOS
AC_SUBST(USE_CONTRIB_TRILINOS)
AC_SUBST(DEAL_II_TRILINOS_INCDIR)
AC_SUBST(DEAL_II_TRILINOS_LIBDIR)
AC_SUBST(DEAL_II_TRILINOS_SHARED)
AC_SUBST(DEAL_II_TRILINOS_STATIC)

DEAL_II_CONFIGURE_MUMPS
AC_SUBST(USE_CONTRIB_MUMPS)
AC_SUBST(DEAL_II_MUMPS_DIR)
AC_SUBST(DEAL_II_SCALAPACK_DIR) dnl MUMPS dependency
AC_SUBST(DEAL_II_BLACS_DIR)     dnl MUMPS dependency
AC_SUBST(DEAL_II_BLACS_ARCH)
AC_SUBST(DEAL_II_DEFINE_DEAL_II_USE_MUMPS)

dnl Make sure we configure for libraries used by other libraries. For
dnl example, UMFPACK needs blas, and so does LAPACK


if test "x$with_umfpack" != "x" -a "x$with_umfpack" != "xno" ; then
  if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then
    with_blas="yes"
  fi
fi

if test "x$with_lapack" != "x" -a "x$with_lapack" != "xno" ; then
  if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then
    with_blas="yes"
  fi
fi


dnl Likewise, if we use PETSc and link statically, we have to add blas to the
dnl linker line (if we use shared libs, then the PETSc libs already carry this
dnl dependence, but static archives do not have a method to list dependencies)
dnl
dnl On Mac OS X, when using PETSc, it appears as if we always need to link with
dnl blas and lapack, independently of whether we use static or shared libs
if test "x$with_petsc" != "x" -a "x$with_petsc" != "xno" ; then
  if test "x$enableshared" = "xno" ; then
    if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then
      with_blas="yes"
    fi
  fi

  case "$target" in
    *-apple-darwin* )
	if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then
          with_blas="yes"
        fi
	if test "x$with_lapack" = "x" -o "x$with_lapack" = "xno"; then
          with_lapack="yes"
        fi
	;;
  esac
fi


dnl The same holds for Trilinos, which needs not only BLAS but also LAPACK
if test "x$with_trilinos" != "x" -a "x$with_trilinos" != "xno" ; then
  if test "x$enableshared" = "xno" ; then
    if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then
      with_blas="yes"
    fi
    if test "x$with_lapack" = "x" -o "x$with_lapack" = "xno"; then
      with_lapack="yes"
    fi
  fi
fi





dnl -------------------------------------------------------------
dnl Actually include libraries here. Check for the libraries
dnl    requiring FORTRAN support first.
dnl -------------------------------------------------------------

dnl Check for blas.
AC_ARG_WITH(blas,
  [  --with-blas=blaslib     Use the blas library blaslib. Make sure the path
                          to the libary is searched by ld, since it is
			  included by the argument -lblaslib. If no argument
			  is given, use -lblas. Default is to use -lblas only
                          if required by other libraries.],
  DEAL_II_WITH_BLAS($withval))

DEAL_II_CONFIGURE_HSL
AC_SUBST(USE_CONTRIB_HSL)

dnl -------------------------------------------------------------
dnl Now insert FORTRAN libs at the END of the library string if needed
dnl -------------------------------------------------------------

if test "x$NEEDS_F77LIBS" != "x" ; then
   AC_MSG_RESULT(Adding FORTRAN libraries $F77LIBS)
   LIBS="$LIBS $F77LIBS"
   LDFLAGS="$F77FLAGS $LDFLAGS"
fi

dnl -------------------------------------------------------------
dnl These libraries are straight forward now
dnl -------------------------------------------------------------

dnl Check for the compression library zlib.
dnl First activate if no option given
if test "x$with_zlib" = "x" ; then
  with_zlib="yes"
fi

AC_ARG_WITH(zlib,
  [  --with-zlib=zlib        Use the compression library zlib for gzipped
                          input and output and link it with -lzlib (the
			  default is -lz). Make sure the library is in the
			  search path of ld],
  DEAL_II_WITH_ZLIB($withval))


DEAL_II_CONFIGURE_TECPLOT
AC_SUBST(TECPLOT_INCLUDE_DIR)

DEAL_II_CONFIGURE_NETCDF

DEAL_II_CONFIGURE_METIS
AC_SUBST(USE_CONTRIB_METIS)
AC_SUBST(DEAL_II_METIS_LIBDIR)
AC_SUBST(DEAL_II_METIS_INCDIR)

dnl Check for UMFPack
DEAL_II_WITH_UMFPACK
AC_SUBST(UMFPACK_LIB)
AC_SUBST(UMFPACK_INCLUDE_DIR)
AC_SUBST(USE_CONTRIB_UMFPACK)

dnl -------------------------------------------------------------
dnl Check for LAPACK and the LAPACK functions being used
dnl -------------------------------------------------------------
AC_ARG_WITH(lapack,
  [  --with-lapack=lapacklib Use the lapack library lapacklib. Make sure the
	                  path to the libary is searched by ld, since it is
			  included by the argument -llapacklib. If no argument
			  is given, use -llapack. Default is not to use
                          -llapack.],

  DEAL_II_WITH_LAPACK($withval))

dnl Finally check if BLAS is really there. We have to do it this way, since
dnl MAC OSX links BLAS functions in a different way
if test "x$with_blas" != "x" -a "x$with_blas" != "xno" ; then
  AC_CHECK_FUNC(daxpy_,,[AC_MSG_ERROR([BLAS library not installed correctly($with_blas)])])
fi

dnl Since we might have an incomplete LAPACK installation, check all
dnl the functions we may want to use. If any of them is missing,
dnl deal.II will not attempt to call it and rather throw an
dnl exception.

AC_CHECK_FUNCS([daxpy_ saxpy_ dgemv_ sgemv_ dgeev_ sgeev_ dgeevx_ sgeevx_])
AC_CHECK_FUNCS([dgesvd_ sgesvd_ dgemm_ sgemm_ dgetrf_ sgetrf_ dgetri_ sgetri_])
AC_CHECK_FUNCS([dgeqrf_ sgeqrf_ dormqr_ sormqr_ dorgqr_ sorgqr_ dtrtrs_ strtrs_])
AC_CHECK_FUNCS([dgetrs_ sgetrs_ dstev_ sstev_ dsygv_ ssygv_])

dnl -------------------------------------------------------------
dnl       set include paths of several libraries
dnl -------------------------------------------------------------


AC_SUBST(CPPFLAGS)



dnl -------------------------------------------------------------
dnl       Optimizations and consistency of compiler flags
dnl -------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- checking compiler flags --------------------)

dnl Possibly add some flags is optimizations are requested
DEAL_II_CHECK_CPU_OPTIMIZATIONS

dnl Last check: test whether CXXFLAGS and F77FLAGS are ok
DEAL_II_CHECK_CXXFLAGS_CONSISTENCY
DEAL_II_CHECK_F77FLAGS_CONSISTENCY




dnl -------------------------------------------------------------
dnl                       Third party programs
dnl -------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- configuring other programs -----------------)

DEAL_II_CHECK_DOXYGEN
AC_SUBST(DOXYGEN)
AC_SUBST(DOXYGEN_OPTIONS)
AC_SUBST(DEAL_II_HAVE_DOT)

AC_PATH_PROG(PERL, perl)
AC_SUBST(PERL)




dnl -------------------------------------------------------------
dnl                     Configure subdirectories
dnl -------------------------------------------------------------

dnl    Configure the `tests' directory, if that is installed. also
dnl    configure the programs in the contrib directory
AC_CONFIG_SUBDIRS(contrib tests)




dnl -------------------------------------------------------------
dnl                          Output results
dnl -------------------------------------------------------------

AC_MSG_RESULT()
AC_MSG_RESULT(---------------- generating output --------------------------)

dnl First set the templates for config.h
AH_TOP(
[
//----------------------------  config.h  ---------------------------
//    $Id: configure.in 21534 2010-07-18 20:11:46Z bangerth $
//    Version: $Name$
//
//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//----------------------------  config.h  ---------------------------
#ifndef __deal2__config_h
#define __deal2__config_h

// Note: you should not usually have to change this file, as it is
// automatically generated from the ./configure file in the top level
// directory. If there are problems with the contents of this file,
// rather than changing it, try to modify the mechanisms in
// configure.in that generated this output. The reason is that you
// would have to make these changes each time you compile a new
// version of the library, or on a different computer. Furthermore, it
// is important not to build different parts of the library with
// different versions of this file.
//
// In case of problems in autodetection of features of your build
// environment, contact the authors of the library.


/**
 * Two macro names that we put at the top and bottom of all deal.II files
 * and that will be expanded to "namespace dealii {" and "}".
 */
#define DEAL_II_NAMESPACE_OPEN namespace dealii {
#define DEAL_II_NAMESPACE_CLOSE }

])


AH_BOTTOM(
[
/**
 * Depending on the use of threads, we will have to make some variables
 * volatile. We do this here in a very old-fashioned C-style, but still
 * convenient way.
 */
#if DEAL_II_USE_MT != 0
#  define DEAL_VOLATILE volatile
#else
#  define DEAL_VOLATILE
#endif

/*
 * There is an annoying problem in the Trilinos header ml_config.h: It
 * #define's HAVE_INTTYPES_H but doesn't give the symbol a value. This
 * conflicts with the result of running deal.II's ./configure which
 * #define's it and gives it the value "1". The result is a compiler
 * warning. So if we use Trilinos and if the symbol is already
 * #define'd, then #undef it again here. deal.II doesn't use the
 * #define anyway and this way if we include any of the Trilinos
 * headers they can feel free to set it again to whatever they wish.
 *
 * The form of the #undef with the comment in the middle is necessary
 * to avoid that the pattern substitution of ./configure turns the
 * #undef into a #define again.
 */
#if defined(DEAL_II_USE_TRILINOS) && defined(HAVE_INTTYPES_H)
#  undef /**/ HAVE_INTTYPES_H
#endif

/**
 * These macros are defined to make testing for PETSc versions within
 * the deal.II main code as simple as possible. In brief they are used
 * like this: (i) DEAL_II_PETSC_VERSION_LT is used to advance the
 * PETScWrappers to newer versions of PETSc while preserving backward
 * compatibility; and (ii) DEAL_II_PETSC_VERSION_GTE is used to add
 * functionality to the PETScWrappers that does not exist in previous
 * versions of PETSc.  Examples of usage can be found in
 * lac/source/petsc_matrix_base.h.  Note: SLEPcWrappers do not need
 * their own anological macros, since SLEPc and PETSc must have
 * identical version numbers anyways.
 */
#define DEAL_II_PETSC_VERSION_LT(major,minor,subminor) \
  ((PETSC_VERSION_MAJOR * 10000 + \
    PETSC_VERSION_MINOR * 100 + \
    PETSC_VERSION_SUBMINOR) \
    <  \
    (major)*10000 + (minor)*100 + (subminor))

#define DEAL_II_PETSC_VERSION_GTE(major,minor,subminor) \
  ((PETSC_VERSION_MAJOR * 10000 + \
    PETSC_VERSION_MINOR * 100 + \
    PETSC_VERSION_SUBMINOR) \
    >=  \
    (major)*10000 + (minor)*100 + (subminor))

#include <base/numbers.h>
#include <base/types.h>

/**
 * If the compiler supports the upcoming C++1x standard, allow us to refer
 * to things in namespace std through namespace std_cxx1x (the namespace
 * into which we import BOOST components if we don't have C++1x support).
 */
#ifdef DEAL_II_CAN_USE_CXX1X
namespace std_cxx1x = std;
#endif

#endif
])


dnl Add the deal.II library path to LDFLAGS
LDFLAGS="-L$DEAL_II_PATH/lib $LDFLAGS"


AC_SUBST(LIBS)
AC_SUBST(LDFLAGS)
AC_SUBST(LDFLAGSPIC)

dnl Write output to the global options file and modify other files as well
dnl that need some information
process_files="common/Make.global_options
               common/Makefile.template
               common/scripts/make_dependencies.pl
	       Version
               doc/Makefile
	       doc/doxygen/Makefile
               doc/doxygen/options.dox
               doc/doxygen/options.136
	       doc/doxygen/header.html
	       doc/doxygen/header.136
               doc/doxygen/header.tex
               common/template-arguments"
AC_CONFIG_FILES([$process_files])
AC_OUTPUT

dnl    Autoconf has the annoying habit to simply define PACKAGE_NAME in
dnl    AC_INIT and put this name into config.h, irrespective of the fact
dnl    that other packages that we may use or that users may use with
dnl    deal.II might have their own config.h and conflicting #defines for
dnl    this variable. What we do is to simply rename these variables.
dnl    However, there appears to be no way to do this in some sort of
dnl    proper fashion, so all we can do is to run perl on the output files.
$PERL -pi -e 's/PACKAGE_NAME/DEAL_II_PACKAGE_NAME/g;
              s/PACKAGE_TARNAME/DEAL_II_PACKAGE_TARNAME/g;
              s/PACKAGE_STRING/DEAL_II_PACKAGE_STRING/g;
              s/PACKAGE_BUGREPORT/DEAL_II_PACKAGE_BUGREPORT/g;
              s/PACKAGE_VERSION/DEAL_II_PACKAGE_VERSION/g;' \
	$process_files base/include/base/config.h

echo
echo
echo -------------------------------------------------------------
echo
echo "     The  deal.II  library is now configured. In order to"
echo "     compile it and to generate the  documentation,  just"
echo "     call 'make' without arguments for a list of options."
echo "     For more information, see the doc/readme.html file."
echo
echo -------------------------------------------------------------
echo

if test "x$cygwin_shared_lib" = "xyes" ; then
  echo "     Please add the line"
  echo "        export PATH=\$PATH:$DEAL2_DIR/lib"
  echo "     to your .bash_profile file so that windows will be"
  echo "     able to find the deal.II shared libraries when"
  echo "     executing your programs."
  echo
fi

if test "x$darwin_shared_lib" = "xyes" ; then
  echo "     Please add the line"
  echo "        export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:$DEAL2_DIR/lib"
  echo "     to your .bash_profile file so that OSX will be"
  echo "     able to find the deal.II shared libraries when"
  echo "     executing your programs."
  echo

  if test "x${USE_CONTRIB_TRILINOS}" = "xyes" ; then
    echo "     You will also need to add the path to the Trilinos libraries"
    echo "     to DYLIB_LIBRARY_PATH."
    echo
  fi

  if test "x$DARWIN_GCC_WEAK_LINKAGE_BUG" = "xyes" ; then
    echo "     WARNING: The installed compiler version seems to be "
    echo "     WARNING: the Apple gcc3.3, build 1666, which does not"
    echo "     WARNING: work properly for building dynamics libs"
    echo "     WARNING: Please install Apple's November 2004 patch"
    echo "     WARNING: for the gcc, which can be found on:"
    echo "     WARNING: http://www.apple.com/developer"
    echo
  fi
fi


if test "x$doxygen_not_found" = "xyes" ; then
  echo "     WARNING: During configuration, no version of the doxygen"
  echo "     WARNING: documentation generation program could be found."
  echo "     WARNING: You can still use the library, but you won't be"
  echo "     WARNING: able to generate API documentation locally on"
  echo "     WARNING: your machine. It is available for download,"
  echo "     WARNING: however."
  echo
fi

if test "x$CC_VERSION" = "xunknown_cc" ; then
  echo ----------------------------------------------------------------------
  echo "     WARNING: The C compiler used for configuration is unknown!"
  echo "     WARNING: configure has used a generic set of parameters."
  echo "     WARNING: Still, you have to expect trouble during compilation."
  echo "     WARNING: If so, report to dealii@dealii.org!"
  echo
fi

if test "x$GXX_VERSION" = "xunknown_cc" ; then
  echo ----------------------------------------------------------------------
  echo "     WARNING: The C++ compiler used for configuration is unknown!"
  echo "     WARNING: configure has used a generic set of parameters."
  echo "     WARNING: Still, you have to expect trouble during compilation."
  echo "     WARNING: If so, report to dealii@dealii.org!"
  echo
fi