Don't set {GLPK,CPLEX}_{CFLAGS,LIBS} if the check fails.
authorladanyi
Sun, 24 Apr 2005 22:26:37 +0000
changeset 138549d1ca28ebd8
parent 1384 0c4091eeda15
child 1386 324c291a8daf
Don't set {GLPK,CPLEX}_{CFLAGS,LIBS} if the check fails.
config/lp.m4
     1.1 --- a/config/lp.m4	Sat Apr 23 17:14:49 2005 +0000
     1.2 +++ b/config/lp.m4	Sun Apr 24 22:26:37 2005 +0000
     1.3 @@ -30,9 +30,9 @@
     1.4      fi
     1.5      GLPK_LIBS="-lglpk"
     1.6  
     1.7 -    lx_save_cxxflags="$CXXFLAGS";
     1.8 -    lx_save_ldflags="$LDFLAGS";
     1.9 -    lx_save_libs="$LIBS";
    1.10 +    lx_save_cxxflags="$CXXFLAGS"
    1.11 +    lx_save_ldflags="$LDFLAGS"
    1.12 +    lx_save_libs="$LIBS"
    1.13      CXXFLAGS="$GLPK_CFLAGS"
    1.14      LDFLAGS="$GLPK_LDFLAGS"
    1.15      LIBS="$GLPK_LIBS"
    1.16 @@ -62,6 +62,9 @@
    1.17        AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
    1.18        AC_MSG_RESULT([yes])
    1.19      else
    1.20 +      $GLPK_CFLAGS=""
    1.21 +      $GLPK_LDFLAGS=""
    1.22 +      $GLPK_LIBS=""
    1.23        AC_MSG_RESULT([no])
    1.24      fi
    1.25    fi
    1.26 @@ -104,9 +107,9 @@
    1.27      fi
    1.28      CPLEX_LIBS="-lcplex -lm -lpthread"
    1.29  
    1.30 -    lx_save_cxxflags="$CXXFLAGS";
    1.31 -    lx_save_ldflags="$LDFLAGS";
    1.32 -    lx_save_libs="$LIBS";
    1.33 +    lx_save_cxxflags="$CXXFLAGS"
    1.34 +    lx_save_ldflags="$LDFLAGS"
    1.35 +    lx_save_libs="$LIBS"
    1.36      CXXFLAGS="$CPLEX_CFLAGS"
    1.37      LDFLAGS="$CPLEX_LDFLAGS"
    1.38      LIBS="$CPLEX_LIBS"
    1.39 @@ -118,7 +121,7 @@
    1.40  
    1.41        int main(int argc, char* argv[])
    1.42        {
    1.43 -	CPXENVptr env = NULL;
    1.44 +        CPXENVptr env = NULL;
    1.45          return 0;
    1.46        }'
    1.47  
    1.48 @@ -134,6 +137,9 @@
    1.49        AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
    1.50        AC_MSG_RESULT([yes])
    1.51      else
    1.52 +      $CPLEX_CFLAGS=""
    1.53 +      $CPLEX_LDFLAGS=""
    1.54 +      $CPLEX_LIBS=""
    1.55        AC_MSG_RESULT([no])
    1.56      fi
    1.57    fi