[Lemon-commits] [lemon_svn] ladanyi: r1970 - in hugo/trunk: . config

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:49:09 CET 2006


Author: ladanyi
Date: Tue Jun 14 22:01:41 2005
New Revision: 1970

Added:
   hugo/trunk/config/lx_check_cplex.m4
   hugo/trunk/config/lx_check_glpk.m4
      - copied, changed from r1960, /hugo/trunk/config/lp.m4
   hugo/trunk/config/lx_enable_doc.m4
      - copied, changed from r1960, /hugo/trunk/config/misc.m4
   hugo/trunk/config/lx_enable_gui.m4
Removed:
   hugo/trunk/config/cxxflags.m4
   hugo/trunk/config/lp.m4
   hugo/trunk/config/misc.m4
Modified:
   hugo/trunk/Makefile.am
   hugo/trunk/configure.ac

Log:
 - separate file for each m4 script
 - consistent naming
 - removed cxxflags.m4


Modified: hugo/trunk/Makefile.am
==============================================================================
--- hugo/trunk/Makefile.am	(original)
+++ hugo/trunk/Makefile.am	Tue Jun 14 22:01:41 2005
@@ -4,12 +4,13 @@
 	LICENSE \
 	lemon.spec \
 	autopackage/default.apspec.in \
+	config/lx_check_cplex.m4 \
+	config/lx_check_glpk.m4 \
 	config/lx_docdir_suffix.m4 \
-	config/cxxflags.m4 \
-	config/lp.m4 \
-	config/misc.m4
+	config/lx_enable_doc.m4 \
+	config/lx_enable_gui.m4
 
-if WANT_DOCS
+if WANT_DOC
   MAYBE_DOC = doc
 endif
 if WANT_GUI

Added: hugo/trunk/config/lx_check_cplex.m4
==============================================================================
--- (empty file)
+++ hugo/trunk/config/lx_check_cplex.m4	Tue Jun 14 22:01:41 2005
@@ -0,0 +1,73 @@
+AC_DEFUN([LX_CHECK_CPLEX],
+[
+  AC_ARG_WITH([cplex],
+AS_HELP_STRING([--with-cplex@<:@=PREFIX@:>@], [search for CPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
+AS_HELP_STRING([--without-cplex], [disable checking for CPLEX]),
+              [], [with_cplex=yes])
+
+  AC_ARG_WITH([cplex-includedir],
+AS_HELP_STRING([--with-cplex-includedir=DIR], [search for CPLEX headers in DIR]),
+              [], [with_cplex_includedir=no])
+
+  AC_ARG_WITH([cplex-libdir],
+AS_HELP_STRING([--with-cplex-libdir=DIR], [search for CPLEX libraries in DIR]),
+              [], [with_cplex_libdir=no])
+
+  lx_cplex_found=no
+  if test x"$with_cplex" != x"no"; then
+    AC_MSG_CHECKING([for CPLEX])
+
+    if test x"$with_cplex_includedir" != x"no"; then
+      CPLEX_CFLAGS="-I$with_cplex_includedir"
+    elif test x"$with_cplex" != x"yes"; then
+      CPLEX_CFLAGS="-I$with_cplex/include"
+    fi
+
+    if test x"$with_cplex_libdir" != x"no"; then
+      CPLEX_LDFLAGS="-L$with_cplex_libdir"
+    elif test x"$with_cplex" != x"yes"; then
+      CPLEX_LDFLAGS="-L$with_cplex/lib"
+    fi
+    CPLEX_LIBS="-lcplex -lm -lpthread"
+
+    lx_save_cxxflags="$CXXFLAGS"
+    lx_save_ldflags="$LDFLAGS"
+    lx_save_libs="$LIBS"
+    CXXFLAGS="$CPLEX_CFLAGS"
+    LDFLAGS="$CPLEX_LDFLAGS"
+    LIBS="$CPLEX_LIBS"
+
+    lx_cplex_test_prog='
+      extern "C" {
+      #include <ilcplex/cplex.h>
+      }
+
+      int main(int argc, char* argv[])
+      {
+        CPXENVptr env = NULL;
+        return 0;
+      }'
+
+    AC_LANG_PUSH(C++)
+    AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no])
+    AC_LANG_POP(C++)
+
+    CXXFLAGS="$lx_save_cxxflags"
+    LDFLAGS="$lx_save_ldflags"
+    LIBS="$lx_save_libs"
+
+    if test x"$lx_cplex_found" = x"yes"; then
+      AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
+      AC_MSG_RESULT([yes])
+    else
+      CPLEX_CFLAGS=""
+      CPLEX_LDFLAGS=""
+      CPLEX_LIBS=""
+      AC_MSG_RESULT([no])
+    fi
+  fi
+  CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS"
+  AC_SUBST(CPLEX_CFLAGS)
+  AC_SUBST(CPLEX_LIBS)
+  AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"])
+])

Copied: hugo/trunk/config/lx_check_glpk.m4 (from r1960, /hugo/trunk/config/lp.m4)
==============================================================================
--- /hugo/trunk/config/lp.m4	(original)
+++ hugo/trunk/config/lx_check_glpk.m4	Tue Jun 14 22:01:41 2005
@@ -73,78 +73,3 @@
   AC_SUBST(GLPK_LIBS)
   AM_CONDITIONAL([HAVE_GLPK], [test x"$lx_glpk_found" = x"yes"])
 ])
-
-
-AC_DEFUN([LX_CHECK_CPLEX],
-[
-  AC_ARG_WITH([cplex],
-AS_HELP_STRING([--with-cplex@<:@=PREFIX@:>@], [search for CPLEX under PREFIX or under the default search paths if PREFIX is not given @<:@default@:>@])
-AS_HELP_STRING([--without-cplex], [disable checking for CPLEX]),
-              [], [with_cplex=yes])
-
-  AC_ARG_WITH([cplex-includedir],
-AS_HELP_STRING([--with-cplex-includedir=DIR], [search for CPLEX headers in DIR]),
-              [], [with_cplex_includedir=no])
-
-  AC_ARG_WITH([cplex-libdir],
-AS_HELP_STRING([--with-cplex-libdir=DIR], [search for CPLEX libraries in DIR]),
-              [], [with_cplex_libdir=no])
-
-  lx_cplex_found=no
-  if test x"$with_cplex" != x"no"; then
-    AC_MSG_CHECKING([for CPLEX])
-
-    if test x"$with_cplex_includedir" != x"no"; then
-      CPLEX_CFLAGS="-I$with_cplex_includedir"
-    elif test x"$with_cplex" != x"yes"; then
-      CPLEX_CFLAGS="-I$with_cplex/include"
-    fi
-
-    if test x"$with_cplex_libdir" != x"no"; then
-      CPLEX_LDFLAGS="-L$with_cplex_libdir"
-    elif test x"$with_cplex" != x"yes"; then
-      CPLEX_LDFLAGS="-L$with_cplex/lib"
-    fi
-    CPLEX_LIBS="-lcplex -lm -lpthread"
-
-    lx_save_cxxflags="$CXXFLAGS"
-    lx_save_ldflags="$LDFLAGS"
-    lx_save_libs="$LIBS"
-    CXXFLAGS="$CPLEX_CFLAGS"
-    LDFLAGS="$CPLEX_LDFLAGS"
-    LIBS="$CPLEX_LIBS"
-
-    lx_cplex_test_prog='
-      extern "C" {
-      #include <ilcplex/cplex.h>
-      }
-
-      int main(int argc, char* argv[])
-      {
-        CPXENVptr env = NULL;
-        return 0;
-      }'
-
-    AC_LANG_PUSH(C++)
-    AC_LINK_IFELSE([$lx_cplex_test_prog], [lx_cplex_found=yes], [lx_cplex_found=no])
-    AC_LANG_POP(C++)
-
-    CXXFLAGS="$lx_save_cxxflags"
-    LDFLAGS="$lx_save_ldflags"
-    LIBS="$lx_save_libs"
-
-    if test x"$lx_cplex_found" = x"yes"; then
-      AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
-      AC_MSG_RESULT([yes])
-    else
-      CPLEX_CFLAGS=""
-      CPLEX_LDFLAGS=""
-      CPLEX_LIBS=""
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  CPLEX_LIBS="$CPLEX_LDFLAGS $CPLEX_LIBS"
-  AC_SUBST(CPLEX_CFLAGS)
-  AC_SUBST(CPLEX_LIBS)
-  AM_CONDITIONAL([HAVE_CPLEX], [test x"$lx_cplex_found" = x"yes"])
-])

Copied: hugo/trunk/config/lx_enable_doc.m4 (from r1960, /hugo/trunk/config/misc.m4)
==============================================================================
--- /hugo/trunk/config/misc.m4	(original)
+++ hugo/trunk/config/lx_enable_doc.m4	Tue Jun 14 22:01:41 2005
@@ -1,12 +1,12 @@
-AC_DEFUN([LX_ENABLE_DOCS],
+AC_DEFUN([LX_ENABLE_DOC],
 [
-  AC_ARG_ENABLE([docs],
-AS_HELP_STRING([--enable-docs@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
-AS_HELP_STRING([--disable-docs], [do not build the documentation]),
-         [], [enable_docs=yes])
+  AC_ARG_ENABLE([doc],
+AS_HELP_STRING([--enable-doc@<:@=yes|no|full@:>@], [build the documentation (full enables internal documentation too) @<:@default=yes@:>@])
+AS_HELP_STRING([--disable-doc], [do not build the documentation]),
+         [], [enable_doc=yes])
 
   AC_MSG_CHECKING([whether to build the documention])
-  case "$enable_docs" in
+  case "$enable_doc" in
     yes)
       DOXYGEN_INTERNAL_DOCS=NO
       AC_MSG_RESULT([yes])
@@ -20,28 +20,9 @@
       AC_MSG_RESULT([no])
       ;;
     *)
-      AC_MSG_ERROR([bad value $enable_docs for option --enable-docs])
+      AC_MSG_ERROR([bad value $enable_doc for option --enable-doc])
       ;;
   esac
   AC_SUBST(DOXYGEN_INTERNAL_DOCS)
-  AM_CONDITIONAL([WANT_DOCS], [test x"$enable_docs" != x"no"])
-])
-
-AC_DEFUN([LX_ENABLE_GUI],
-[
-  AC_ARG_ENABLE([gui],
-AS_HELP_STRING([--enable-gui], [build the GUI])
-AS_HELP_STRING([--disable-gui], [do not build the GUI @<:@default@:>@]),
-         [], [enable_gui=no])
-
-  AC_MSG_CHECKING([whether to build the GUI])
-  if test x"$enable_gui" != x"no"; then
-      AC_MSG_RESULT([yes])
-  else
-      AC_MSG_RESULT([no])
-  fi
-  if test x"$enable_gui" != x"no"; then
-    PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0])
-  fi
-  AM_CONDITIONAL([WANT_GUI], [test x"$enable_gui" != x"no"])
+  AM_CONDITIONAL([WANT_DOC], [test x"$enable_doc" != x"no"])
 ])

Added: hugo/trunk/config/lx_enable_gui.m4
==============================================================================
--- (empty file)
+++ hugo/trunk/config/lx_enable_gui.m4	Tue Jun 14 22:01:41 2005
@@ -0,0 +1,18 @@
+AC_DEFUN([LX_ENABLE_GUI],
+[
+  AC_ARG_ENABLE([gui],
+AS_HELP_STRING([--enable-gui], [build the GUI])
+AS_HELP_STRING([--disable-gui], [do not build the GUI @<:@default@:>@]),
+         [], [enable_gui=no])
+
+  AC_MSG_CHECKING([whether to build the GUI])
+  if test x"$enable_gui" != x"no"; then
+      AC_MSG_RESULT([yes])
+  else
+      AC_MSG_RESULT([no])
+  fi
+  if test x"$enable_gui" != x"no"; then
+    PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0])
+  fi
+  AM_CONDITIONAL([WANT_GUI], [test x"$enable_gui" != x"no"])
+])

Modified: hugo/trunk/configure.ac
==============================================================================
--- hugo/trunk/configure.ac	(original)
+++ hugo/trunk/configure.ac	Tue Jun 14 22:01:41 2005
@@ -6,9 +6,6 @@
 AC_CONFIG_HEADERS([config.h lemon/config.h])
 AC_PREREQ([2.59])
 
-dnl Save user defined CXXFLAGS
-dnl lx_user_cxxflags="$CXXFLAGS"
-
 dnl Checks for programs.
 AC_PROG_CXX
 AC_PROG_CXXCPP
@@ -22,15 +19,12 @@
 
 AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
 
-dnl This is tested only with gcc-3.4 and icc-8.0
-dnl LX_SET_CXXFLAGS
-
 dnl Checks for libraries.
 LX_CHECK_GLPK
 LX_CHECK_CPLEX
 
 LX_DOCDIR_SUFFIX
-LX_ENABLE_DOCS
+LX_ENABLE_DOC
 LX_ENABLE_GUI
 
 dnl Checks for header files.



More information about the Lemon-commits mailing list