|
72 | 72 | AM_CONDITIONAL([WITH_MODDIR], [test "x$withval" != xno])
|
73 | 73 | CMC_WITH_MODDIR="$withval"
|
74 | 74 |
|
75 |
| -# ========================================================== |
76 |
| -# Check if option with-t8code is given ===================== |
77 |
| -AC_ARG_WITH([t8code], |
78 |
| - [AS_HELP_STRING([--with-t8code], [compile with t8code support])],, |
79 |
| - [withval=no]) |
80 |
| - |
81 |
| -if test "x$withval" != xno ; then |
82 |
| - AC_DEFINE([WITH_T8CODE], 1, [Define if t8code-linkage is enabled.]) |
83 |
| -fi |
84 |
| -AM_CONDITIONAL([WITH_T8CODE], [test "x$withval" != xno]) |
85 |
| -CMC_WITH_T8CODE="$withval" |
86 |
| - |
87 | 75 | # ==========================================================
|
88 | 76 | # Check if option with-netcdf is given =====================
|
89 | 77 | AC_ARG_WITH([netcdf],
|
|
96 | 84 | AM_CONDITIONAL([WITH_NETCDF], [test "x$withval" != xno])
|
97 | 85 | CMC_WITH_NETCDF="$withval"
|
98 | 86 |
|
| 87 | +# ========================================================== |
| 88 | +# Check if option with-t8code is given ===================== |
| 89 | +AC_ARG_WITH([t8code], |
| 90 | + [AS_HELP_STRING([--with-t8code], [compile with external t8code support])],, |
| 91 | + [withval=no]) |
| 92 | + |
| 93 | +CMC_LIB_ADD_T8_SUBMODULE= |
| 94 | +CMC_T8_CONFIG_AMFLAGS= |
| 95 | +CMC_T8_SC_P4EST_CPP_FLAGS= |
| 96 | +if test "x$withval" != xno ; then |
| 97 | + AC_DEFINE([WITH_T8CODE], 1, [Define if external t8code-linkage is enabled.]) |
| 98 | +else |
| 99 | + # If the option is not given, we will use t8code as a submodule |
| 100 | + AX_SUBDIRS_CONFIGURE([t8code], |
| 101 | + [],[],[[--with-netcdf=no],[--enable-fortran=no],[--with-moddir=no]],[]) |
| 102 | + AC_DEFINE([WITH_T8CODE], 1, [Define if internal t8code-linkage is enabled.]) |
| 103 | + |
| 104 | + CMC_T8_SC_P4EST_CPP_FLAGS+=" -I\$(top_srcdir)/t8code/src -It8code/config -It8code/src" |
| 105 | + CMC_T8_SC_P4EST_CPP_FLAGS+=" -I\$(top_srcdir)/t8code/sc/src -It8code/sc/config -It8code/sc/src" |
| 106 | + CMC_T8_SC_P4EST_CPP_FLAGS+=" -I\$(top_srcdir)/t8code/p4est/src -It8code/p4est/config -It8code/p4est/src" |
| 107 | + CMC_LIB_ADD_T8_SUBMODULE="\$(top_builddir)/t8code/src/libt8.la \$(top_builddir)/t8code/sc/src/libsc.la \$(top_builddir)/t8code/p4est/src/libp4est.la" |
| 108 | + CMC_T8_CONFIG_AMFLAGS="-I \$(top_srcdir)/t8code/config -I \$(top_srcdir)/t8code/sc/config -I \$(top_srcdir)/t8code/p4est/config" |
| 109 | +fi |
| 110 | +AC_SUBST(CMC_LDADD_T8_SUBMODULE, $CMC_LIB_ADD_T8_SUBMODULE) |
| 111 | +AC_SUBST(CMC_T8_AMFLAGS, $CMC_T8_CONFIG_AMFLAGS) |
| 112 | +AC_SUBST(CMC_T8_CPPFLAGS, $CMC_T8_SC_P4EST_CPP_FLAGS) |
| 113 | + |
| 114 | +# In either case, we will have an available t8code |
| 115 | +AM_CONDITIONAL([WITH_T8CODE], [TRUE]) |
| 116 | + |
| 117 | +# We store the value seperately, because in case of an external t8code linkage, |
| 118 | +# its access has to be checked. |
| 119 | +CMC_WITH_T8CODE="$withval" |
99 | 120 |
|
100 | 121 | # ==========================================================
|
101 | 122 | # Check whether compilers have been set as environment
|
@@ -326,7 +347,7 @@ if test "x$CMC_WITH_T8CODE" != xno ; then
|
326 | 347 | AC_LANG_PUSH([C])
|
327 | 348 | AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
328 | 349 | [[
|
329 |
| - #include <t8_forest.h> |
| 350 | + #include <t8_forest/t8_forest.h> |
330 | 351 | ]],[[
|
331 | 352 | t8_forest_t forest;
|
332 | 353 | ]])],
|
@@ -362,7 +383,7 @@ AC_DEFINE_UNQUOTED(LIBS, ["${LIBS}"], [Libraries])
|
362 | 383 | AC_PROG_INSTALL
|
363 | 384 |
|
364 | 385 | # Initialize automake after all compilers and preprocessors have been found
|
365 |
| -AM_INIT_AUTOMAKE([subdir-objects]) |
| 386 | +AM_INIT_AUTOMAKE([parallel-tests subdir-objects]) |
366 | 387 |
|
367 | 388 | # Initialize Libtool
|
368 | 389 | LT_INIT
|
|
0 commit comments