From f0b4ae82ddbd384c7dad594eb36d14e4946a5f62 Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 7 Feb 2008 19:59:24 +0000 Subject: made some adaptions to be more portable. you might have to call "autogen.sh" again because i added a new m4 script with one of the last commits. call "./configure --enable-dev-build" after this to install USDX into the local directory (the binary will simply be moved to ../.. at the moment). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@840 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/configure.ac | 82 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 62 insertions(+), 20 deletions(-) (limited to 'Game/Code/configure.ac') diff --git a/Game/Code/configure.ac b/Game/Code/configure.ac index 40e8a6d2..f0af3447 100644 --- a/Game/Code/configure.ac +++ b/Game/Code/configure.ac @@ -29,6 +29,18 @@ AC_CONFIG_MACRO_DIR(m4) # show features and packages in one list AC_PRESERVE_HELP_ORDER +#echo $LIBS + +#define([maco], []) +#echo maco +#m4_foreach_w([arg], [-L/usr/local -l/bin/bash -L/usr/local], +# [m4_append_uniq([maco], "arg", [ ]) +#]) +#echo maco + +#echo m4_split([hallo o]) +#AC_MSG_ERROR(oi) + # ----------------------------------------- # define switches # ----------------------------------------- @@ -46,6 +58,15 @@ if [[ x$with_lazarus = xno ]] ; then AC_MSG_ERROR([Lazarus is required. It is impossible to build without it.]); fi +# add lazarus widget-type option +AC_ARG_WITH([lcl_widget_type], + [AS_HELP_STRING([--with-lcl-widget-type=TYPE], + [Lazarus LCL Widget Type @<:@default=gtk2@:>@])], + [with_lcl_widget_type=$withval], [with_lcl_widget_type="gtk2"]) +if [[ x$with_lcl_widget_type = xno -o x$with_lcl_widget_type = xyes ]] ; then + AC_MSG_ERROR([Invalid LCL Widget Type (try one of gtk2/gtk/qt)]); +fi + # add portaudio option AC_ARG_WITH([portaudio], [AS_HELP_STRING([--with-portaudio=DIR], @@ -88,12 +109,26 @@ AC_ARG_WITH([cfg-dummy3], [ Development options:]) # add dev_layout option -# Note: now handled by the Makefile -AC_ARG_ENABLE(dev_install, - [AS_HELP_STRING([--enable-dev-install], - [local installation for testing])], - [enable_dev_install="yes"], [enable_dev_install="no"]) +AC_ARG_ENABLE(dev_build, + [AS_HELP_STRING([--enable-dev-build], + [local development build])], + [enable_dev_build="yes"], [enable_dev_build="no"]) + +# ----------------------------------------- +# tools +# ----------------------------------------- +# options for make command +AC_PROG_MAKE_SET +# find tool for ln -s +AC_LN_S +# find the best install tool +AC_PROG_INSTALL +# some other useful tools +#AC_PROG_AWK +AC_PROG_SED +AC_PROG_GREP +#AC_PROG_EGREP # ----------------------------------------- # macro declarations @@ -117,7 +152,7 @@ AC_DEFUN([AC_SPLIT_VERSION], # Note: We use a here-document (<<< here-strings not POSIX compatible) # Do NOT indent the eof-delimiter read major minor release ignore <@) +# check if LCL Widget type is valid +LCL_WIDGET_TYPE=$with_lcl_widget_type +LCL_UNIT_DIR="$LAZARUS_DIR/lcl/units/$FPC_PROCESSOR-$FPC_PLATFORM" +LCL_WIDGET_DIR="$LCL_UNIT_DIR/$LCL_WIDGET_TYPE" +AC_MSG_CHECKING([whether LCL Widget Type "$LCL_WIDGET_TYPE" is valid]) +if [[ -d "$LCL_WIDGET_DIR" ]]; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_MSG_ERROR(LCL Widget Type not available: directory "$LCL_WIDGET_DIR" not found.) +fi + # find sdl AC_PKG_CHECK_VERSION(SDL, [sdl], yes) @@ -328,12 +363,19 @@ AC_SUBST(PORTMIXER_LIB) AC_SUBST_DEFINE(HAVE_PORTMIXER, $PORTMIXER_HAVE) AC_SUBST(LAZARUS_DIR) +AC_SUBST(LCL_WIDGET_TYPE) -AC_SUBST_DEFINE(USE_LOCAL_DIRS, $enable_dev_install) +AC_SUBST_DEFINE(USE_LOCAL_DIRS, $enable_dev_build) +if [[ x$enable_dev_build = xyes ]]; then + AC_SUBST(install_type, ["dev"]) +else + AC_SUBST(install_type, ["release"]) +fi AC_SUBST(suffix) AC_SUBST(logrootdir, [$with_logrootdir]) AC_DEFINE_DIR(sharerootdir, datarootdir) +AC_SUBST(PLIBS) AC_SUBST(PACKAGE_WEBSITE) # ----------------------------------------- -- cgit v1.2.3