[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer mk/autoconf/np_findlib.m4 ./configure...
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer mk/autoconf/np_findlib.m4 ./configure... |
Date: |
Wed, 12 Nov 2003 12:19:47 -0500 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/11/12 12:19:46
Modified files:
mk/autoconf : np_findlib.m4
. : configure.ac ChangeLog
Log message:
allow users to specify sepcial installdirs for several libs in configure
Patches:
Index: netpanzer/ChangeLog
diff -u netpanzer/ChangeLog:1.28 netpanzer/ChangeLog:1.29
--- netpanzer/ChangeLog:1.28 Tue Nov 11 09:42:30 2003
+++ netpanzer/ChangeLog Wed Nov 12 12:19:46 2003
@@ -1,3 +1,9 @@
+12-Nov-2003 by Matthias Braun
+-fixed a bug where the server browser wouldn't display the correct usercount
for
+ servers
+-added configure options, for the case where libs aren't installed in the
+ default dirs
+
11-Nov-2003 by Matthias Braun
-fixed irclobby view to not crash on refresh button, when connection is broken
-report exceptions in the irclobby view
Index: netpanzer/configure.ac
diff -u netpanzer/configure.ac:1.10 netpanzer/configure.ac:1.11
--- netpanzer/configure.ac:1.10 Tue Nov 11 09:45:15 2003
+++ netpanzer/configure.ac Wed Nov 12 12:19:45 2003
@@ -85,14 +85,14 @@
AM_PATH_SDL([1.2.5], , AC_MSG_ERROR([Please install libsdl >= 1.2.]))
-NP_FINDLIB([SDLNET], [SDL_net >= 1.2],
+NP_FINDLIB([SDLNET], [SDL_net], [SDL_net >= 1.2],
NP_LANG_PROGRAM([#include <SDL_net.h>], [SDLNet_Init();]),
[], [-lSDL_net],
[],
[AC_MSG_ERROR([Please install SDLNet >= 1.2.4])],
[$SDL_CFLAGS], [$SDL_LIBS])
-NP_FINDLIB([SDLMIXER], [SDL_mixer >= 1.2],
+NP_FINDLIB([SDLMIXER], [SDL_mixer], [SDL_mixer >= 1.2],
NP_LANG_PROGRAM([#include <SDL_mixer.h>
#if MIX_MAJOR_VERSION < 1
# error SDLMix too old
@@ -108,14 +108,14 @@
[AC_MSG_ERROR([Please install SDLMixer >=1.2.2])],
[$SDL_CFLAGS], [$SDL_LIBS])
-NP_FINDLIB([SDLIMAGE], [SDL_image >= 1.2],
+NP_FINDLIB([SDLIMAGE], [SDL_image], [SDL_image >= 1.2],
NP_LANG_PROGRAM([#include <SDL_image.h>], [IMG_Load("");]),
[], [-lSDL_image],
[],
[AC_MSG_ERROR([Please install SDLImage >= 1.2.1])],
[$SDL_CFLAGS], [$SDL_LIBS])
-NP_FINDLIB([PHYSFS], [physfs >= 1.9],
+NP_FINDLIB([PHYSFS], [physfs], [physfs >= 1.9],
NP_LANG_PROGRAM([#include <physfs.h>
#if PHYSFS_VER_MINOR < 1
# error PHYSFS is too old
Index: netpanzer/mk/autoconf/np_findlib.m4
diff -u netpanzer/mk/autoconf/np_findlib.m4:1.1
netpanzer/mk/autoconf/np_findlib.m4:1.2
--- netpanzer/mk/autoconf/np_findlib.m4:1.1 Sun Sep 21 14:29:31 2003
+++ netpanzer/mk/autoconf/np_findlib.m4 Wed Nov 12 12:19:44 2003
@@ -1,17 +1,31 @@
-# NP_FINDLIB(NAME, STRING, TESTAPP, CFLAGS, LIBS, ACTION_IF_FOUND,
+# NP_FINDLIB(VARNAME, NAME, STRING, TESTAPP, CFLAGS, LIBS, ACTION_IF_FOUND,
# ACTION_IF_NOT_FOUND, EXTRACFLAGS, EXTRALIBS)
AC_DEFUN([NP_FINDLIB], [
+ AC_ARG_WITH([lib$2], [AC_HELP_STRING([--with-lib$2=dir],
+ [specify location of lib$2 if not detected automatically; uses
+ dir, dir/include and dir/lib])])
+
save_CFLAGS="$CFLAGS"
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $4 $8"
- CPPFLAGS="$CPPFLAGS $4 $8"
- LIBS="$LIBS $5 $9"
+ RESCFLAGS="$5"
+ RESLIBS="$6"
+ CFLAGS="$CFLAGS $5 $9"
+ CPPFLAGS="$CPPFLAGS $5 $9"
+ LIBS="$LIBS $6 $10"
+
+ AS_IF([test -n "$with_lib$2"], [
+ CFLAGS="-I$with_lib$2/include $CFLAGS"
+ CPPFLAGS="-I$with_lib$2/include $CPPFLAGS"
+ LIBS="-L$with_lib$2/lib $LIBS"
+ RESCFLAGS="-I$with_lib$2/include $RESCFLAGS"
+ RESLIBS="-L$with_lib$2/lib $RESLIBS"
+ ])
- AC_MSG_CHECKING([for $2])
+ AC_MSG_CHECKING([for $3])
- AC_LINK_IFELSE([$3], [buildok=yes], [buildok=no])
+ AC_LINK_IFELSE([$4], [buildok=yes], [buildok=no])
LIBS=$save_LIBS
CPPFLAGS=$save_CPPFLAGS
@@ -20,8 +34,8 @@
AS_IF([test $buildok = yes],
[AC_MSG_RESULT([found])
$1_AVAILABLE=yes
- $1_CFLAGS="$4"
- $1_LIBS="$5"],
+ $1_CFLAGS="$RESCFLAGS"
+ $1_LIBS="$RESLIBS"],
[AC_MSG_RESULT([not found])
$1_AVAILABLE=no
$1_CFLAGS=""
@@ -32,6 +46,6 @@
AC_SUBST([$1_LIBS])
AS_IF([test $buildok = yes],
- [ifelse([$6], , :, [$6])],
- [ifelse([$7], , :, [$7])])
+ [ifelse([$7], , :, [$7])],
+ [ifelse([$8], , :, [$8])])
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer mk/autoconf/np_findlib.m4 ./configure...,
Matthias Braun <=