From b447b5dcd00e38da8303971fe8cb9b393b03c534 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 18 Feb 2003 08:52:40 +0000 Subject: [PATCH] Print more informative messages for Triangle, GSL, etc. --- Makefile | 6 ++-- configure | 79 +++++++++++++++++++++++++++++++-------------------- configure.in | 80 +++++++++++++++++++++++++++++++--------------------- variables.in | 2 +- 4 files changed, 100 insertions(+), 67 deletions(-) diff --git a/Makefile b/Makefile index e69deabdc2..2128226dbe 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.261 2003-02-18 06:34:14 geuzaine Exp $ +# $Id: Makefile,v 1.262 2003-02-18 08:52:40 geuzaine Exp $ include variables @@ -32,10 +32,10 @@ install: variables -cp doc/gmsh.1 ${mandir}/man1 variables: configure - @echo "*******************************************************************" + @echo "********************************************************************" @echo "Please configure Gmsh by running ./configure" @echo "For help, type ./configure --help" - @echo "*******************************************************************" + @echo "********************************************************************" @exit 1 source: diff --git a/configure b/configure index fe686f4fc2..6cb4e3b5a0 100755 --- a/configure +++ b/configure @@ -2338,6 +2338,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu FLAGS="" +INCLS="" OPTIM="${CXXFLAGS}" ac_ext=c @@ -2828,7 +2829,7 @@ echo "$as_me: error: Could not find fltk-config. Try --with-fltk-prefix?" >&2;} { (exit 1); exit 1; }; } fi GMSH_LIBS="${GMSH_LIBS} `$FLTKCONFIG --use-gl --use-images --ldflags`" - FLAGS="${FLAGS} `$FLTKCONFIG --use-gl --use-images --cxxflags`" + INCLS="${INCLS} `$FLTKCONFIG --use-gl --use-images --cxxflags`" if test "x${JPEG_PREFIX}" != "x"; then LDFLAGS="-L${JPEG_PREFIX} -L${JPEG_PREFIX}/lib ${LDFLAGS}" @@ -2894,7 +2895,7 @@ fi GMSH_LIBS="${GMSH_LIBS} -ljpeg" else GMSH_LIBS="${GMSH_LIBS} -L${JPEG_PREFIX} -L${JPEG_PREFIX}/lib -ljpeg" - FLAGS="${FLAGS} -I${JPEG_PREFIX} -I${JPEG_PREFIX}/include" + INCLS="${INCLS} -I${JPEG_PREFIX} -I${JPEG_PREFIX}/include" fi fi @@ -2928,23 +2929,35 @@ else TRIANGLE="no" fi -if test "x${TRIANGLE}" = "xyes" -a "x$enable_triangle" != "xno"; then - GMSH_DIRS="${GMSH_DIRS} Triangle" - GMSH_LIBS="${GMSH_LIBS} -lGmshTriangle" - FLAGS="${FLAGS} -DHAVE_TRIANGLE" +if test "x${TRIANGLE}" = "xyes"; then + if test "x$enable_triangle" != "xno"; then + GMSH_DIRS="${GMSH_DIRS} Triangle" + GMSH_LIBS="${GMSH_LIBS} -lGmshTriangle" + FLAGS="${FLAGS} -DHAVE_TRIANGLE" + echo "********************************************************************" + echo "You are building a version of Gmsh that contains Jonathan" + echo "Shewchuk's Triangle as an alternative isotropic 2D mesh generator." + echo "Please note that by doing so, you agree to Triangle's licencing" + echo "requirements stated in ./Triangle/README. (Most notably, you can" + echo "only redistribute Gmsh if no compensation is received.)" + echo "To disable Triangle, run configure again with the --disable-triangle" + echo "option." + echo "********************************************************************" + fi else - echo "*******************************************************************" - echo "If you want to use Jonathan Shewchuk's Triangle as an alternative" - echo "isotropic 2D mesh generator, please download Triangle from the" - echo "author's web site at http://www.cs.cmu.edu/~quake/triangle.html," - echo "unpack the archive and copy the two files 'triangle.c' and" - echo "'triangle.h' in the ./Triangle subdirectory. Then run ./configure" - echo "again." - echo "" - echo "Please note that by doing so, you agree to Triangle's licencing" - echo "requirements stated in ./Triangle/README. (Most notably, you may" - echo "then only redistribute Gmsh if no compensation is received.)" - echo "*******************************************************************" + if test "x$enable_triangle" != "xno"; then + echo "********************************************************************" + echo "If you want to use Jonathan Shewchuk's Triangle as an alternative" + echo "isotropic 2D mesh generator, please download Triangle from the" + echo "author's web site at http://www.cs.cmu.edu/~quake/triangle.html," + echo "unpack the archive and copy the two files 'triangle.c' and" + echo "'triangle.h' in the ./Triangle subdirectory. Then run ./configure" + echo "again." + echo "Please note that by doing so, you agree to Triangle's licencing" + echo "requirements stated in ./Triangle/README. (Most notably, you may" + echo "then only redistribute Gmsh if no compensation is received.)" + echo "********************************************************************" + fi fi if test "x$enable_gsl" = "xyes"; then @@ -3071,7 +3084,7 @@ fi GMSH_LIBS="${GMSH_LIBS} -lgsl -lgslcblas" else GMSH_LIBS="${GMSH_LIBS} -L${GSL_PREFIX}/lib -lgsl -lgslcblas" - FLAGS="${FLAGS} -I${GSL_PREFIX}/include" + INCLS="${INCLS} -I${GSL_PREFIX}/include" fi fi fi @@ -3100,25 +3113,27 @@ else fi if test "x${NR}" = "xyes"; then - echo "*******************************************************************" - echo "You are building a non-free version of Gmsh, using some code" - echo "copyrighted by Numerical Recipes." - echo "*******************************************************************" + echo "********************************************************************" + echo "You are building a non-free version of Gmsh, using code copyright" + echo "(C) 1986-92 Numerical Recipes Software J!0." + echo "To use the GSL instead, run configure again with the --enable-gsl" + echo "option." + echo "********************************************************************" GMSH_DIRS="${GMSH_DIRS} NR" GMSH_LIBS="${GMSH_LIBS} -lGmshNR" else - echo "*******************************************************************" + echo "********************************************************************" echo "This is the free version of Gmsh and configure could not find" echo "the GNU Scientific Library (GSL) on your system:" echo "- if it is installed in a non-standard location, please run" - echo " ./configure again with the --with-gsl-prefix option" + echo " configure again with the --with-gsl-prefix option" echo "- if it is not installed on your system, you can download it from" echo " http://sources.redhat.com/gsl/" echo "" - echo "IMPORTANT NOTE: You need to install GSL 1.2 or above. All versions" - echo "<= 1.1.1 have a bug in the singular value decomposition algorithm" - echo "that will cause Gmsh to hang during mesh generation." - echo "*******************************************************************" + echo "IMPORTANT NOTE: You need to install GSL version 1.2 or above. All" + echo "versions <= 1.1.1 have a bug in the singular value decomposition" + echo "algorithm that will cause Gmsh to hang during mesh generation." + echo "********************************************************************" { { echo "$as_me:$LINENO: error: " >&5 echo "$as_me: error: " >&2;} { (exit 1); exit 1; }; } @@ -3693,6 +3708,7 @@ done + ac_config_files="$ac_config_files variables" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -4288,6 +4304,7 @@ s,@AR@,$AR,;t t s,@FLTKCONFIG@,$FLTKCONFIG,;t t s,@UNAME@,$UNAME,;t t s,@FLAGS@,$FLAGS,;t t +s,@INCLS@,$INCLS,;t t s,@OPTIM@,$OPTIM,;t t s,@LINKER@,$LINKER,;t t s,@GMSH_DIRS@,$GMSH_DIRS,;t t @@ -4516,10 +4533,10 @@ if test "$no_create" != yes; then fi -echo "*******************************************************************" +echo "********************************************************************" echo "Gmsh is configured for" echo "- OS : $UNAME" echo "- OPTIM : $OPTIM" echo "- FLAGS : $FLAGS" -echo "*******************************************************************" +echo "********************************************************************" diff --git a/configure.in b/configure.in index f2a340d4fb..098bf22777 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl "$Id: configure.in,v 1.25 2003-02-18 07:09:10 geuzaine Exp $" +dnl "$Id: configure.in,v 1.26 2003-02-18 08:52:40 geuzaine Exp $" dnl dnl Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle dnl @@ -70,6 +70,7 @@ AC_PROG_CXX dnl Set default flags FLAGS="" +INCLS="" OPTIM="${CXXFLAGS}" dnl Check for various programs @@ -111,7 +112,7 @@ if test "x$enable_gui" != "xno"; then AC_MSG_ERROR(Could not find fltk-config. Try --with-fltk-prefix?) fi GMSH_LIBS="${GMSH_LIBS} `$FLTKCONFIG --use-gl --use-images --ldflags`" - FLAGS="${FLAGS} `$FLTKCONFIG --use-gl --use-images --cxxflags`" + INCLS="${INCLS} `$FLTKCONFIG --use-gl --use-images --cxxflags`" dnl Check if libjpeg is available to enable/disable gl2jpg if test "x${JPEG_PREFIX}" != "x"; then @@ -125,7 +126,7 @@ if test "x$enable_gui" != "xno"; then else dnl Find the libs/includes even if libjpeg is _not_ properly installed (ugly hack!) GMSH_LIBS="${GMSH_LIBS} -L${JPEG_PREFIX} -L${JPEG_PREFIX}/lib -ljpeg" - FLAGS="${FLAGS} -I${JPEG_PREFIX} -I${JPEG_PREFIX}/include" + INCLS="${INCLS} -I${JPEG_PREFIX} -I${JPEG_PREFIX}/include" fi fi @@ -138,23 +139,35 @@ fi dnl Check if Triangle is installed AC_CHECK_FILE(./Triangle/triangle.c, TRIANGLE="yes", TRIANGLE="no") -if test "x${TRIANGLE}" = "xyes" -a "x$enable_triangle" != "xno"; then - GMSH_DIRS="${GMSH_DIRS} Triangle" - GMSH_LIBS="${GMSH_LIBS} -lGmshTriangle" - FLAGS="${FLAGS} -DHAVE_TRIANGLE" +if test "x${TRIANGLE}" = "xyes"; then + if test "x$enable_triangle" != "xno"; then + GMSH_DIRS="${GMSH_DIRS} Triangle" + GMSH_LIBS="${GMSH_LIBS} -lGmshTriangle" + FLAGS="${FLAGS} -DHAVE_TRIANGLE" + echo "********************************************************************" + echo "You are building a version of Gmsh that contains Jonathan" + echo "Shewchuk's Triangle as an alternative isotropic 2D mesh generator." + echo "Please note that by doing so, you agree to Triangle's licencing" + echo "requirements stated in ./Triangle/README. (Most notably, you can" + echo "only redistribute Gmsh if no compensation is received.)" + echo "To disable Triangle, run configure again with the --disable-triangle" + echo "option." + echo "********************************************************************" + fi else - echo "*******************************************************************" - echo "If you want to use Jonathan Shewchuk's Triangle as an alternative" - echo "isotropic 2D mesh generator, please download Triangle from the" - echo "author's web site at http://www.cs.cmu.edu/~quake/triangle.html," - echo "unpack the archive and copy the two files 'triangle.c' and" - echo "'triangle.h' in the ./Triangle subdirectory. Then run ./configure" - echo "again." - echo "" - echo "Please note that by doing so, you agree to Triangle's licencing" - echo "requirements stated in ./Triangle/README. (Most notably, you may" - echo "then only redistribute Gmsh if no compensation is received.)" - echo "*******************************************************************" + if test "x$enable_triangle" != "xno"; then + echo "********************************************************************" + echo "If you want to use Jonathan Shewchuk's Triangle as an alternative" + echo "isotropic 2D mesh generator, please download Triangle from the" + echo "author's web site at http://www.cs.cmu.edu/~quake/triangle.html," + echo "unpack the archive and copy the two files 'triangle.c' and" + echo "'triangle.h' in the ./Triangle subdirectory. Then run ./configure" + echo "again." + echo "Please note that by doing so, you agree to Triangle's licencing" + echo "requirements stated in ./Triangle/README. (Most notably, you may" + echo "then only redistribute Gmsh if no compensation is received.)" + echo "********************************************************************" + fi fi dnl Check for GSL @@ -171,7 +184,7 @@ if test "x$enable_gsl" = "xyes"; then GMSH_LIBS="${GMSH_LIBS} -lgsl -lgslcblas" else GMSH_LIBS="${GMSH_LIBS} -L${GSL_PREFIX}/lib -lgsl -lgslcblas" - FLAGS="${FLAGS} -I${GSL_PREFIX}/include" + INCLS="${INCLS} -I${GSL_PREFIX}/include" fi fi fi @@ -179,25 +192,27 @@ if test "x${GSL}" != "xyes"; then dnl Check if non-free numerical recipes routines are in the tree AC_CHECK_FILE(./NR/dsvdcmp.cpp,NR="yes",NR="no") if test "x${NR}" = "xyes"; then - echo "*******************************************************************" - echo "You are building a non-free version of Gmsh, using some code" - echo "copyrighted by Numerical Recipes." - echo "*******************************************************************" + echo "********************************************************************" + echo "You are building a non-free version of Gmsh, using code copyright" + echo "(C) 1986-92 Numerical Recipes Software J!0." + echo "To use the GSL instead, run configure again with the --enable-gsl" + echo "option." + echo "********************************************************************" GMSH_DIRS="${GMSH_DIRS} NR" GMSH_LIBS="${GMSH_LIBS} -lGmshNR" else - echo "*******************************************************************" + echo "********************************************************************" echo "This is the free version of Gmsh and configure could not find" echo "the GNU Scientific Library (GSL) on your system:" echo "- if it is installed in a non-standard location, please run" - echo " ./configure again with the --with-gsl-prefix option" + echo " configure again with the --with-gsl-prefix option" echo "- if it is not installed on your system, you can download it from" echo " http://sources.redhat.com/gsl/" echo "" - echo "IMPORTANT NOTE: You need to install GSL 1.2 or above. All versions" - echo "<= 1.1.1 have a bug in the singular value decomposition algorithm" - echo "that will cause Gmsh to hang during mesh generation." - echo "*******************************************************************" + echo "IMPORTANT NOTE: You need to install GSL version 1.2 or above. All" + echo "versions <= 1.1.1 have a bug in the singular value decomposition" + echo "algorithm that will cause Gmsh to hang during mesh generation." + echo "********************************************************************" AC_MSG_ERROR() fi fi @@ -263,6 +278,7 @@ AC_CHECK_HEADERS(sys/time.h sys/resource.h) dnl Write output AC_SUBST(UNAME) AC_SUBST(FLAGS) +AC_SUBST(INCLS) AC_SUBST(OPTIM) AC_SUBST(LINKER) AC_SUBST(GMSH_DIRS) @@ -272,10 +288,10 @@ AC_SUBST(AR) AC_OUTPUT(variables) dnl Print some information -echo "*******************************************************************" +echo "********************************************************************" echo "Gmsh is configured for" echo "- OS : $UNAME" echo "- OPTIM : $OPTIM" echo "- FLAGS : $FLAGS" -echo "*******************************************************************" +echo "********************************************************************" diff --git a/variables.in b/variables.in index 9bf9eebca4..f5a74e11d5 100644 --- a/variables.in +++ b/variables.in @@ -7,7 +7,7 @@ CXX=@CXX@ LINKER=@LINKER@ # Compiler flags -FLAGS=@FLAGS@ +FLAGS=@FLAGS@ @INCLS@ OPTIM=@OPTIM@ # Gmsh subdirectories and libraries -- GitLab