- separate file for each m4 script
authorladanyi
Tue, 14 Jun 2005 20:01:41 +0000
changeset 1489f7e9cc3bc2da
parent 1488 92755f9a4e2a
child 1490 fa2b73784343
- separate file for each m4 script
- consistent naming
- removed cxxflags.m4
Makefile.am
config/cxxflags.m4
config/lp.m4
config/lx_check_cplex.m4
config/lx_check_glpk.m4
config/lx_enable_doc.m4
config/lx_enable_gui.m4
config/misc.m4
configure.ac
     1.1 --- a/Makefile.am	Tue Jun 14 19:19:59 2005 +0000
     1.2 +++ b/Makefile.am	Tue Jun 14 20:01:41 2005 +0000
     1.3 @@ -4,12 +4,13 @@
     1.4  	LICENSE \
     1.5  	lemon.spec \
     1.6  	autopackage/default.apspec.in \
     1.7 +	config/lx_check_cplex.m4 \
     1.8 +	config/lx_check_glpk.m4 \
     1.9  	config/lx_docdir_suffix.m4 \
    1.10 -	config/cxxflags.m4 \
    1.11 -	config/lp.m4 \
    1.12 -	config/misc.m4
    1.13 +	config/lx_enable_doc.m4 \
    1.14 +	config/lx_enable_gui.m4
    1.15  
    1.16 -if WANT_DOCS
    1.17 +if WANT_DOC
    1.18    MAYBE_DOC = doc
    1.19  endif
    1.20  if WANT_GUI
     2.1 --- a/config/cxxflags.m4	Tue Jun 14 19:19:59 2005 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,130 +0,0 @@
     2.4 -dnl LX_C_IFDEF(MACRO-NAME, ACTION-IF-DEF, ACTION-IF-NOT-DEF)
     2.5 -dnl
     2.6 -dnl Check for the definition of macro MACRO-NAME using the current
     2.7 -dnl language's compiler.
     2.8 -dnl
     2.9 -dnl Orignally written by Ludovic Courtès <ludo@chbouib.org>
    2.10 -AC_DEFUN([LX_C_IFDEF],
    2.11 -  [AC_COMPILE_IFELSE([#ifndef $1
    2.12 -                      # error "Macro $1 is undefined!"
    2.13 -                      /* For some compilers (eg. SGI's CC), #error is not
    2.14 -                         enough...  */
    2.15 -                      please, do fail
    2.16 -                      #endif],
    2.17 -                     [$2], [$3])])
    2.18 -
    2.19 -
    2.20 -dnl LX_CXX_COMPILER_VENDOR(VENDOR-NAME, [NICKNAME])
    2.21 -dnl
    2.22 -dnl Set VENDOR-NAME to the lower-case name of the compiler vendor or
    2.23 -dnl `unknown' if the compiler's vendor is unknown. `compaq' means the
    2.24 -dnl CXX compiler as available on Tru64/OSF1/Digital Unix on Alpha
    2.25 -dnl machines. If NICKNAME is provided, set it to the compiler's usual
    2.26 -dnl name (eg. `g++', `cxx', `aCC', etc.).
    2.27 -dnl
    2.28 -dnl Based on work of Ludovic Courtès <ludo@chbouib.org>
    2.29 -AC_DEFUN([LX_CXX_COMPILER_VENDOR],
    2.30 -  [AC_REQUIRE([AC_PROG_CXX])
    2.31 -   AC_REQUIRE([AC_PROG_CXXCPP])
    2.32 -   AC_CACHE_CHECK([the C++ compiler vendor],
    2.33 -    [lx_cv_cxx_compiler_vendor],
    2.34 -
    2.35 -    [AC_LANG_PUSH([C++])
    2.36 -
    2.37 -     dnl Intel's icpc
    2.38 -     LX_C_IFDEF([__INTEL_COMPILER],
    2.39 -       [lx_cv_cxx_compiler_vendor=intel],
    2.40 -       [dnl GNU C++
    2.41 -        LX_C_IFDEF([__GNUG__],
    2.42 -         [lx_cv_cxx_compiler_vendor=gnu],
    2.43 -         [LX_C_IFDEF([__DECCXX],
    2.44 -           [lx_cv_cxx_compiler_vendor=compaq],
    2.45 -           [dnl HP's aCC
    2.46 -            LX_C_IFDEF([__HP_aCC],
    2.47 -             [lx_cv_cxx_compiler_vendor=hp],
    2.48 -             [dnl SGI CC
    2.49 -              LX_C_IFDEF([__sgi],
    2.50 -               [lx_cv_cxx_compiler_vendor=sgi],
    2.51 -               [dnl Note:  We are using the C compiler because VC++ doesn't
    2.52 -                dnl recognize `.cc'(which is used by `configure') as a C++ file
    2.53 -                dnl extension and requires `/TP' to be passed.
    2.54 -                AC_LANG_PUSH([C])
    2.55 -                LX_C_IFDEF([_MSC_VER],
    2.56 -                  [lx_cv_cxx_compiler_vendor=microsoft],
    2.57 -                  [lx_cv_cxx_compiler_vendor=unknown])
    2.58 -                AC_LANG_POP()])])])])])
    2.59 -
    2.60 -     AC_LANG_POP()])
    2.61 -   $1="$lx_cv_cxx_compiler_vendor"
    2.62 -
    2.63 -   dnl The compiler nickname
    2.64 -   ifelse([$2], , [],
    2.65 -     [case "$lx_cv_cxx_compiler_vendor" in
    2.66 -        intel)     $2=icpc;;
    2.67 -        gnu)       $2=g++;;
    2.68 -        compaq)    $2=cxx;;
    2.69 -        hp)        $2=aCC;;
    2.70 -        sgi)       $2=CC;;
    2.71 -        microsoft) $2=cl;;
    2.72 -        *)         $2=unknown;;
    2.73 -      esac])])
    2.74 -
    2.75 -
    2.76 -dnl Set some debugging and error reporting related compiler flags.
    2.77 -dnl uses lx_user_cxxflags
    2.78 -AC_DEFUN([LX_SET_CXXFLAGS],
    2.79 -  [AC_ARG_ENABLE([debug],
    2.80 -AS_HELP_STRING([--enable-debug@<:@=yes|no|full@:>@], [build with debugging support])
    2.81 -AS_HELP_STRING([--disable-debug], [build without debugging support @<:@default@:>@]),
    2.82 -     [], [enable_debug=no])
    2.83 -   LX_CXX_COMPILER_VENDOR([lx_cxx_compiler_vendor])
    2.84 -   AC_MSG_CHECKING([whether to build with debugging support])
    2.85 -   if test x"$enable_debug" != x"no"; then
    2.86 -     AC_DEFINE([DEBUG], [1], [Define for debugging support])
    2.87 -
    2.88 -     lx_gnu_cxxflags="-ansi -pedantic -Wall -Wextra"
    2.89 -     lx_intel_cxxflags="-g"
    2.90 -     lx_unknown_cxxflags="-g"
    2.91 -
    2.92 -     if test x"$enable_debug" = x"yes"; then
    2.93 -       lx_gnu_cxxflags="-g $lx_gnu_cxxflags"
    2.94 -       AC_MSG_RESULT([yes])
    2.95 -     else
    2.96 -       lx_gnu_cxxflags="-g3 --no-inline $lx_gnu_cxxflags"
    2.97 -       AC_MSG_RESULT([full])
    2.98 -     fi
    2.99 -
   2.100 -     if test x"$lx_cxx_compiler_vendor" = x"gnu"; then
   2.101 -       CXXFLAGS="$lx_user_cxxflags $lx_gnu_cxxflags"
   2.102 -     elif test x"$lx_cxx_compiler_vendor" = x"intel"; then
   2.103 -       CXXFLAGS="$lx_user_cxxflags $lx_intel_cxxflags"
   2.104 -     else
   2.105 -       CXXFLAGS="$lx_user_cxxflags $lx_unknown_cxxflags"
   2.106 -     fi
   2.107 -   else
   2.108 -     AC_MSG_RESULT([no])
   2.109 -   fi
   2.110 -
   2.111 -   AC_ARG_ENABLE([extra-warnings],
   2.112 -AS_HELP_STRING([--enable-extra-warnings], [enable extra warning messages])
   2.113 -AS_HELP_STRING([--disable-extra-warnings], [disable extra warning messages @<:@default@:>@]),
   2.114 -     [],[enable_extra_warnings=no])
   2.115 -   AC_MSG_CHECKING(whether to enable extra warning flags)
   2.116 -   if test x"$enable_extra_warnings" != x"no"; then
   2.117 -     if test x"$lx_cxx_compiler_vendor" = x"gnu"; then
   2.118 -       CXXFLAGS="$CXXFLAGS -ansi -pedantic -Wall -Wextra"
   2.119 -       CXXFLAGS="$CXXFLAGS -Wfloat-equal -Wundef -Wendif-labels -Wshadow"
   2.120 -       CXXFLAGS="$CXXFLAGS -Wpointer-arith -Wcast-qual -Wcast-align"
   2.121 -       CXXFLAGS="$CXXFLAGS -Wwrite-strings -Wconversion -Waggregate-return"
   2.122 -       CXXFLAGS="$CXXFLAGS -Wmissing-noreturn -Wmissing-format-attribute"
   2.123 -       CXXFLAGS="$CXXFLAGS -Wpacked -Wpadded -Wredundant-decls"
   2.124 -       CXXFLAGS="$CXXFLAGS -Wunreachable-code -Winline -Winvalid-pch"
   2.125 -       CXXFLAGS="$CXXFLAGS -Wlong-long -Wdisabled-optimization"
   2.126 -       CXXFLAGS="$CXXFLAGS -Wstack-protector"
   2.127 -     elif test x"$lx_cxx_compiler_vendor" = x"intel"; then
   2.128 -       CXXFLAGS="$CXXFLAGS -w2"
   2.129 -     fi
   2.130 -     AC_MSG_RESULT([yes])
   2.131 -   else
   2.132 -     AC_MSG_RESULT([no])
   2.133 -   fi])
     3.1 --- a/config/lp.m4	Tue Jun 14 19:19:59 2005 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,150 +0,0 @@
     3.4 -AC_DEFUN([LX_CHECK_GLPK],
     3.5 -[
     3.6 -  AC_ARG_WITH([glpk],
     3.7 -AS_HELP_STRING([--with-glpk@<:@=PREFIX@:>@], [search for GLPK under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
     3.8 -AS_HELP_STRING([--without-glpk], [disable checking for GLPK]),
     3.9 -              [], [with_glpk=yes])
    3.10 -
    3.11 -  AC_ARG_WITH([glpk-includedir],
    3.12 -AS_HELP_STRING([--with-glpk-includedir=DIR], [search for GLPK headers in DIR]),
    3.13 -              [], [with_glpk_includedir=no])
    3.14 -
    3.15 -  AC_ARG_WITH([glpk-libdir],
    3.16 -AS_HELP_STRING([--with-glpk-libdir=DIR], [search for GLPK libraries in DIR]),
    3.17 -              [], [with_glpk_libdir=no])
    3.18 -
    3.19 -  lx_glpk_found=no
    3.20 -  if test x"$with_glpk" != x"no"; then
    3.21 -    AC_MSG_CHECKING([for GLPK])
    3.22 -
    3.23 -    if test x"$with_glpk_includedir" != x"no"; then
    3.24 -      GLPK_CFLAGS="-I$with_glpk_includedir"
    3.25 -    elif test x"$with_glpk" != x"yes"; then
    3.26 -      GLPK_CFLAGS="-I$with_glpk/include"
    3.27 -    fi
    3.28 -
    3.29 -    if test x"$with_glpk_libdir" != x"no"; then
    3.30 -      GLPK_LDFLAGS="-L$with_glpk_libdir"
    3.31 -    elif test x"$with_glpk" != x"yes"; then
    3.32 -      GLPK_LDFLAGS="-L$with_glpk/lib"
    3.33 -    fi
    3.34 -    GLPK_LIBS="-lglpk"
    3.35 -
    3.36 -    lx_save_cxxflags="$CXXFLAGS"
    3.37 -    lx_save_ldflags="$LDFLAGS"
    3.38 -    lx_save_libs="$LIBS"
    3.39 -    CXXFLAGS="$GLPK_CFLAGS"
    3.40 -    LDFLAGS="$GLPK_LDFLAGS"
    3.41 -    LIBS="$GLPK_LIBS"
    3.42 -
    3.43 -    lx_glpk_test_prog='
    3.44 -      extern "C" {
    3.45 -      #include <glpk.h>
    3.46 -      }
    3.47 -
    3.48 -      int main(int argc, char* argv[])
    3.49 -      {
    3.50 -        LPX *lp;
    3.51 -        lp = lpx_create_prob();
    3.52 -        lpx_delete_prob(lp);
    3.53 -        return 0;
    3.54 -      }'
    3.55 -
    3.56 -    AC_LANG_PUSH(C++)
    3.57 -    AC_LINK_IFELSE([$lx_glpk_test_prog], [lx_glpk_found=yes], [lx_glpk_found=no])
    3.58 -    AC_LANG_POP(C++)
    3.59 -
    3.60 -    CXXFLAGS="$lx_save_cxxflags"
    3.61 -    LDFLAGS="$lx_save_ldflags"
    3.62 -    LIBS="$lx_save_libs"
    3.63 -
    3.64 -    if test x"$lx_glpk_found" = x"yes"; then
    3.65 -      AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
    3.66 -      AC_MSG_RESULT([yes])
    3.67 -    else
    3.68 -      GLPK_CFLAGS=""
    3.69 -      GLPK_LDFLAGS=""
    3.70 -      GLPK_LIBS=""
    3.71 -      AC_MSG_RESULT([no])
    3.72 -    fi
    3.73 -  fi
    3.74 -  GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS"
    3.75 -  AC_SUBST(GLPK_CFLAGS)
    3.76 -  AC_SUBST(GLPK_LIBS)
    3.77 -  AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"])
    3.78 -])
    3.79 -
    3.80 -
    3.81 -AC_DEFUN([LX_CHECK_CPLEX],
    3.82 -[
    3.83 -  AC_ARG_WITH([cplex],
    3.84 -AS_HELP_STRING([--with-cplex@<:@=PREFIX@:>@], [search for CPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
    3.85 -AS_HELP_STRING([--without-cplex], [disable checking for CPLEX]),
    3.86 -              [], [with_cplex=yes])
    3.87 -
    3.88 -  AC_ARG_WITH([cplex-includedir],
    3.89 -AS_HELP_STRING([--with-cplex-includedir=DIR], [search for CPLEX headers in DIR]),
    3.90 -              [], [with_cplex_includedir=no])
    3.91 -
    3.92 -  AC_ARG_WITH([cplex-libdir],
    3.93 -AS_HELP_STRING([--with-cplex-libdir=DIR], [search for CPLEX libraries in DIR]),
    3.94 -              [], [with_cplex_libdir=no])
    3.95 -
    3.96 -  lx_cplex_found=no
    3.97 -  if test x"$with_cplex" != x"no"; then
    3.98 -    AC_MSG_CHECKING([for CPLEX])
    3.99 -
   3.100 -    if test x"$with_cplex_includedir" != x"no"; then
   3.101 -      CPLEX_CFLAGS="-I$with_cplex_includedir"
   3.102 -    elif test x"$with_cplex" != x"yes"; then
   3.103 -      CPLEX_CFLAGS="-I$with_cplex/include"
   3.104 -    fi
   3.105 -
   3.106 -    if test x"$with_cplex_libdir" != x"no"; then
   3.107 -      CPLEX_LDFLAGS="-L$with_cplex_libdir"
   3.108 -    elif test x"$with_cplex" != x"yes"; then
   3.109 -      CPLEX_LDFLAGS="-L$with_cplex/lib"
   3.110 -    fi
   3.111 -    CPLEX_LIBS="-lcplex -lm -lpthread"
   3.112 -
   3.113 -    lx_save_cxxflags="$CXXFLAGS"
   3.114 -    lx_save_ldflags="$LDFLAGS"
   3.115 -    lx_save_libs="$LIBS"
   3.116 -    CXXFLAGS="$CPLEX_CFLAGS"
   3.117 -    LDFLAGS="$CPLEX_LDFLAGS"
   3.118 -    LIBS="$CPLEX_LIBS"
   3.119 -
   3.120 -    lx_cplex_test_prog='
   3.121 -      extern "C" {
   3.122 -      #include <ilcplex/cplex.h>
   3.123 -      }
   3.124 -
   3.125 -      int main(int argc, char* argv[])
   3.126 -      {
   3.127 -        CPXENVptr env = NULL;
   3.128 -        return 0;
   3.129 -      }'
   3.130 -
   3.131 -    AC_LANG_PUSH(C++)
   3.132 -    AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no])
   3.133 -    AC_LANG_POP(C++)
   3.134 -
   3.135 -    CXXFLAGS="$lx_save_cxxflags"
   3.136 -    LDFLAGS="$lx_save_ldflags"
   3.137 -    LIBS="$lx_save_libs"
   3.138 -
   3.139 -    if test x"$lx_cplex_found" = x"yes"; then
   3.140 -      AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
   3.141 -      AC_MSG_RESULT([yes])
   3.142 -    else
   3.143 -      CPLEX_CFLAGS=""
   3.144 -      CPLEX_LDFLAGS=""
   3.145 -      CPLEX_LIBS=""
   3.146 -      AC_MSG_RESULT([no])
   3.147 -    fi
   3.148 -  fi
   3.149 -  CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS"
   3.150 -  AC_SUBST(CPLEX_CFLAGS)
   3.151 -  AC_SUBST(CPLEX_LIBS)
   3.152 -  AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"])
   3.153 -])
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/config/lx_check_cplex.m4	Tue Jun 14 20:01:41 2005 +0000
     4.3 @@ -0,0 +1,73 @@
     4.4 +AC_DEFUN([LX_CHECK_CPLEX],
     4.5 +[
     4.6 +  AC_ARG_WITH([cplex],
     4.7 +AS_HELP_STRING([--with-cplex@<:@=PREFIX@:>@], [search for CPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
     4.8 +AS_HELP_STRING([--without-cplex], [disable checking for CPLEX]),
     4.9 +              [], [with_cplex=yes])
    4.10 +
    4.11 +  AC_ARG_WITH([cplex-includedir],
    4.12 +AS_HELP_STRING([--with-cplex-includedir=DIR], [search for CPLEX headers in DIR]),
    4.13 +              [], [with_cplex_includedir=no])
    4.14 +
    4.15 +  AC_ARG_WITH([cplex-libdir],
    4.16 +AS_HELP_STRING([--with-cplex-libdir=DIR], [search for CPLEX libraries in DIR]),
    4.17 +              [], [with_cplex_libdir=no])
    4.18 +
    4.19 +  lx_cplex_found=no
    4.20 +  if test x"$with_cplex" != x"no"; then
    4.21 +    AC_MSG_CHECKING([for CPLEX])
    4.22 +
    4.23 +    if test x"$with_cplex_includedir" != x"no"; then
    4.24 +      CPLEX_CFLAGS="-I$with_cplex_includedir"
    4.25 +    elif test x"$with_cplex" != x"yes"; then
    4.26 +      CPLEX_CFLAGS="-I$with_cplex/include"
    4.27 +    fi
    4.28 +
    4.29 +    if test x"$with_cplex_libdir" != x"no"; then
    4.30 +      CPLEX_LDFLAGS="-L$with_cplex_libdir"
    4.31 +    elif test x"$with_cplex" != x"yes"; then
    4.32 +      CPLEX_LDFLAGS="-L$with_cplex/lib"
    4.33 +    fi
    4.34 +    CPLEX_LIBS="-lcplex -lm -lpthread"
    4.35 +
    4.36 +    lx_save_cxxflags="$CXXFLAGS"
    4.37 +    lx_save_ldflags="$LDFLAGS"
    4.38 +    lx_save_libs="$LIBS"
    4.39 +    CXXFLAGS="$CPLEX_CFLAGS"
    4.40 +    LDFLAGS="$CPLEX_LDFLAGS"
    4.41 +    LIBS="$CPLEX_LIBS"
    4.42 +
    4.43 +    lx_cplex_test_prog='
    4.44 +      extern "C" {
    4.45 +      #include <ilcplex/cplex.h>
    4.46 +      }
    4.47 +
    4.48 +      int main(int argc, char* argv[])
    4.49 +      {
    4.50 +        CPXENVptr env = NULL;
    4.51 +        return 0;
    4.52 +      }'
    4.53 +
    4.54 +    AC_LANG_PUSH(C++)
    4.55 +    AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no])
    4.56 +    AC_LANG_POP(C++)
    4.57 +
    4.58 +    CXXFLAGS="$lx_save_cxxflags"
    4.59 +    LDFLAGS="$lx_save_ldflags"
    4.60 +    LIBS="$lx_save_libs"
    4.61 +
    4.62 +    if test x"$lx_cplex_found" = x"yes"; then
    4.63 +      AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
    4.64 +      AC_MSG_RESULT([yes])
    4.65 +    else
    4.66 +      CPLEX_CFLAGS=""
    4.67 +      CPLEX_LDFLAGS=""
    4.68 +      CPLEX_LIBS=""
    4.69 +      AC_MSG_RESULT([no])
    4.70 +    fi
    4.71 +  fi
    4.72 +  CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS"
    4.73 +  AC_SUBST(CPLEX_CFLAGS)
    4.74 +  AC_SUBST(CPLEX_LIBS)
    4.75 +  AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"])
    4.76 +])
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/config/lx_check_glpk.m4	Tue Jun 14 20:01:41 2005 +0000
     5.3 @@ -0,0 +1,75 @@
     5.4 +AC_DEFUN([LX_CHECK_GLPK],
     5.5 +[
     5.6 +  AC_ARG_WITH([glpk],
     5.7 +AS_HELP_STRING([--with-glpk@<:@=PREFIX@:>@], [search for GLPK under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
     5.8 +AS_HELP_STRING([--without-glpk], [disable checking for GLPK]),
     5.9 +              [], [with_glpk=yes])
    5.10 +
    5.11 +  AC_ARG_WITH([glpk-includedir],
    5.12 +AS_HELP_STRING([--with-glpk-includedir=DIR], [search for GLPK headers in DIR]),
    5.13 +              [], [with_glpk_includedir=no])
    5.14 +
    5.15 +  AC_ARG_WITH([glpk-libdir],
    5.16 +AS_HELP_STRING([--with-glpk-libdir=DIR], [search for GLPK libraries in DIR]),
    5.17 +              [], [with_glpk_libdir=no])
    5.18 +
    5.19 +  lx_glpk_found=no
    5.20 +  if test x"$with_glpk" != x"no"; then
    5.21 +    AC_MSG_CHECKING([for GLPK])
    5.22 +
    5.23 +    if test x"$with_glpk_includedir" != x"no"; then
    5.24 +      GLPK_CFLAGS="-I$with_glpk_includedir"
    5.25 +    elif test x"$with_glpk" != x"yes"; then
    5.26 +      GLPK_CFLAGS="-I$with_glpk/include"
    5.27 +    fi
    5.28 +
    5.29 +    if test x"$with_glpk_libdir" != x"no"; then
    5.30 +      GLPK_LDFLAGS="-L$with_glpk_libdir"
    5.31 +    elif test x"$with_glpk" != x"yes"; then
    5.32 +      GLPK_LDFLAGS="-L$with_glpk/lib"
    5.33 +    fi
    5.34 +    GLPK_LIBS="-lglpk"
    5.35 +
    5.36 +    lx_save_cxxflags="$CXXFLAGS"
    5.37 +    lx_save_ldflags="$LDFLAGS"
    5.38 +    lx_save_libs="$LIBS"
    5.39 +    CXXFLAGS="$GLPK_CFLAGS"
    5.40 +    LDFLAGS="$GLPK_LDFLAGS"
    5.41 +    LIBS="$GLPK_LIBS"
    5.42 +
    5.43 +    lx_glpk_test_prog='
    5.44 +      extern "C" {
    5.45 +      #include <glpk.h>
    5.46 +      }
    5.47 +
    5.48 +      int main(int argc, char* argv[])
    5.49 +      {
    5.50 +        LPX *lp;
    5.51 +        lp = lpx_create_prob();
    5.52 +        lpx_delete_prob(lp);
    5.53 +        return 0;
    5.54 +      }'
    5.55 +
    5.56 +    AC_LANG_PUSH(C++)
    5.57 +    AC_LINK_IFELSE([$lx_glpk_test_prog], [lx_glpk_found=yes], [lx_glpk_found=no])
    5.58 +    AC_LANG_POP(C++)
    5.59 +
    5.60 +    CXXFLAGS="$lx_save_cxxflags"
    5.61 +    LDFLAGS="$lx_save_ldflags"
    5.62 +    LIBS="$lx_save_libs"
    5.63 +
    5.64 +    if test x"$lx_glpk_found" = x"yes"; then
    5.65 +      AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
    5.66 +      AC_MSG_RESULT([yes])
    5.67 +    else
    5.68 +      GLPK_CFLAGS=""
    5.69 +      GLPK_LDFLAGS=""
    5.70 +      GLPK_LIBS=""
    5.71 +      AC_MSG_RESULT([no])
    5.72 +    fi
    5.73 +  fi
    5.74 +  GLPK_LIBS="$GLPK_LDFLAGS $GLPK_LIBS"
    5.75 +  AC_SUBST(GLPK_CFLAGS)
    5.76 +  AC_SUBST(GLPK_LIBS)
    5.77 +  AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"])
    5.78 +])
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/config/lx_enable_doc.m4	Tue Jun 14 20:01:41 2005 +0000
     6.3 @@ -0,0 +1,28 @@
     6.4 +AC_DEFUN([LX_ENABLE_DOC],
     6.5 +[
     6.6 +  AC_ARG_ENABLE([doc],
     6.7 +AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
     6.8 +AS_HELP_STRING([--disable-doc], [do not build the documentation]),
     6.9 +         [], [enable_doc=yes])
    6.10 +
    6.11 +  AC_MSG_CHECKING([whether to build the documention])
    6.12 +  case "$enable_doc" in
    6.13 +    yes)
    6.14 +      DOXYGEN_INTERNAL_DOCS=NO
    6.15 +      AC_MSG_RESULT([yes])
    6.16 +      ;;
    6.17 +    full)
    6.18 +      DOXYGEN_INTERNAL_DOCS=YES
    6.19 +      AC_MSG_RESULT([full])
    6.20 +      ;;
    6.21 +    no)
    6.22 +      DOXYGEN_INTERNAL_DOCS=NO
    6.23 +      AC_MSG_RESULT([no])
    6.24 +      ;;
    6.25 +    *)
    6.26 +      AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
    6.27 +      ;;
    6.28 +  esac
    6.29 +  AC_SUBST(DOXYGEN_INTERNAL_DOCS)
    6.30 +  AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
    6.31 +])
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/config/lx_enable_gui.m4	Tue Jun 14 20:01:41 2005 +0000
     7.3 @@ -0,0 +1,18 @@
     7.4 +AC_DEFUN([LX_ENABLE_GUI],
     7.5 +[
     7.6 +  AC_ARG_ENABLE([gui],
     7.7 +AS_HELP_STRING([--enable-gui], [build the GUI])
     7.8 +AS_HELP_STRING([--disable-gui], [do not build the GUI @<:@default@:>@]),
     7.9 +         [], [enable_gui=no])
    7.10 +
    7.11 +  AC_MSG_CHECKING([whether to build the GUI])
    7.12 +  if test x"$enable_gui" != x"no"; then
    7.13 +      AC_MSG_RESULT([yes])
    7.14 +  else
    7.15 +      AC_MSG_RESULT([no])
    7.16 +  fi
    7.17 +  if test x"$enable_gui" != x"no"; then
    7.18 +    PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0])
    7.19 +  fi
    7.20 +  AM_CONDITIONAL([WANT_GUI], [test x"$enable_gui" != x"no"])
    7.21 +])
     8.1 --- a/config/misc.m4	Tue Jun 14 19:19:59 2005 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,47 +0,0 @@
     8.4 -AC_DEFUN([LX_ENABLE_DOCS],
     8.5 -[
     8.6 -  AC_ARG_ENABLE([docs],
     8.7 -AS_HELP_STRING([--enable-docs@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
     8.8 -AS_HELP_STRING([--disable-docs], [do not build the documentation]),
     8.9 -         [], [enable_docs=yes])
    8.10 -
    8.11 -  AC_MSG_CHECKING([whether to build the documention])
    8.12 -  case "$enable_docs" in
    8.13 -    yes)
    8.14 -      DOXYGEN_INTERNAL_DOCS=NO
    8.15 -      AC_MSG_RESULT([yes])
    8.16 -      ;;
    8.17 -    full)
    8.18 -      DOXYGEN_INTERNAL_DOCS=YES
    8.19 -      AC_MSG_RESULT([full])
    8.20 -      ;;
    8.21 -    no)
    8.22 -      DOXYGEN_INTERNAL_DOCS=NO
    8.23 -      AC_MSG_RESULT([no])
    8.24 -      ;;
    8.25 -    *)
    8.26 -      AC_MSG_ERROR([bad value $enable_docs for option --enable-docs])
    8.27 -      ;;
    8.28 -  esac
    8.29 -  AC_SUBST(DOXYGEN_INTERNAL_DOCS)
    8.30 -  AM_CONDITIONAL([WANT_DOCS], [test x"$enable_docs" != x"no"])
    8.31 -])
    8.32 -
    8.33 -AC_DEFUN([LX_ENABLE_GUI],
    8.34 -[
    8.35 -  AC_ARG_ENABLE([gui],
    8.36 -AS_HELP_STRING([--enable-gui], [build the GUI])
    8.37 -AS_HELP_STRING([--disable-gui], [do not build the GUI @<:@default@:>@]),
    8.38 -         [], [enable_gui=no])
    8.39 -
    8.40 -  AC_MSG_CHECKING([whether to build the GUI])
    8.41 -  if test x"$enable_gui" != x"no"; then
    8.42 -      AC_MSG_RESULT([yes])
    8.43 -  else
    8.44 -      AC_MSG_RESULT([no])
    8.45 -  fi
    8.46 -  if test x"$enable_gui" != x"no"; then
    8.47 -    PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0])
    8.48 -  fi
    8.49 -  AM_CONDITIONAL([WANT_GUI], [test x"$enable_gui" != x"no"])
    8.50 -])
     9.1 --- a/configure.ac	Tue Jun 14 19:19:59 2005 +0000
     9.2 +++ b/configure.ac	Tue Jun 14 20:01:41 2005 +0000
     9.3 @@ -6,9 +6,6 @@
     9.4  AC_CONFIG_HEADERS([config.h lemon/config.h])
     9.5  AC_PREREQ([2.59])
     9.6  
     9.7 -dnl Save user defined CXXFLAGS
     9.8 -dnl lx_user_cxxflags="$CXXFLAGS"
     9.9 -
    9.10  dnl Checks for programs.
    9.11  AC_PROG_CXX
    9.12  AC_PROG_CXXCPP
    9.13 @@ -22,15 +19,12 @@
    9.14  
    9.15  AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
    9.16  
    9.17 -dnl This is tested only with gcc-3.4 and icc-8.0
    9.18 -dnl LX_SET_CXXFLAGS
    9.19 -
    9.20  dnl Checks for libraries.
    9.21  LX_CHECK_GLPK
    9.22  LX_CHECK_CPLEX
    9.23  
    9.24  LX_DOCDIR_SUFFIX
    9.25 -LX_ENABLE_DOCS
    9.26 +LX_ENABLE_DOC
    9.27  LX_ENABLE_GUI
    9.28  
    9.29  dnl Checks for header files.