Changeset 19448

Show
Ignore:
Timestamp:
11/10/06 13:20:05 (2 years ago)
Author:
patrick
Message:

Merge Doozer++ 2.1.7 from its vendor branch. This release incorporates
enhancements that are required for the upcoming commit to the Juggler build
that will finish off the switch to flagpoll.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/Doozer++/ChangeLog

    r19399 r19448  
    11DATE       AUTHOR       CHANGE 
    22---------- ------------ ------------------------------------------------------- 
     32006-11-09 patrickh     Extended the tests for OpenAL, ALUT, GLUT, NSPR, and 
     4                        Audiere to be smarter about 64-bit installations and to 
     5                        report the directory containing the library (or 
     6                        libraries) for the package. 
     7                        NEW VERSION: 2.1.7 
     82006-11-09 patrickh     Extended DPP_HAVE_GLUT to handle the Mac OS X GLUT 
     9                        framework. 
     10                        NEW VERSION: 2.1.6 
     112006-11-09 patrickh     Store the Boost header directory path in 
     12                        $BOOST_INCLUDE_DIR. 
     13                        NEW VERSION: 2.1.5 
    3142006-11-02 patrickh     Separated the ALUT test from DPP_HAVE_OPENAL. The new 
    415                        way to test for ALUT is to use DPP_HAVE_ALUT. 
  • juggler/trunk/Doozer++/config/general.m4

    r19399 r19448  
    2222dnl ----------------------------------------------------------------- 
    2323dnl File:          general.m4,v 
    24 dnl Date modified: 2006/11/02 17:31:43 
    25 dnl Version:       1.87 
     24dnl Date modified: 2006/11/09 22:12:21 
     25dnl Version:       1.90 
    2626dnl ----------------------------------------------------------------- 
    2727dnl ************** <auto-copyright.pl END do not edit this line> ************** 
     
    4747dnl =========================================================================== 
    4848 
    49 dnl general.m4,v 1.87 2006/11/02 17:31:43 patrickh Exp 
     49dnl general.m4,v 1.90 2006/11/09 22:12:21 patrickh Exp 
    5050 
    5151dnl Set the version of Doozer++. 
    52 define(DPP_DPPVERSION, 2.1.4
     52define(DPP_DPPVERSION, 2.1.7
    5353 
    5454dnl --------------------------------------------------------------------------- 
  • juggler/trunk/Doozer++/config/pkgs/alut.m4

    r19399 r19448  
    2222dnl ----------------------------------------------------------------- 
    2323dnl File:          alut.m4,v 
    24 dnl Date modified: 2006/11/02 17:31:43 
    25 dnl Version:       1.1 
     24dnl Date modified: 2006/11/09 22:12:22 
     25dnl Version:       1.2 
    2626dnl ----------------------------------------------------------------- 
    2727dnl ************** <auto-copyright.pl END do not edit this line> ************** 
     
    4343dnl     ALUT_INCLUDES - Extra include path for the ALUT header directory. 
    4444dnl     ALUT_LDFLAGS  - Extra linker flags for the ALUT library directory. 
     45dnl     ALUT_LIBDIR   - The directory containing the ALUT library. On Mac OS X, 
     46dnl                     this is the directory containing the OpenAL framework 
     47dnl                     (since OpenAL and ALUT are not separated). 
    4548dnl =========================================================================== 
    4649 
    47 dnl alut.m4,v 1.1 2006/11/02 17:31:43 patrickh Exp 
     50dnl alut.m4,v 1.2 2006/11/09 22:12:22 patrickh Exp 
    4851 
    4952dnl --------------------------------------------------------------------------- 
     
    116119         if test "x$PLATFORM" = "xDarwin" ; then 
    117120            ALUT="$OPENAL" 
     121            ALUT_LIBDIR="$AL_LIBDIR" 
    118122            dpp_have_alut="$dpp_have_openal" 
    119123         dnl Other platforms. 
     
    125129            fi 
    126130 
     131            LIBS="-lalut $DYN_LOAD_LIB $LIBOPENAL $LIBS" 
     132 
    127133            DPP_LANG_SAVE 
    128134            DPP_LANG_C 
    129135 
    130136            for l in $libdirs ; do 
     137               cur_alut_libdir="$ALUT_ROOT/$l" 
     138 
    131139               dnl The pthreads-related macros will set only one of 
    132140               dnl $PTHREAD_ARG or $PTHREAD_LIB, so it's safe (and simpler) 
    133141               dnl for us to use both here. 
    134                LDFLAGS="-L$ALUT_ROOT/$l $dpp_saveLDFLAGS $AL_LDFLAGS $PTHREAD_ARG $PTHREAD_LIB" 
    135  
    136                AC_CHECK_LIB([alut], [alutInit], 
    137                   [AC_CHECK_HEADER([AL/alut.h], [dpp_have_alut='yes'], 
    138                      [dpp_have_alut='no'])], 
    139                   [dpp_have_alut='no'], 
    140                   [$DYN_LOAD_LIB $LIBOPENAL]) 
     142               LDFLAGS="-L$cur_alut_libdir $dpp_saveLDFLAGS $AL_LDFLAGS $PTHREAD_ARG $PTHREAD_LIB" 
     143 
     144               AC_MSG_CHECKING([for alutInit in -lalut in $cur_alut_libdir]) 
     145               AC_TRY_LINK([#include <AL/alut.h>], [alutInit(0, 0);], 
     146                           [dpp_have_alut='yes'], [dpp_have_alut='no']) 
     147               AC_MSG_RESULT([$dpp_have_alut]) 
    141148 
    142149               if test "x$dpp_have_alut" = "xyes" ; then 
     150                  ALUT_LIBDIR="$cur_alut_libdir" 
    143151                  break 
    144152               fi 
     
    147155            DPP_LANG_RESTORE 
    148156         fi 
     157 
     158         dnl Restore all the variables now that we are done testing. 
     159         CFLAGS="$dpp_save_CFLAGS" 
     160         CPPFLAGS="$dpp_save_CPPFLAGS" 
     161         LDFLAGS="$dpp_save_LDFLAGS" 
     162         LIBS="$dpp_save_LIBS" 
    149163 
    150164         dnl Success. 
     
    174188            ALUT='yes' 
    175189         fi 
    176  
    177          dnl Restore all the variables now that we are done testing. 
    178          CFLAGS="$dpp_save_CFLAGS" 
    179          CPPFLAGS="$dpp_save_CPPFLAGS" 
    180          LDFLAGS="$dpp_save_LDFLAGS" 
    181          LIBS="$dpp_save_LIBS" 
    182190      fi 
    183191   fi 
     
    189197   AC_SUBST(ALUT_INCLUDES) 
    190198   AC_SUBST(ALUT_LDFLAGS) 
     199   AC_SUBST(ALUT_LIBDIR) 
    191200]) 
  • juggler/trunk/Doozer++/config/pkgs/audiere.m4

    r16866 r19448  
    2222dnl ----------------------------------------------------------------- 
    2323dnl File:          audiere.m4,v 
    24 dnl Date modified: 2005/01/08 22:44:41 
    25 dnl Version:       1.6 
     24dnl Date modified: 2006/11/09 22:12:22 
     25dnl Version:       1.7 
    2626dnl ----------------------------------------------------------------- 
    2727dnl ************** <auto-copyright.pl END do not edit this line> ************** 
     
    4444dnl                        appliations. 
    4545dnl     AUDIERE_INCLUDES - Extra include path for the Audiere header directory. 
    46 dnl     AUDIERE_LDFLAGS  - Extra linker flags for the Audiere library directory. 
     46dnl     AUDIERE_LDFLAGS  - Extra linker flags for the Audiere library 
     47dnl                        directory. 
     48dnl     AUDIERE_LIBDIR   - The directory contaning the Audiere library. 
    4749dnl =========================================================================== 
    4850 
    49 dnl audiere.m4,v 1.6 2005/01/08 22:44:41 patrickh Exp 
     51dnl audiere.m4,v 1.7 2006/11/09 22:12:22 patrickh Exp 
    5052 
    5153dnl --------------------------------------------------------------------------- 
     
    8991      dpp_save_CPPFLAGS="$CPPFLAGS" 
    9092      dpp_save_LDFLAGS="$LDFLAGS" 
     93      dpp_save_LIBS="$LIBS" 
    9194 
    9295      dnl Add the user-specified Audiere installation directory to these 
     
    9598      if test "x$AUDIERE_ROOT" != "x/usr" ; then 
    9699         CPPFLAGS="$CPPFLAGS -I$AUDIERE_ROOT/include" 
    97          LDFLAGS="-L$AUDIERE_ROOT/lib $LDFLAGS $ABI_FLAGS" 
    98100      fi 
    99101 
    100102      CXXFLAGS="$CXXFLAGS $ABI_FLAGS" 
    101  
    102       dpp_save_LIBS="$LIBS" 
    103103 
    104104      if test "x$PLATFORM" = "xIRIX" ; then 
     
    106106      fi 
    107107 
     108      if test "lib$LIBBITSUF" != "lib" ; then 
     109         libdirs="lib$LIBBITSUF lib" 
     110      else 
     111         libdirs="lib" 
     112      fi 
     113 
     114      LIBS="-laudiere $LIB_AUDIO $LIBS" 
     115 
    108116      DPP_LANG_SAVE 
    109117      DPP_LANG_CPLUSPLUS 
    110118 
    111       AC_CHECK_LIB([audiere], [AdrOpenDevice], 
    112          [AC_CHECK_HEADER([audiere.h], [dpp_have_audiere='yes'], 
    113                           [dpp_have_audiere='no'])], 
    114          [dpp_have_audiere='no'], [$LIB_AUDIO]) 
     119      for l in $libdirs ; do 
     120         cur_audiere_libdir="$AUDIERE_ROOT/$l" 
     121         LDFLAGS="-L$cur_audiere_libdir $dpp_save_LDFLAGS $ABI_FLAGS" 
     122 
     123         AC_MSG_CHECKING([for audiere::OpenDevice in -laudiere in $cur_audiere_libdir]) 
     124         AC_TRY_LINK([#include <audiere.h>], [audiere::OpenDevice();], 
     125                     [dpp_have_audiere='yes'], [dpp_have_audiere='no']) 
     126         AC_MSG_RESULT([$dpp_have_audiere]) 
     127 
     128         if test "x$dpp_have_audiere" = "xyes" ; then 
     129            AUDIERE_LIBDIR="$cur_audiere_libdir" 
     130            break 
     131         fi 
     132      done 
    115133 
    116134      DPP_LANG_RESTORE 
    117135 
    118       dnl this is necessary because AC_CHECK_LIB() adds -lauidere to 
    119       dnl $LIBS.  We want to do that ourselves later. 
     136      CXXFLAGS="$dpp_save_CXXFLAGS" 
     137      CPPFLAGS="$dpp_save_CPPFLAGS" 
     138      LDFLAGS="$dpp_save_LDFLAGS" 
    120139      LIBS="$dpp_save_LIBS" 
    121140 
     
    134153         AUDIERE='yes' 
    135154      fi 
    136  
    137       CXXFLAGS="$dpp_save_CXXFLAGS" 
    138       CPPFLAGS="$dpp_save_CPPFLAGS" 
    139       LDFLAGS="$dpp_save_LDFLAGS" 
    140155   fi 
    141156 
     
    145160   AC_SUBST(AUDIERE_INCLUDES) 
    146161   AC_SUBST(AUDIERE_LDFLAGS) 
     162   AC_SUBST(AUDIERE_LIBDIR) 
    147163]) 
  • juggler/trunk/Doozer++/config/pkgs/boost.m4

    r18189 r19448  
    2222dnl ----------------------------------------------------------------- 
    2323dnl File:          boost.m4,v 
    24 dnl Date modified: 2005/11/16 14:42:2
    25 dnl Version:       1.27 
     24dnl Date modified: 2006/11/09 21:58:3
     25dnl Version:       1.28 
    2626dnl ----------------------------------------------------------------- 
    2727dnl ************** <auto-copyright.pl END do not edit this line> ************** 
     
    4040dnl     BOOST             - do we have boost on the system? 
    4141dnl     BOOST_ROOT        - The Boost installation directory. 
     42dnl     BOOST_INCLUDE_DIR - The directory containing the Boost header tree. 
    4243dnl     BOOST_INCLUDES    - Extra include path for the Boost header directory. 
    4344dnl     BOOST_LDFLAGS     - Extra library path for the Boost libraries. 
     45dnl                         Note that the value set in this variable is an 
     46dnl                         educated guess. No test is performed to validate 
     47dnl                         the setting! 
    4448dnl     BOOST_VERSION     - The integer Boost version (see boost/version.hpp). 
    4549dnl     BOOST_LIB_VERSION - The version substring in Boost library names. 
    4650dnl =========================================================================== 
    4751 
    48 dnl boost.m4,v 1.27 2005/11/16 14:42:21 patrickh Exp 
     52dnl boost.m4,v 1.28 2006/11/09 21:58:31 patrickh Exp 
    4953 
    5054dnl --------------------------------------------------------------------------- 
     
    153157      if test "x$dpp_have_boost" = "xyes" ; then 
    154158         if test "x$dpp_boost_incdir" != "x" ; then 
     159            BOOST_INCLUDE_DIR="$dpp_boost_incdir" 
    155160            BOOST_INCLUDES="-I$dpp_boost_incdir" 
    156161         fi 
     
    180185   dnl Export all of the output vars for use by makefiles and configure script. 
    181186   AC_SUBST(BOOST_ROOT) 
     187   AC_SUBST(BOOST_INCLUDE_DIR) 
    182188   AC_SUBST(BOOST_INCLUDES) 
    183189   AC_SUBST(BOOST_LDFLAGS) 
  • juggler/trunk/Doozer++/config/pkgs/glut.m4

    r16866 r19448  
    2222dnl ----------------------------------------------------------------- 
    2323dnl File:          glut.m4,v 
    24 dnl Date modified: 2005/01/08 22:44:41 
    25 dnl Version:       1.12 
     24dnl Date modified: 2006/11/09 22:12:22 
     25dnl Version:       1.15 
    2626dnl ----------------------------------------------------------------- 
    2727dnl ************** <auto-copyright.pl END do not edit this line> ************** 
     
    4141dnl     GLUT_INCLUDES - Extra include path for the GLUT header directory. 
    4242dnl     GLUT_LDFLAGS  - Extra linker flags for the GLUT library directory. 
     43dnl     GLUT_LIBDIR   - The directory containing the GLUT library. On Mac OS X, 
     44dnl                     this is the directory containing the GLUT framework 
     45dnl                     directory. 
    4346dnl =========================================================================== 
    4447 
    45 dnl glut.m4,v 1.12 2005/01/08 22:44:41 patrickh Exp 
     48dnl glut.m4,v 1.15 2006/11/09 22:12:22 patrickh Exp 
    4649 
    4750dnl --------------------------------------------------------------------------- 
     
    97100         AC_MSG_WARN([Assuming that GLUT is available in a standard location]) 
    98101         dpp_have_glut='yes' 
    99          ifelse([$3], , :, [$3]) 
     102         ifelse([$2], , :, [$2]) 
     103      elif test "x$PLATFORM" = "xDarwin" ; then 
     104         DPP_LANG_SAVE 
     105         DPP_LANG_C 
     106 
     107         CPPFLAGS="-F$GLUT_ROOT $CPPFLAGS" 
     108         LDFLAGS="-F$GLUT_ROOT $LDFLAGS" 
     109         LIBS="$LIBS -framework GLUT" 
     110 
     111         AC_CACHE_CHECK([for glutMainLoop in GLUT framework], 
     112                        [dpp_cv_glutMainLoop_glut_lib], 
     113                        [AC_TRY_LINK([#include <GLUT/glut.h>], 
     114                                     [glutMainLoop();], 
     115                                     [dpp_cv_glutMainLoop_lib='yes'], 
     116                                     [dpp_cv_glutMainLoop_lib='no'])]) 
     117 
     118         DPP_LANG_RESTORE 
     119 
     120         dnl Restore all the variables now that we are done testing. 
     121         CFLAGS="$dpp_save_CFLAGS" 
     122         CPPFLAGS="$dpp_save_CPPFLAGS" 
     123         LDFLAGS="$dpp_save_LDFLAGS" 
     124         LIBS="$dpp_save_LIBS" 
     125 
     126         dnl Success. 
     127         if test "x$dpp_cv_glutMainLoop_lib" = "xyes" ; then 
     128            dpp_have_glut='yes' 
     129            GLUT_LIBDIR="$GLUT_ROOT" 
     130            ifelse([$2], , :, [$2]) 
     131         dnl Failure. 
     132         else 
     133            dpp_have_glut='no' 
     134            ifelse([$3], , :, [$3]) 
     135         fi 
    100136      else 
    101137         dpp_save_LIBS="$LIBS" 
    102138         LIBS="$LIBS -lglut $LIBOPENGL -lm" 
    103139 
    104          AC_LANG_SAVE 
    105          AC_LANG_C 
    106  
    107          dnl Check the cache in case this test was run previously and if 
    108          dnl not, compile the given code and try to link it against the GL 
    109          dnl library.  We don't need to test for the existence of GL/gl.h 
    110          dnl after linking because the test program already includes it. 
    111          AC_CACHE_CHECK([for glutMainLoop in -lglut], 
    112             [dpp_cv_glutMainLoop_available], 
    113             [AC_TRY_LINK([#include <GL/glut.h>], [glutMainLoop()], 
    114                [dpp_cv_glutMainLoop_available='yes'], 
    115                [dpp_cv_glutMainLoop_available='no'])]) 
    116  
     140         if test "lib$LIBBITSUF" != "lib" ; then 
     141            libdirs="lib$LIBBITSUF lib" 
     142         else 
     143            libdirs="lib" 
     144         fi 
     145 
     146         DPP_LANG_SAVE 
     147         DPP_LANG_C 
     148 
     149         for l in $libdirs ; do 
     150            cur_glut_libdir="$GLUT_ROOT/$l" 
     151            LDFLAGS="-L$cur_glut_libdir $dpp_save_LDFLAGS" 
     152 
     153            AC_MSG_CHECKING([for glutMainLoop in -lglut in $cur_glut_libdir]) 
     154            AC_TRY_LINK([#include <GL/glut.h>], [glutMainLoop();], 
     155                        [dpp_have_glut='yes'], [dpp_have_glut='no']) 
     156            AC_MSG_RESULT([$dpp_have_glut]) 
     157 
     158            LIBS="$dpp_save_LIBS" 
     159 
     160            if test "x$dpp_have_glut" = "xyes" ; then 
     161               GLUT_LIBDIR="$cur_glut_libdir" 
     162               break 
     163            fi 
     164         done 
     165 
     166         DPP_LANG_RESTORE 
     167 
     168         dnl Restore all the variables now that we are done testing. 
     169         CFLAGS="$dpp_save_CFLAGS" 
     170         CPPFLAGS="$dpp_save_CPPFLAGS" 
     171         LDFLAGS="$dpp_save_LDFLAGS" 
    117172         LIBS="$dpp_save_LIBS" 
    118173 
    119174         if test "x$dpp_cv_glutMainLoop_available" = "xyes" ; then 
    120175            dpp_have_glut='yes' 
     176            ifelse([$2], , :, [$2]) 
     177         else 
    121178            ifelse([$3], , :, [$3]) 
    122          else 
    123             ifelse([$4], , :, [$4]) 
    124          fi 
    125  
    126          AC_LANG_RESTORE 
     179         fi 
    127180      fi 
    128181 
     
    141194         fi 
    142195      fi 
    143  
    144       dnl Restore all the variables now that we are done testing. 
    145       CFLAGS="$dpp_save_CFLAGS" 
    146       CPPFLAGS="$dpp_save_CPPFLAGS" 
    147       LDFLAGS="$dpp_save_LDFLAGS" 
    148196   fi 
    149197 
    150198   AC_SUBST(GLUT_ROOT) 
     199   AC_SUBST(GLUT_INCLUDES) 
     200   AC_SUBST(GLUT_LDFLAGS) 
     201   AC_SUBST(GLUT_LIBDIR) 
    151202]) 
  • juggler/trunk/Doozer++/config/pkgs/nspr.m4

    r17068 r19448  
    2222dnl ----------------------------------------------------------------- 
    2323dnl File:          nspr.m4,v 
    24 dnl Date modified: 2005/03/20 17:17:1
    25 dnl Version:       1.40 
     24dnl Date modified: 2006/11/09 22:12:2
     25dnl Version:       1.41 
    2626dnl ----------------------------------------------------------------- 
    2727dnl ************** <auto-copyright.pl END do not edit this line> ************** 
     
    6060dnl                             libraries (safe for use with the msvccc shell 
    6161dnl                             script). 
     62dnl     NSPR_LIBDIR           - The directory containing the NSPR libraries. 
    6263dnl     NSPR_LIB_MSVCCC       - The linker option for the basic NSPR library 
    6364dnl                             for use with the msvccc shell script. 
     
    8283dnl =========================================================================== 
    8384 
    84 dnl nspr.m4,v 1.40 2005/03/20 17:17:12 patrickh Exp 
     85dnl nspr.m4,v 1.41 2006/11/09 22:12:22 patrickh Exp 
    8586 
    8687dnl --------------------------------------------------------------------------- 
     
    149150 
    150151   if test "x$NSPR_ROOT" != "xno" ; then 
    151       AC_LANG_SAVE 
    152       AC_LANG_C 
     152      DPP_LANG_SAVE 
     153      DPP_LANG_C 
    153154 
    154155      dnl Add the user-specified NSPR installation directory to the 
     
    176177         dnl No NSPR library directory, so append "/lib" to $NSPR_ROOT. 
    177178         if test "x${_with_nspr_lib}" = "x/usr/lib" ; then 
    178             dpp_nspr_libdir="$NSPR_ROOT/lib" 
     179            if test "lib$LIBBITSUF" != "lib" ; then 
     180               libdirs="$NSPR_ROOT/lib$LIBBITSUF $NSPR_ROOT/lib" 
     181            else 
     182               libdirs="$NSPR_ROOT/lib" 
     183            fi 
    179184         dnl We have a NSPR library directory, so we'll use it and hope for 
    180185         dnl the best. 
    181186         else 
    182             dpp_nspr_libdir="${_with_nspr_lib}" 
     187            libdirs="${_with_nspr_lib}" 
    183188         fi 
    184189      else 
    185          dpp_nspr_libdir="$NSPR_ROOT/lib" 
     190         if test "lib$LIBBITSUF" != "lib" ; then 
     191            libdirs="$NSPR_ROOT/lib$LIBBITSUF $NSPR_ROOT/lib" 
     192         else 
     193            libdirs="$NSPR_ROOT/lib" 
     194         fi 
    186195      fi 
    187196 
     
    198207 
    199208      CPPFLAGS="$CPPFLAGS -I$dpp_nspr_incdir" 
    200       LDFLAGS="$PTHREAD_ARG -L$dpp_nspr_libdir $LDFLAGS" 
     209 
     210      AC_CHECK_HEADERS([nspr.h nspr/nspr.h]) 
    201211 
    202212      if test "x$dpp_os_type" = "xWin32" ; then 
    203213         NSPR_LIB_NAME_PREFIX='lib' 
    204214      fi 
     215 
     216      LIBS="$PTHREAD_LIB $SEM_LIB" 
     217 
     218      libname="$NSPR_LIB_NAME_PREFIXnspr4" 
     219 
     220      for l in libdirs ; do 
     221         cur_nspr_libdir="$l" 
     222         LDFLAGS="$PTHREAD_ARG -L$cur_nspr_libdir $dpp_save_LDFLAGS" 
     223 
     224         AC_MSG_CHECKING([for PR_Initialized in $libname in $cur_nspr_libdir]) 
     225         AC_TRY_LINK([ 
     226#if defined(HAVE_NSPR_H) 
     227#include <nspr.h> 
     228#else 
     229#include <nspr/nspr.h> 
     230#endif 
     231], 
     232            [PR_Initialized();], [dpp_have_nspr='yes'], [dpp_have_nspr='no']) 
     233 
     234         if test "x$dpp_have_nspr" = "xyes" ; then 
     235            NSPR_LIBDIR="$cur_nspr_libdir" 
     236            break 
     237         fi 
     238      done 
     239 
     240      DPP_LANG_RESTORE 
    205241 
    206242      dpp_nspr_lib="${NSPR_LIB_NAME_PREFIX}nspr$NSPR_VER" 
     
    208244      dpp_plds_lib="${NSPR_LIB_NAME_PREFIX}plds$NSPR_VER" 
    209245 
    210       AC_CHECK_LIB([$dpp_nspr_lib], [PR_CreateThread], 
    211                    [AC_CHECK_HEADER([nspr.h], 
    212                       [dpp_nspr_inc="$dpp_nspr_incdir"], 
    213                       [AC_CHECK_HEADER([nspr/nspr.h], 
    214                          [dpp_nspr_inc="$dpp_nspr_incdir/nspr"], $3)])], 
    215                    $3, [$PTHREAD_LIB $SEM_LIB]) 
    216  
    217246      CPPFLAGS="$dpp_save_CPPFLAGS" 
    218247      LDFLAGS="$dpp_save_LDFLAGS" 
    219248      LIBS="$dpp_save_LIBS" 
    220249 
    221       AC_LANG_RESTORE 
    222  
    223       NSPR_INCLUDES="-I$dpp_nspr_inc" 
    224       NSPR_LIB="-l$dpp_nspr_lib" 
    225       PLC_LIB="-l$dpp_plc_lib" 
    226       PLDS_LIB="-l$dpp_plds_lib" 
    227       NSPR_LDFLAGS="-L$dpp_nspr_libdir" 
    228  
    229       NSPR_LIB_MSVCCC="-l$dpp_nspr_lib" 
    230       PLC_LIB_MSVCCC="-l$dpp_plc_lib" 
    231       PLDS_LIB_MSVCCC="-l$dpp_plds_lib" 
    232       NSPR_LDFLAGS_MSVCCC="-L$dpp_nspr_libdir" 
    233  
    234       NSPR_LIB_LINK_EXE="$dpp_nspr_lib.lib" 
    235       PLC_LIB_LINK_EXE="$dpp_plc_lib.lib" 
    236       PLDS_LIB_LINK_EXE="$dpp_plds_lib.lib" 
    237       NSPR_LDFLAGS_LINK_EXE="/libpath:\"$dpp_nspr_libdir\"" 
    238  
    239       NSPR_LIB_STATIC="\$(NSPR_ROOT)/lib/libnspr$NSPR_VER.a" 
    240       PLC_LIB_STATIC="\$(NSPR_ROOT)/lib/libplc$NSPR_VER.a" 
    241       PLDS_LIB_STATIC="\$(NSPR_ROOT)/lib/libplds$NSPR_VER.a" 
     250      if test "x$dpp_have_nspr" = "xyes" ; then 
     251         NSPR_INCLUDES="-I$dpp_include_path" 
     252         NSPR_LIB="-l$dpp_nspr_lib" 
     253         PLC_LIB="-l$dpp_plc_lib" 
     254         PLDS_LIB="-l$dpp_plds_lib" 
     255         NSPR_LDFLAGS="-L$dpp_nspr_libdir" 
     256 
     257         NSPR_LIB_MSVCCC="-l$dpp_nspr_lib" 
     258         PLC_LIB_MSVCCC="-l$dpp_plc_lib" 
     259         PLDS_LIB_MSVCCC="-l$dpp_plds_lib" 
     260         NSPR_LDFLAGS_MSVCCC="-L$dpp_nspr_libdir" 
     261 
     262         NSPR_LIB_LINK_EXE="$dpp_nspr_lib.lib" 
     263         PLC_LIB_LINK_EXE="$dpp_plc_lib.lib" 
     264         PLDS_LIB_LINK_EXE="$dpp_plds_lib.lib" 
     265         NSPR_LDFLAGS_LINK_EXE="/libpath:\"$dpp_nspr_libdir\"" 
     266 
     267         NSPR_LIB_STATIC="\$(NSPR_ROOT)/lib/libnspr$NSPR_VER.a" 
     268         PLC_LIB_STATIC="\$(NSPR_ROOT)/lib/libplc$NSPR_VER.a" 
     269         PLDS_LIB_STATIC="\$(NSPR_ROOT)/lib/libplds$NSPR_VER.a" 
     270      else 
     271         ifelse([$3], , :, [$3]) 
     272      fi 
    242273   fi 
    243274 
     
    249280   AC_SUBST(PLC_LIB_STATIC) 
    250281   AC_SUBST(PLDS_LIB_STATIC) 
     282   AC_SUBST(NSPR_LIBDIR) 
    251283]) 
    252284 
  • juggler/trunk/Doozer++/config/pkgs/openal.m4

    r19399 r19448  
    2222dnl ----------------------------------------------------------------- 
    2323dnl File:          openal.m4,v 
    24 dnl Date modified: 2006/11/02 17:31:43 
    25 dnl Version:       1.23 
     24dnl Date modified: 2006/11/09 22:12:22 
     25dnl Version:       1.24 
    2626dnl ----------------------------------------------------------------- 
    2727dnl ************** <auto-copyright.pl END do not edit this line> ************** 
     
    4343dnl     AL_INCLUDES - Extra include path for the OpenAL header directory. 
    4444dnl     AL_LDFLAGS  - Extra linker flags for the OpenAL library directory. 
     45dnl     AL_LIBDIR   - The directory containing the OpenAL library. On Mac OS X, 
     46dnl                   this is the directory containing the OpenAL framework. 
    4547dnl =========================================================================== 
    4648 
    47 dnl openal.m4,v 1.23 2006/11/02 17:31:43 patrickh Exp 
     49dnl openal.m4,v 1.24 2006/11/09 22:12:22 patrickh Exp 
    4850 
    4951dnl --------------------------------------------------------------------------- 
     
    131133                           [dpp_cv_alEnable_openal_lib='no'])]) 
    132134 
     135         DPP_LANG_RESTORE 
     136 
     137         dnl Restore all the variables now that we are done testing. 
     138         CFLAGS="$dpp_save_CFLAGS" 
     139         CPPFLAGS="$dpp_save_CPPFLAGS" 
     140         LDFLAGS="$dpp_save_LDFLAGS" 
    133141         LIBS="$dpp_save_LIBS" 
    134142 
     
    136144         if test "x$dpp_cv_alEnable_openal_lib" = "xyes" ; then 
    137145            dpp_have_openal='yes' 
     146            AL_LIBDIR="$OALROOT/libs" 
    138147            ifelse([$2], , :, [$2]) 
    139148         dnl Failure. 
     
    142151            ifelse([$3], , :, [$3]) 
    143152         fi 
    144  
    145          DPP_LANG_RESTORE 
    146153      elif test "x$PLATFORM" = "xDarwin" ; then 
    147154         DPP_LANG_SAVE 
     
    158165                           [dpp_cv_alEnable_openal_lib='no'])]) 
    159166 
     167         DPP_LANG_RESTORE 
     168 
     169         dnl Restore all the variables now that we are done testing. 
     170         CFLAGS="$dpp_save_CFLAGS" 
     171         CPPFLAGS="$dpp_save_CPPFLAGS" 
     172         LDFLAGS="$dpp_save_LDFLAGS" 
    160173         LIBS="$dpp_save_LIBS" 
    161174 
     
    163176         if test "x$dpp_cv_alEnable_openal_lib" = "xyes" ; then 
    164177            dpp_have_openal='yes' 
     178            AL_LIBDIR="$OALROOT" 
    165179            ifelse([$2], , :, [$2]) 
    166180         dnl Failure. 
     
    169183            ifelse([$3], , :, [$3]) 
    170184         fi 
    171  
    172          DPP_LANG_RESTORE 
    173185      dnl Other platforms. 
    174186      else 
     187         if test "lib$LIBBITSUF" != "lib" ; then 
     188            libdirs="lib$LIBBITSUF lib" 
     189         else 
     190            libdirs="lib" 
     191         fi 
     192 
     193         LIBS="-lopenal $LIBS $DYN_LOAD_LIB -lm" 
     194 
    175195         DPP_LANG_SAVE 
    176196         DPP_LANG_C 
    177197 
    178          dnl The pthreads-related macros will set only one of $PTHREAD_ARG or 
    179          dnl $PTHREAD_LIB, so it's safe (and simpler) for us to use both here. 
    180          LDFLAGS="-L$OALROOT/lib $LDFLAGS $PTHREAD_ARG $PTHREAD_LIB" 
    181  
    182          AC_CHECK_LIB([openal], [alEnable], 
    183             [AC_CHECK_HEADER([AL/al.h], [dpp_have_openal='yes'], 
    184                [dpp_have_openal='no'])], 
    185             [dpp_have_openal='no'], 
    186             [$DYN_LOAD_LIB -lm]) 
     198         for l in $libdirs ; do 
     199            cur_al_libdir="$OALROOT/$l" 
     200 
     201            dnl The pthreads-related macros will set only one of 
     202            dnl $PTHREAD_ARG or $PTHREAD_LIB, so it's safe (and simpler) 
     203            dnl for us to use both here. 
     204            LDFLAGS="-L$cur_al_libdir $dpp_save_LDFLAGS $PTHREAD_ARG $PTHREAD_LIB" 
     205 
     206            AC_MSG_CHECKING([for alEnable in -lopenal in $cur_al_libdir]) 
     207            AC_TRY_LINK([#include <AL/al.h>], [alEnable(0);], 
     208                        [dpp_have_openal='yes'], [dpp_have_openal='no']) 
     209            AC_MSG_RESULT([$dpp_have_openal]) 
     210 
     211            if test "$dpp_have_openal" = "yes" ; then 
     212               AL_LIBDIR="$cur_al_libdir" 
     213               break 
     214            fi 
     215         done 
     216 
     217         DPP_LANG_RESTORE 
     218 
     219         dnl Restore all the variables now that we are done testing. 
     220         CFLAGS="$dpp_save_CFLAGS" 
     221         CPPFLAGS="$dpp_save_CPPFLAGS" 
     222         LDFLAGS="$dpp_save_LDFLAGS" 
     223         LIBS="$dpp_save_LIBS" 
    187224 
    188225         dnl Success. 
     
    193230            ifelse([$3], , :, [$3]) 
    194231         fi 
    195  
    196          DPP_LANG_RESTORE 
    197232      fi 
    198233 
     
    227262         OPENAL='yes' 
    228263      fi 
    229  
    230       dnl Restore all the variables now that we are done testing. 
    231       CFLAGS="$dpp_save_CFLAGS" 
    232       CPPFLAGS="$dpp_save_CPPFLAGS" 
    233       LDFLAGS="$dpp_save_LDFLAGS" 
    234       LIBS="$dpp_save_LIBS" 
    235264   fi 
    236265 
     
    241270   AC_SUBST(AL_INCLUDES) 
    242271   AC_SUBST(AL_LDFLAGS) 
     272   AC_SUBST(AL_LIBDIR) 
    243273])