Index: ChangeLog =================================================================== RCS file: /cvsroot/xforms/xforms/ChangeLog,v retrieving revision 1.48 diff -u -p -r1.48 ChangeLog --- ChangeLog 9 Sep 2003 16:08:49 -0000 1.48 +++ ChangeLog 10 Sep 2003 12:48:39 -0000 @@ -1,3 +1,11 @@ +2003-09-10 Jean-Marc Lasgouttes + + * Makefile.am: only build the gl/ directory if required + + * configure.ac: simplify handling of --enable-demos. Add support + for --disable-gl option; gl support is only compiled in if + GL/glx.h is found + 2003-09-09 Jean-Marc Lasgouttes * config/xformsinclude.m4 (XFORMS_CHECK_LIB_JPEG): no need to link Index: Makefile.am =================================================================== RCS file: /cvsroot/xforms/xforms/Makefile.am,v retrieving revision 1.3 diff -u -p -r1.3 Makefile.am --- Makefile.am 9 Sep 2003 15:58:08 -0000 1.3 +++ Makefile.am 10 Sep 2003 12:48:39 -0000 @@ -14,7 +14,13 @@ else DEMOS = endif -SUBDIRS = config lib image gl fd2ps fdesign $(DEMOS) +if BUILD_GL +GL = gl +else +GL = +endif + +SUBDIRS = config lib image $(GL) fd2ps fdesign $(DEMOS) EXTRA_DIST = ChangeLog COPYING.LIB Copyright README README.OS2 \ autogen.sh xforms.spec.in xforms.spec Index: configure.ac =================================================================== RCS file: /cvsroot/xforms/xforms/configure.ac,v retrieving revision 1.6 diff -u -p -r1.6 configure.ac --- configure.ac 9 Sep 2003 16:08:49 -0000 1.6 +++ configure.ac 10 Sep 2003 12:48:39 -0000 @@ -25,14 +25,8 @@ for file in config/install-sh config/mki chmod 755 ${srcdir}/${file} done -AC_ARG_ENABLE(demos, - [AC_HELP_STRING([--enable-demos], [Build demo programs (default is NO)])], - [case "${enableval}" in - yes) demos=true ;; - no) demos=false ;; - *) AC_MSG_ERROR(bad value ${enableval} for --enable-demos) ;; - esac],[demos=false]) -AM_CONDITIONAL(BUILD_DEMOS, test x$demos = xtrue) +AC_ARG_ENABLE(demos, [AC_HELP_STRING([--enable-demos], [Build demo programs])]) +AM_CONDITIONAL(BUILD_DEMOS, test x$enable_demos = xyes) ### Check for programs XFORMS_PROG_CC @@ -86,8 +80,16 @@ AC_CHECK_LIB(m, sin) AC_CHECK_LIB(c, fopen) # Checks for header files. -dnl we should do something clever when GL is not installed -AC_CHECK_HEADERS([sys/select.h GL/glx.h]) +AC_CHECK_HEADERS([sys/select.h]) + +# Check whether we want to build the gl code +AC_ARG_ENABLE(gl, + [AC_HELP_STRING([--disable-gl], [Do not build GL support library])]) +if test x$enable_gl != xno ; then + AC_CHECK_HEADER([GL/glx.h],, [enable_gl=no]) +fi +AM_CONDITIONAL(BUILD_GL, [test x$enable_gl != xno]) + dnl we have some code in lib/listdir.c that could use that... dnl AC_HEADER_DIRENT