1.1 --- a/config/misc.m4 Thu May 05 11:06:58 2005 +0000
1.2 +++ b/config/misc.m4 Thu May 05 15:34:43 2005 +0000
1.3 @@ -26,3 +26,22 @@
1.4 AC_SUBST(DOXYGEN_INTERNAL_DOCS)
1.5 AM_CONDITIONAL([WANT_DOCS], [test x"$enable_docs" != x"no"])
1.6 ])
1.7 +
1.8 +AC_DEFUN([LX_ENABLE_GUI],
1.9 +[
1.10 + AC_ARG_ENABLE([gui],
1.11 +AS_HELP_STRING([--enable-gui], [build the GUI])
1.12 +AS_HELP_STRING([--disable-gui], [do not build the GUI @<:@default@:>@]),
1.13 + [], [enable_gui=no])
1.14 +
1.15 + AC_MSG_CHECKING([whether to build the GUI])
1.16 + if test x"$enable_gui" != x"no"; then
1.17 + AC_MSG_RESULT([yes])
1.18 + else
1.19 + AC_MSG_RESULT([no])
1.20 + fi
1.21 + if test x"$enable_gui" != x"no"; then
1.22 + PKG_CHECK_MODULES([GTK], [libgnomecanvasmm-2.6 >= 2.6.0])
1.23 + fi
1.24 + AM_CONDITIONAL([WANT_GUI], [test x"$enable_gui" != x"no"])
1.25 +])
2.1 --- a/configure.ac Thu May 05 11:06:58 2005 +0000
2.2 +++ b/configure.ac Thu May 05 15:34:43 2005 +0000
2.3 @@ -30,6 +30,7 @@
2.4 LX_CHECK_CPLEX
2.5
2.6 LX_ENABLE_DOCS
2.7 +LX_ENABLE_GUI
2.8
2.9 dnl Checks for header files.
2.10 AC_CHECK_HEADERS(limits.h sys/time.h sys/times.h unistd.h)
2.11 @@ -56,6 +57,8 @@
2.12 src/benchmark/Makefile
2.13 src/demo/Makefile
2.14 src/test/Makefile
2.15 +src/gui/Makefile
2.16 +src/gui/src/Makefile
2.17 ])
2.18
2.19 AC_OUTPUT
2.20 @@ -71,6 +74,8 @@
2.21 echo GLPK support.................. : $lx_glpk_found
2.22 echo CPLEX support................. : $lx_cplex_found
2.23 echo
2.24 +echo build GUI..................... : $enable_gui
2.25 +echo
2.26 echo The packace will be installed in
2.27 echo -n ' '
2.28 echo $prefix.
3.1 --- a/src/Makefile.am Thu May 05 11:06:58 2005 +0000
3.2 +++ b/src/Makefile.am Thu May 05 15:34:43 2005 +0000
3.3 @@ -1,1 +1,4 @@
3.4 -SUBDIRS = lemon benchmark demo test
3.5 +if WANT_GUI
3.6 + MAYBE_GUI = gui
3.7 +endif
3.8 +SUBDIRS = lemon benchmark demo test $(MAYBE_GUI)
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/src/gui/Makefile.am Thu May 05 15:34:43 2005 +0000
4.3 @@ -0,0 +1,1 @@
4.4 +SUBDIRS = src
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/src/gui/src/Makefile.am Thu May 05 15:34:43 2005 +0000
5.3 @@ -0,0 +1,6 @@
5.4 +AM_CPPFLAGS = -I$(top_srcdir)/src
5.5 +LDADD = $(top_builddir)/src/lemon/libemon.la
5.6 +
5.7 +bin_PROGRAMS = gui
5.8 +
5.9 +gui_SOURCES = main.cc
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/src/gui/src/main.cc Thu May 05 15:34:43 2005 +0000
6.3 @@ -0,0 +1,10 @@
6.4 +#ifdef HAVE_CONFIG_H
6.5 +#include <config.h>
6.6 +#endif
6.7 +
6.8 +#include <iostream>
6.9 +
6.10 +int main()
6.11 +{
6.12 + std::cout << "Hello World!" << std::endl;
6.13 +}