Changeset 31317 in project


Ignore:
Timestamp:
08/31/14 09:35:52 (5 years ago)
Author:
Ivan Raikov
Message:

nemo: more fixes in the nest-specific parts of the granule cell example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/nemo/trunk/examples/Granule/Granule_DeSouza10.nemo

    r31316 r31317  
    11221122)
    11231123
     1124    ("nestmodule_configure_gsl.ac" () 
     1125#<<EOF
     1126AC_PREREQ(2.52)
     1127
     1128AC_INIT(granulemodule, 1.0, raikov@oist.jp)
     1129
     1130# These variables are exported to include/config.h
     1131GRANULEMODULE_MAJOR=1
     1132GRANULEMODULE_MINOR=0
     1133GRANULEMODULE_PATCHLEVEL=0
     1134
     1135# Exporting source and build directories requires full path names.
     1136# Thus we have to expand.
     1137# Here, we are in top build dir, since source dir must exist, we can just
     1138# move there and call pwd
     1139if test "x$srcdir" = x ; then
     1140  PKGSRCDIR=`pwd`
     1141else
     1142  PKGSRCDIR=`cd $srcdir && pwd`
     1143fi
     1144PKGBUILDDIR=`pwd`
     1145
     1146# If this is not called, install-sh will be put into .. by bootstrap.sh
     1147# moritz, 06-26-06
     1148AC_CONFIG_AUX_DIR(.)
     1149
     1150AM_INIT_AUTOMAKE(nest, $GRANULEMODULE_VERSION)
     1151
     1152# obtain host system type; HEP 2004-12-20
     1153AC_CANONICAL_HOST
     1154
     1155# ------------------------------------------------------------------------
     1156# Handle options
     1157#
     1158# NOTE: No programs/compilations must be run in this section;
     1159#       otherwise CFLAGS and CXXFLAGS may take on funny default
     1160#       values.
     1161#       HEP 2004-12-20
     1162# ------------------------------------------------------------------------
     1163
     1164# nest-config
     1165NEST_CONFIG=`which nest-config`
     1166AC_ARG_WITH(nest,[  --with-nest=script  nest-config script including path],
     1167[
     1168  if test "$withval" != yes; then
     1169    NEST_CONFIG=$withval
     1170  else
     1171    AC_MSG_ERROR([--with-nest-config expects the nest-config script as argument. See README for details.])
     1172  fi
     1173])
     1174
     1175# -------------------------------------------
     1176# END Handle options
     1177# -------------------------------------------
     1178
     1179
     1180# does nest-config work
     1181AC_MSG_CHECKING([for nest-config ])
     1182AC_CHECK_FILE($NEST_CONFIG, HAVE_NEST=yes,
     1183              AC_MSG_ERROR([No usable nest-config was found. You may want to use --with-nest-config.]))
     1184AC_MSG_RESULT(found)
     1185
     1186# the following will crash if nest-config does not run
     1187# careful, lines below must not break
     1188AC_MSG_CHECKING([for NEST directory information ])
     1189NEST_PREFIX=`$NEST_CONFIG --prefix`
     1190NEST_CPPFLAGS=`$NEST_CONFIG --cflags`
     1191NEST_COMPILER=`$NEST_CONFIG --compiler`
     1192if test $prefix = NONE; then prefix=`$NEST_CONFIG --prefix`; fi
     1193AC_MSG_RESULT($NEST_CPPFLAGS)
     1194
     1195
     1196# Set the platform-dependent compiler flags based on the canonical
     1197# host string.  These flags are placed in AM_{C,CXX}FLAGS.  If
     1198# {C,CXX}FLAGS are given as environment variables, then they are
     1199# appended to the set of automatically chosen flags.  After
     1200# {C,CXX}FLAGS have been read out, they must be cleared, since
     1201# system-dependent defaults will otherwise be placed into the
     1202# Makefiles.  HEP 2004-12-20.
     1203
     1204# Before we can determine the proper compiler flags, we must know
     1205# which compiler we are using.  Since the pertaining AC macros run the
     1206# compiler and set CFLAGS, CXXFLAGS to system-dependent values, we
     1207# need to save command line/enviroment settings of these variables
     1208# first. AC_AIX must run before the compiler is run, so we must run it
     1209# here.
     1210# HEP 2004-12-21
     1211
     1212GRANULEMODULE_SAVE_CXXFLAGS=$CXXFLAGS
     1213
     1214# Must first check if we are on AIX
     1215AC_AIX
     1216
     1217# Check for C++ compiler, looking for the same compiler
     1218# used with NEST
     1219AC_PROG_CXX([ $NEST_COMPILER ])
     1220
     1221# the following is makeshift, should have the macro set proper
     1222# GRANULEMODULE_SET_CXXFLAGS
     1223AM_CXXFLAGS=$GRANULEMODULE_SAVE_CXXFLAGS
     1224CXXFLAGS=
     1225
     1226## Configure C environment
     1227
     1228AC_PROG_LD
     1229AC_PROG_INSTALL
     1230
     1231AC_LIBLTDL_CONVENIENCE     ## put libltdl into a convenience library
     1232AC_PROG_LIBTOOL            ## use libtool
     1233AC_CONFIG_SUBDIRS(libltdl) ## also configure subdir containing libltdl
     1234
     1235#-- Set the language to C++
     1236AC_LANG_CPLUSPLUS
     1237
     1238#-- Look for programs needed in the Makefile
     1239AC_PROG_CXXCPP
     1240AM_PROG_LIBTOOL
     1241AC_PATH_PROGS([MAKE],[gmake make],[make])
     1242
     1243# ---------------------------------------------------------------
     1244# Configure directories to be built
     1245# ---------------------------------------------------------------
     1246
     1247PKGDATADIR=$datadir/$PACKAGE
     1248PKGDOCDIR=$datadir/doc/$PACKAGE
     1249
     1250# set up directories from which to build help
     1251# second line replaces space with colon as separator
     1252HELPDIRS="$PKGSRCDIR $PKGSRCDIR/sli"
     1253HELPDIRS=`echo $HELPDIRS | tr " " ":"`
     1254
     1255#-- Replace these variables in *.in
     1256AC_SUBST(HAVE_NEST)
     1257AC_SUBST(NEST_CONFIG)
     1258AC_SUBST(NEST_CPPFLAGS)
     1259AC_SUBST(NEST_COMPILER)
     1260AC_SUBST(NEST_PREFIX)
     1261AC_SUBST(HELPDIRS)
     1262AC_SUBST(PKGSRCDIR)
     1263AC_SUBST(PKGBUILDDIR)
     1264AC_SUBST(PKGDATADIR)
     1265AC_SUBST(PKGDOCDIR)
     1266AC_SUBST(KERNEL)
     1267AC_SUBST(HOST)
     1268AC_SUBST(SED)
     1269AC_SUBST(LD)
     1270AC_SUBST(host_os)
     1271AC_SUBST(host_cpu)
     1272AC_SUBST(host_vendor)
     1273AC_SUBST(AS)
     1274AC_SUBST(CXX)
     1275AC_SUBST(AR)
     1276AC_SUBST(ARFLAGS)
     1277AC_SUBST(CXX_AR)
     1278AC_SUBST(AM_CXXFLAGS)
     1279AC_SUBST(AM_CFLAGS)
     1280AC_SUBST(MAKE)
     1281AC_SUBST(MAKE_FLAGS)
     1282AC_SUBST(INCLTDL)
     1283AC_SUBST(LIBLTDL)
     1284
     1285AM_CONFIG_HEADER(granulemodule_config.h:granulemodule_config.h.in)
     1286AC_CONFIG_FILES(Makefile)
     1287
     1288# -----------------------------------------------
     1289# Create output
     1290# -----------------------------------------------
     1291AC_OUTPUT
     1292
     1293
     1294# -----------------------------------------------
     1295# Report, after output at end of configure run
     1296# Must come after AC_OUTPUT, so that it is
     1297# displayed after libltdl has been configured
     1298# -----------------------------------------------
     1299
     1300echo
     1301echo "-------------------------------------------------------"
     1302echo "Granule module Configuration Summary"
     1303echo "-------------------------------------------------------"
     1304echo
     1305echo "C++ compiler        : $CXX"
     1306echo "C++ compiler flags  : $AM_CXXFLAGS"
     1307echo "NEST compiler flags : $NEST_CPPFLAGS"
     1308
     1309# these variables will still contain '${prefix}'
     1310# we want to have the versions where this is resolved, too:
     1311eval eval eval  PKGDOCDIR_AS_CONFIGURED=$PKGDOCDIR
     1312eval eval eval  PKGDATADIR_AS_CONFIGURED=$PKGDATADIR
     1313
     1314echo
     1315echo "-------------------------------------------------------"
     1316echo
     1317echo "You can build and install Granule module now, using"
     1318echo "  make"
     1319echo "  make install"
     1320echo
     1321echo "Granule module will be installed to:"
     1322echo -n "  "; eval eval echo "$libdir"
     1323echo
     1324
     1325EOF
     1326)
     1327
    11241328    ("nestmodule_configure_cvode.ac" () 
    11251329#<<EOF
     
    17161920           to load it.
    17171921      */
    1718      return std::string(
    1719        "/granulemodule /C++ ($Revision: 8512 $) provide-component "
    1720        "/granulemodule /SLI (7165) require-component"
    1721        );
     1922     return std::string("");
    17221923   }
    17231924
Note: See TracChangeset for help on using the changeset viewer.