Changeset 1348


Ignore:
Timestamp:
Jun 21, 2008, 6:49:12 AM (13 years ago)
Author:
Peter
Message:

adding a yat-config script (fixes #353)
also fixes ticket #376 by using some magic from apr

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r1319 r1348  
    2828SUBDIRS = yat test doc
    2929
     30install-exec-hook: build_support/yat-config
     31  $(INSTALL_SCRIPT) build_support/yat-config $(bindir)/yat-config
     32
    3033.PHONY: doc
    3134doc:; @(cd doc; $(MAKE) $@)
  • trunk/build_support/yat.am

    r1327 r1348  
    2525##
    2626
    27 AM_CPPFLAGS = -I$(top_srcdir) $(GSL_CFLAGS) $(BOOST_CPPFLAGS)
    28 
    29 # this assumes that gsl has been installed with default
    30 # libdir = ${exec_prefix}/lib = ${prefix}/lib
    31 AM_LDFLAGS = -L$(GSL_PREFIX)/lib
     27AM_CPPFLAGS = -I$(top_srcdir) $(EXTRA_CPPFLAGS)
     28AM_CXXFLAGS = $(EXTRA_CXXFLAGS)
     29AM_LDFLAGS = $(EXTRA_LDFLAGS)
  • trunk/configure.ac

    r1327 r1348  
    6262
    6363AM_CONDITIONAL(HAVE_DOXYGEN, test "$HAVE_DOXYGEN" = "true")
     64
     65m4_sinclude(./build_support/apr_common.m4)
     66# Save user-defined environment settings for later restoration
     67APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)
     68APR_SAVE_THE_ENVIRONMENT(CXXFLAGS)
     69APR_SAVE_THE_ENVIRONMENT(LDFLAGS)
    6470
    6571# Checks for libraries.
     
    9096if test "$gsl_found" = "yes"; then
    9197   LIBS="-lgsl $LIBS"
    92    GSL_PREFIX=`$GSL_CONFIG --prefix`
    93    AC_SUBST(GSL_PREFIX)
     98   # grep words starting with '-L' in other words LDFLAGS
     99   for i in $GSL_LIBS; do
     100     if test ${i:0:2} = "-L"; then
     101       LDFLAGS="$LDFLAGS $i"
     102     fi
     103   done
    94104fi
    95105
     
    97107m4_sinclude(./build_support/ax_boost.m4)
    98108AX_BOOST("1.33")
     109CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
    99110
    100111# Checks for header files.
     
    161172
    162173# yat specific settings
     174YAT_LIBNAME="yat"
    163175YAT_LIB="libyat.la"
    164176YAT_LIB_LOCATION="yat"
     177AC_SUBST(YAT_LIBNAME)
    165178AC_SUBST(YAT_LIB)
    166179AC_SUBST(YAT_LIB_LOCATION)
     
    187200     yat/utility/Makefile])
    188201
     202AC_CONFIG_FILES([build_support/yat-config],
     203                [chmod +x build_support/yat-config])
     204
    189205# warning about missing doxygen
    190206if (test "$HAVE_DOXYGEN" != "true") ; then
     
    258274fi
    259275
     276# Reset flags
     277APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, EXTRA_)
     278APR_RESTORE_THE_ENVIRONMENT(CXXFLAGS, EXTRA_)
     279APR_RESTORE_THE_ENVIRONMENT(LDFLAGS, EXTRA_)
     280
    260281# Create output.
    261282AC_OUTPUT
     
    267288AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
    268289AC_MSG_NOTICE([  CPPFLAGS=\"$CPPFLAGS\"])
     290AC_MSG_NOTICE([  EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"])
    269291AC_MSG_NOTICE([  CXXFLAGS=\"$CXXFLAGS\"])
     292AC_MSG_NOTICE([  EXTRA_CXXFLAGS=\"$EXTRA_CXXFLAGS\"])
     293AC_MSG_NOTICE([  LDFLAGS=\"$LDFLAGS\"])
     294AC_MSG_NOTICE([  EXTRA_LDFLAGS=\"$EXTRA_LDFLAGS\"])
    270295AC_MSG_NOTICE([  LIBS=\"$LIBS\"])
    271 AC_MSG_NOTICE([  LDFLAGS=\"$LDFLAGS\"])
    272296AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
    273297AC_MSG_NOTICE([])
Note: See TracChangeset for help on using the changeset viewer.