From 6c1b0643f238272c568e7dd9c4d4a4950b664e6c Mon Sep 17 00:00:00 2001 From: Miriam Ruiz Date: Sun, 7 Dec 2008 02:54:08 +0100 Subject: [PATCH] Fixed autotools stuff --- Makefile.am | 6 +++--- configure.ac | 32 ++++++++++++++++++++++++++------ construo.hxx | 2 +- examples/Makefile.am | 2 +- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am index b26477d..d89f7eb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,7 @@ SUBDIRS = examples -bindir=$(prefix)/games +bindir=$(prefix)/bin bin_PROGRAMS = @ConstruoTargets@ @@ -159,7 +159,7 @@ construo_freeglut_SOURCES = construo_main.cxx construo_main.hxx glut_display.hxx construo_freeglut_LDADD = libconstruo.a @freeglut_LIBS@ construo_freeglut_CXXFLAGS = -DUSE_GLUT_DISPLAY -DHAVE_FREEGLUT -# pkgdatadir = $(datadir)/games/@PACKAGE@ +# pkgdatadir = $(datadir)/@PACKAGE@ EXTRA_DIST = TODO INSTALL.configure xml2sexpr.sh compatlib/sstream -# EOF # \ No newline at end of file +# EOF # diff --git a/configure.ac b/configure.ac index 2eed56a..7549886 100644 --- a/configure.ac +++ b/configure.ac @@ -63,15 +63,29 @@ if test x$enable_fcheck = xyes; then LIBS="$LIBS `fc-config --libs`" fi +AC_MSG_CHECKING([whether we want to compile the X11 client]) +AC_ARG_ENABLE([x11], + AC_HELP_STRING([--enable-x11], + [enable x11 support (default: yes)]),, + [enable_x11=yes]) +AC_MSG_RESULT($enable_x11) + +AC_MSG_CHECKING([whether we want to compile the glut client]) +AC_ARG_ENABLE([glut], + AC_HELP_STRING([--enable-glut], + [enable glut support (default: yes)]),, + [enable_glut=yes]) +AC_MSG_RESULT($enable_glut) + AC_CHECK_HEADER([sstream], [], [AC_MSG_NOTICE([using replacement sstream from compatlib/]) CXXFLAGS="$CXXFLAGS -Icompatlib/"]) dnl Checking for the install prefix and then use it to define PINGUS_DATADIR -dnl PINGUS_EXPAND_DIR(pingus_datadir, "$datadir/games/$PACKAGE") +dnl PINGUS_EXPAND_DIR(pingus_datadir, "$datadir/$PACKAGE") dnl AC_DEFINE_UNQUOTED(PINGUS_DATADIR, "$pingus_datadir", [Location of Pingus data files]) -dnl AC_DEFINE(CONSTRUO_DATADIR, $datadir/games/$PACKAGE, [Location of Construo datafiles]) +dnl AC_DEFINE(CONSTRUO_DATADIR, $datadir/$PACKAGE, [Location of Construo datafiles]) AC_DEFINE_DIR(DATADIR, datadir, [Location of datafiles]) AC_CHECK_LIB(z, gzopen) @@ -90,7 +104,9 @@ if test -n "$X_DISPLAY_MISSING"; then echo "### not installed?" echo "" else - ConstruoTargets="$ConstruoTargets construo.x11" + if test x$enable_x11 = xyes; then + ConstruoTargets="$ConstruoTargets construo.x11" + fi x11_LIBS="$x11_LIBS $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS -lX11" x11_CXXFLAGS="$CXXFLAGS $X_CFLAGS" fi @@ -113,7 +129,9 @@ dnl -- Check for Glut -- dnl -------------------- AC_CHECK_LIB(glut, glutMainLoop, [ - ConstruoTargets="$ConstruoTargets construo.glut" + if test x$enable_glut = xyes; then + ConstruoTargets="$ConstruoTargets construo.glut" + fi AC_SUBST(glut_LIBS,"-lglut") ], []) @@ -123,7 +141,9 @@ dnl -- Check for FreeGlut -- dnl ------------------------ AC_CHECK_LIB(freeglut-1.3, glutMainLoop, [ - ConstruoTargets="$ConstruoTargets construo.freeglut" + if test x$enable_glut = xyes; then + ConstruoTargets="$ConstruoTargets construo.freeglut" + fi AC_SUBST(freeglut_LIBS,"-lfreeglut-1.3") dnl echo "Freeglut: " $freeglut_LIBS ], @@ -158,4 +178,4 @@ echo "" echo " Ingo Ruhnke " echo "" -# EOF # \ No newline at end of file +# EOF # diff --git a/construo.hxx b/construo.hxx index ae7f5cc..90df5d6 100644 --- a/construo.hxx +++ b/construo.hxx @@ -22,7 +22,7 @@ #include -#define CONSTRUO_DATADIR DATADIR"/games/"PACKAGE +#define CONSTRUO_DATADIR DATADIR"/"PACKAGE class SystemContext; class InputContext; diff --git a/examples/Makefile.am b/examples/Makefile.am index 9572680..c3963ff 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -15,7 +15,7 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -pkgdatadir = $(datadir)/games/@PACKAGE@/examples +pkgdatadir = $(datadir)/@PACKAGE@/examples nobase_dist_pkgdata_DATA = *.construo choh/*.construo choh2/*.construo -- 2.11.4.GIT