$(LIBDIR)/libbase$(shared-lib-suffix): $(o-files)
@echo "=====base=============optimized==$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files) $(extra-o-files)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(o-files) $(extra-o-files)
$(LIBDIR)/libbase.g$(shared-lib-suffix): $(go-files)
@echo "=====base=============debug======$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files) $(extra-o-files)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(go-files) $(extra-o-files)
CC = @CC@
CC-VERSION = @CC_VERSION@
SHLIBLD = @SHLIBLD@
+SHLIBFLAGS = @SHLIBFLAGS@
AR = @AR@
RANLIB = @RANLIB@
LDFLAGS = @LDFLAGS@
AC_SUBST(CXXFLAGSO)
AC_SUBST(CXXFLAGSPIC)
AC_SUBST(SHLIBLD)
+AC_SUBST(SHLIBFLAGS)
AC_SUBST(OBJEXT)
AC_SUBST(EXEEXT)
static_lib_suffix=".a"
case "$target" in
- *-aix4* | alpha*-linux* | alpha*-osf[45]* | powerpc-apple-darwin* | hppa64-unknown-linux-gnu )
+ *-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
;;
;;
esac
+
+dnl TODO Maybe the major version number should be inserted before .dylib
+dnl (.5.dylib for example).
+case "$target" in
+ powerpc-apple-darwin* )
+ shared_lib_suffix=".dylib"
+ darwin_shared_lib="yes"
+ ;;
+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
+ powerpc-apple-darwin* )
+ SHLIBFLAGS="-dynamiclib"
+ ;;
+ esac
+
else
dnl The gcc compiler needs -static for static linking. For the case
dnl other compilers do not like this flag we should introduce a
echo " executing your programs."
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."
+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."
$(LIBDIR)/libdeal_II_1d.g$(shared-lib-suffix): $(go-files-1d)
@echo "=====deal.II====1d====debug======$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-1d) $(deplibs.g)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(go-files-1d) $(deplibs.g)
$(LIBDIR)/libdeal_II_1d$(shared-lib-suffix): $(o-files-1d)
@echo "=====deal.II====1d====optimized==$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-1d) $(deplibs.o)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(o-files-1d) $(deplibs.o)
$(LIBDIR)/libdeal_II_2d.g$(shared-lib-suffix): $(go-files-2d)
@echo "=====deal.II====2d====debug======$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-2d) $(deplibs.g)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(go-files-2d) $(deplibs.g)
$(LIBDIR)/libdeal_II_2d$(shared-lib-suffix): $(o-files-2d)
@echo "=====deal.II====2d====optimized==$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-2d) $(deplibs.o)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(o-files-2d) $(deplibs.o)
$(LIBDIR)/libdeal_II_3d.g$(shared-lib-suffix): $(go-files-3d)
@echo "=====deal.II====3d====debug======$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files-3d) $(deplibs.g)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(go-files-3d) $(deplibs.g)
$(LIBDIR)/libdeal_II_3d$(shared-lib-suffix): $(o-files-3d)
@echo "=====deal.II====3d====optimized==$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files-3d) $(deplibs.o)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(o-files-3d) $(deplibs.o)
#include <cmath>
+// Remark: The following explicit instantiations needed to be moved to
+// this place here to work around a problem with gcc3.3 on Apple MacOSX.
+// The reason is that some of the functions instantiated here are used
+// further down; if they are not explicitly instantiated here, then the
+// compiler will do an implicit instantiation and give it internal linkage
+// (despite the later explicit instantiation that should make sure it
+// gets external linkage). To make sure the functions have external
+// linkage, we need to place the explicit instantiation before the first
+// use.
+//
+// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331
+// +++++++++++++
+
+
+template class TriaObjectAccessor<1, deal_II_dimension>;
+
+#if deal_II_dimension >= 2
+template class TriaObjectAccessor<2, deal_II_dimension>;
+#endif
+
+#if deal_II_dimension >= 3
+template class TriaObjectAccessor<3, deal_II_dimension>;
+#endif
+
/*------------------------ Functions: LineAccessor ---------------------------*/
#endif
+// Remark: The explicit instantiations for "TriaObjectAccessor" were moved
+// to the top of this source file. The reason is a slightly buggy version
+// of the Apple gcc v.3.3.
+// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331
// explicit instantiations
template class TriaAccessor<deal_II_dimension>;
-template class TriaObjectAccessor<1, deal_II_dimension>;
template class CellAccessor<deal_II_dimension>;
template class TriaRawIterator<deal_II_dimension,TriaObjectAccessor<1, deal_II_dimension> >;
template class TriaRawIterator<deal_II_dimension,CellAccessor<deal_II_dimension> >;
template class TriaActiveIterator<deal_II_dimension,CellAccessor<deal_II_dimension> >;
#if deal_II_dimension >= 2
-template class TriaObjectAccessor<2, deal_II_dimension>;
template class TriaRawIterator<deal_II_dimension,TriaObjectAccessor<2, deal_II_dimension> >;
template class TriaIterator<deal_II_dimension,TriaObjectAccessor<2, deal_II_dimension> >;
template class TriaActiveIterator<deal_II_dimension,TriaObjectAccessor<2, deal_II_dimension> >;
#endif
#if deal_II_dimension >= 3
-template class TriaObjectAccessor<3, deal_II_dimension>;
template class TriaRawIterator<deal_II_dimension,TriaObjectAccessor<3, deal_II_dimension> >;
template class TriaIterator<deal_II_dimension,TriaObjectAccessor<3, deal_II_dimension> >;
template class TriaActiveIterator<deal_II_dimension,TriaObjectAccessor<3, deal_II_dimension> >;
$(LIBDIR)/liblac$(shared-lib-suffix): $(o-files)
@echo "=====lac==============optimized==$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(o-files) $(deplibs.o)
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(o-files) $(deplibs.o)
$(LIBDIR)/liblac.g$(shared-lib-suffix): $(go-files)
@echo "=====lac==============debug======$(MT)== Linking library: $(@F)"
- @$(SHLIBLD) $(LDFLAGS) -shared -o $@ $(go-files) $(deplibs.g)
-
+ @$(SHLIBLD) $(LDFLAGS) $(SHLIBFLAGS) -o $@ $(go-files) $(deplibs.g)
clean:
#include <lac/block_sparsity_pattern.h>
+// Remark: The following explicit instantiations needed to be moved to
+// this place here to work around a problem with gcc3.3 on Apple MacOSX.
+// The reason is that some of the functions instantiated here are used
+// further down; if they are not explicitly instantiated here, then the
+// compiler will do an implicit instantiation and give it internal linkage
+// (despite the later explicit instantiation that should make sure it
+// gets external linkage). To make sure the functions have external
+// linkage, we need to place the explicit instantiation before the first
+// use.
+//
+// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331
+// +++++++++++++
+
+
+template class BlockSparsityPatternBase<SparsityPattern>;
+template class BlockSparsityPatternBase<CompressedSparsityPattern>;
+
template <class SparsityPatternBase>
BlockSparsityPatternBase<SparsityPatternBase>::BlockSparsityPatternBase ()
{}
-
-// explicit instantiations
-template class BlockSparsityPatternBase<SparsityPattern>;
-template class BlockSparsityPatternBase<CompressedSparsityPattern>;
+// Remark: The explicit instantiations for "BlockSparsityPatternBase" were moved
+// to the top of this source file. The reason is a slightly buggy version
+// of the Apple gcc v.3.3.
+// For more information, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24331