Commit 2f839a12822ce6f64d415f2106a7a9ab9e084741
1 parent
0c9fef1c
search also in $GAMMALIB directory for a valid library
Showing
1 changed file
with
15 additions
and
11 deletions
configure.ac
| @@ -239,16 +239,20 @@ LDFLAGS=$SAVED_LDFLAGS | @@ -239,16 +239,20 @@ LDFLAGS=$SAVED_LDFLAGS | ||
| 239 | # If GammaLib has not been found in any standard path then search now in a | 239 | # If GammaLib has not been found in any standard path then search now in a |
| 240 | # number of predefined locations. | 240 | # number of predefined locations. |
| 241 | if test "x$has_gammalib" = "xno"; then | 241 | if test "x$has_gammalib" = "xno"; then |
| 242 | - for i in "$ctatools_prefix" /opt/local /usr/local /usr ; do | ||
| 243 | - if test -f $i/lib64/libgamma.so -o -f $i/lib64/libgamma.so -a -d $i/include/gammalib; then | ||
| 244 | - LIBDIR_GAMMALIB=$i/lib64 | ||
| 245 | - INCDIR_GAMMALIB=$i/include/gammalib | ||
| 246 | - break | 242 | + for i in "$GAMMALIB" "$ctatools_prefix" /opt/local /usr/local /usr ; do |
| 243 | + if test -f $i/lib64/libgamma.so -o -f $i/lib64/libgamma.dylib; then | ||
| 244 | + if test -d $i/include/gammalib; then | ||
| 245 | + LIBDIR_GAMMALIB=$i/lib64 | ||
| 246 | + INCDIR_GAMMALIB=$i/include/gammalib | ||
| 247 | + break | ||
| 248 | + fi | ||
| 247 | fi | 249 | fi |
| 248 | - if test -f $i/lib/libgamma.so -o -f $i/lib/libgamma.dylib -a -d $i/include/gammalib; then | ||
| 249 | - LIBDIR_GAMMALIB=$i/lib | ||
| 250 | - INCDIR_GAMMALIB=$i/include/gammalib | ||
| 251 | - break | 250 | + if test -f $i/lib/libgamma.so -o -f $i/lib/libgamma.dylib; then |
| 251 | + if test -d $i/include/gammalib; then | ||
| 252 | + LIBDIR_GAMMALIB=$i/lib | ||
| 253 | + INCDIR_GAMMALIB=$i/include/gammalib | ||
| 254 | + break | ||
| 255 | + fi | ||
| 252 | fi | 256 | fi |
| 253 | done | 257 | done |
| 254 | if test -n "$LIBDIR_GAMMALIB" -a -n "$INCDIR_GAMMALIB"; then | 258 | if test -n "$LIBDIR_GAMMALIB" -a -n "$INCDIR_GAMMALIB"; then |
| @@ -270,8 +274,8 @@ if test "x$has_gammalib" = "xyes"; then | @@ -270,8 +274,8 @@ if test "x$has_gammalib" = "xyes"; then | ||
| 270 | else | 274 | else |
| 271 | AC_MSG_ERROR([No suitable GammaLib library found. | 275 | AC_MSG_ERROR([No suitable GammaLib library found. |
| 272 | ctatools require GammaLib for compilation, so please install GammaLib before or, | 276 | ctatools require GammaLib for compilation, so please install GammaLib before or, |
| 273 | -if you think that it is installed, provide the location of the gammalib library | ||
| 274 | -and header files by setting the LDFLAGS and CPPFLAGS environnment variables.]) | 277 | +if you think that it is installed, set the GAMMALIB environment variable to the |
| 278 | +root directory of GammaLib.]) | ||
| 275 | fi | 279 | fi |
| 276 | 280 | ||
| 277 | 281 |