From c4531470448cda95c79a1b5214c03e9bb0100889 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 1 Apr 2008 21:20:35 +0000 Subject: [PATCH] fix link order --- configure | 17 +++++++++-------- configure.in | 20 +++++++++++--------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/configure b/configure index f4eb281fc5..29fccbba5c 100755 --- a/configure +++ b/configure @@ -5655,14 +5655,6 @@ else HDF5="no" fi - if test "x${HDF5}" = "xyes"; then - if test "x${HDF5_PREFIX}" = "x"; then - GMSH_LIBS="${GMSH_LIBS} -lhdf5" - else - GMSH_LIBS="${GMSH_LIBS} -L${HDF5_PREFIX}/lib -lhdf5" - FLAGS="${FLAGS} -I${HDF5_PREFIX}/include" - fi - fi fi fi @@ -5744,6 +5736,15 @@ fi fi fi +if test "x${HDF5}" = "xyes"; then + if test "x${HDF5_PREFIX}" = "x"; then + GMSH_LIBS="${GMSH_LIBS} -lhdf5" + else + GMSH_LIBS="${GMSH_LIBS} -L${HDF5_PREFIX}/lib -lhdf5" + FLAGS="${FLAGS} -I${HDF5_PREFIX}/include" + fi +fi + if test "x${ZLIB}" = "xyes"; then if test "x${FL_ZLIB}" = "xyes"; then FLAGS="-DHAVE_LIBZ ${FLAGS}" diff --git a/configure.in b/configure.in index b1cca56e42..fd223189cd 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.150 2008-02-17 08:47:55 geuzaine Exp $ +dnl $Id: configure.in,v 1.151 2008-04-01 21:20:35 geuzaine Exp $ dnl dnl Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle dnl @@ -657,14 +657,6 @@ if test "x${ZLIB}" = "xyes"; then LDFLAGS="-L${HDF5_PREFIX}/lib ${LDFLAGS}" fi AC_CHECK_LIB(hdf5,main,HDF5="yes",HDF5="no") - if test "x${HDF5}" = "xyes"; then - if test "x${HDF5_PREFIX}" = "x"; then - GMSH_LIBS="${GMSH_LIBS} -lhdf5" - else - GMSH_LIBS="${GMSH_LIBS} -L${HDF5_PREFIX}/lib -lhdf5" - FLAGS="${FLAGS} -I${HDF5_PREFIX}/include" - fi - fi fi fi @@ -687,6 +679,16 @@ if test "x${HDF5}" = "xyes"; then fi fi +dnl Complete HDF5 link line (zlib must be linked in after libmed) +if test "x${HDF5}" = "xyes"; then + if test "x${HDF5_PREFIX}" = "x"; then + GMSH_LIBS="${GMSH_LIBS} -lhdf5" + else + GMSH_LIBS="${GMSH_LIBS} -L${HDF5_PREFIX}/lib -lhdf5" + FLAGS="${FLAGS} -I${HDF5_PREFIX}/include" + fi +fi + dnl Complete zlib link line (zlib must be linked in after libpng and libhdf5) if test "x${ZLIB}" = "xyes"; then dnl If provided by FLTK, use that one; otherwise, look for it -- GitLab