Changeset 29874 in project


Ignore:
Timestamp:
10/09/13 02:59:45 (8 years ago)
Author:
Ivan Raikov
Message:

nemo: added NEST/IDA configuration for Golgi model example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/nemo/trunk/examples/Golgi/Golgi_DeSouza10.nemo

    r29839 r29874  
    23652365)
    23662366
    2367     ("nestmodule_configure.ac" () 
     2367    ("nestmodule_configure_cvode.ac" () 
    23682368#<<EOF
    23692369AC_PREREQ(2.52)
     
    24592459AC_MSG_CHECKING([for SUNDIALS linker options ])
    24602460SUNDIALS_LDFLAGS="`$SUNDIALS_CONFIG -m cvode -t s -l c -s libs` -lblas -llapack"
     2461AC_MSG_RESULT($SUNDIALS_LDFLAGS)
     2462
     2463# Set the platform-dependent compiler flags based on the canonical
     2464# host string.  These flags are placed in AM_{C,CXX}FLAGS.  If
     2465# {C,CXX}FLAGS are given as environment variables, then they are
     2466# appended to the set of automatically chosen flags.  After
     2467# {C,CXX}FLAGS have been read out, they must be cleared, since
     2468# system-dependent defaults will otherwise be placed into the
     2469# Makefiles.  HEP 2004-12-20.
     2470
     2471# Before we can determine the proper compiler flags, we must know
     2472# which compiler we are using.  Since the pertaining AC macros run the
     2473# compiler and set CFLAGS, CXXFLAGS to system-dependent values, we
     2474# need to save command line/enviroment settings of these variables
     2475# first. AC_AIX must run before the compiler is run, so we must run it
     2476# here.
     2477# HEP 2004-12-21
     2478
     2479GOLGIMODULE_SAVE_CXXFLAGS=$CXXFLAGS
     2480
     2481# Must first check if we are on AIX
     2482AC_AIX
     2483
     2484# Check for C++ compiler, looking for the same compiler
     2485# used with NEST
     2486AC_PROG_CXX([ $NEST_COMPILER ])
     2487
     2488# the following is makeshift, should have the macro set proper
     2489# GOLGIMODULE_SET_CXXFLAGS
     2490AM_CXXFLAGS=$GOLGIMODULE_SAVE_CXXFLAGS
     2491CXXFLAGS=
     2492
     2493## Configure C environment
     2494
     2495AC_PROG_LD
     2496AC_PROG_INSTALL
     2497
     2498AC_LIBLTDL_CONVENIENCE     ## put libltdl into a convenience library
     2499AC_PROG_LIBTOOL            ## use libtool
     2500AC_CONFIG_SUBDIRS(libltdl) ## also configure subdir containing libltdl
     2501
     2502#-- Set the language to C++
     2503AC_LANG_CPLUSPLUS
     2504
     2505#-- Look for programs needed in the Makefile
     2506AC_PROG_CXXCPP
     2507AM_PROG_LIBTOOL
     2508AC_PATH_PROGS([MAKE],[gmake make],[make])
     2509
     2510# ---------------------------------------------------------------
     2511# Configure directories to be built
     2512# ---------------------------------------------------------------
     2513
     2514PKGDATADIR=$datadir/$PACKAGE
     2515PKGDOCDIR=$datadir/doc/$PACKAGE
     2516
     2517# set up directories from which to build help
     2518# second line replaces space with colon as separator
     2519HELPDIRS="$PKGSRCDIR $PKGSRCDIR/sli"
     2520HELPDIRS=`echo $HELPDIRS | tr " " ":"`
     2521
     2522#-- Replace these variables in *.in
     2523AC_SUBST(HAVE_NEST)
     2524AC_SUBST(NEST_CONFIG)
     2525AC_SUBST(NEST_CPPFLAGS)
     2526AC_SUBST(NEST_COMPILER)
     2527AC_SUBST(NEST_PREFIX)
     2528AC_SUBST(HELPDIRS)
     2529AC_SUBST(PKGSRCDIR)
     2530AC_SUBST(PKGBUILDDIR)
     2531AC_SUBST(PKGDATADIR)
     2532AC_SUBST(PKGDOCDIR)
     2533AC_SUBST(KERNEL)
     2534AC_SUBST(HOST)
     2535AC_SUBST(SED)
     2536AC_SUBST(LD)
     2537AC_SUBST(host_os)
     2538AC_SUBST(host_cpu)
     2539AC_SUBST(host_vendor)
     2540AC_SUBST(AS)
     2541AC_SUBST(CXX)
     2542AC_SUBST(AR)
     2543AC_SUBST(ARFLAGS)
     2544AC_SUBST(CXX_AR)
     2545AC_SUBST(AM_CXXFLAGS)
     2546AC_SUBST(AM_CFLAGS)
     2547AC_SUBST(MAKE)
     2548AC_SUBST(MAKE_FLAGS)
     2549AC_SUBST(INCLTDL)
     2550AC_SUBST(LIBLTDL)
     2551AC_SUBST(SUNDIALS_CONFIG)
     2552AC_SUBST(SUNDIALS_CPPFLAGS)
     2553AC_SUBST(SUNDIALS_LDFLAGS)
     2554
     2555AM_CONFIG_HEADER(golgimodule_config.h:golgimodule_config.h.in)
     2556AC_CONFIG_FILES(Makefile)
     2557
     2558# -----------------------------------------------
     2559# Create output
     2560# -----------------------------------------------
     2561AC_OUTPUT
     2562
     2563
     2564# -----------------------------------------------
     2565# Report, after output at end of configure run
     2566# Must come after AC_OUTPUT, so that it is
     2567# displayed after libltdl has been configured
     2568# -----------------------------------------------
     2569
     2570echo
     2571echo "-------------------------------------------------------"
     2572echo "Golgi module Configuration Summary"
     2573echo "-------------------------------------------------------"
     2574echo
     2575echo "C++ compiler        : $CXX"
     2576echo "C++ compiler flags  : $AM_CXXFLAGS"
     2577echo "NEST compiler flags : $NEST_CPPFLAGS"
     2578echo "SUNDIALS compiler flags : $SUNDIALS_CPPFLAGS"
     2579echo "SUNDIALS linker flags : $SUNDIALS_LDFLAGS"
     2580
     2581# these variables will still contain '${prefix}'
     2582# we want to have the versions where this is resolved, too:
     2583eval eval eval  PKGDOCDIR_AS_CONFIGURED=$PKGDOCDIR
     2584eval eval eval  PKGDATADIR_AS_CONFIGURED=$PKGDATADIR
     2585
     2586echo
     2587echo "-------------------------------------------------------"
     2588echo
     2589echo "You can build and install Golgi module now, using"
     2590echo "  make"
     2591echo "  make install"
     2592echo
     2593echo "Golgi module will be installed to:"
     2594echo -n "  "; eval eval echo "$libdir"
     2595echo
     2596
     2597EOF
     2598)
     2599
     2600    ("nestmodule_makefile.am" () 
     2601#<<EOF
     2602
     2603# Automake file for external dynamic modules for NEST
     2604#
     2605# Hans Ekkehard Plesser, April 2008
     2606# Automake file for the Developer Module
     2607#
     2608# libgolgimodule is built as a normal, installable library.
     2609# It will be installed to $prefix/lib by make install.
     2610#
     2611# Headers from this directory are not to be installed upon
     2612# make install. They are therefore included in _SOURCES.
     2613
     2614
     2615libdir= @libdir@/nest
     2616
     2617lib_LTLIBRARIES=      golgimodule.la libgolgimodule.la
     2618
     2619golgimodule_la_CXXFLAGS= @AM_CXXFLAGS@
     2620golgimodule_la_SOURCES=  golgimodule.cpp      golgimodule.h      \
     2621                      Golgi.cpp Golgi.h
     2622golgimodule_la_LDFLAGS=  -module
     2623
     2624libgolgimodule_la_CXXFLAGS= $(golgimodule_la_CXXFLAGS) -DLINKED_MODULE
     2625libgolgimodule_la_SOURCES=  $(golgimodule_la_SOURCES)
     2626
     2627MAKEFLAGS= @MAKE_FLAGS@
     2628
     2629AM_CPPFLAGS= @NEST_CPPFLAGS@ \
     2630             @SUNDIALS_CPPFLAGS@ \
     2631             @INCLTDL@     
     2632
     2633AM_LDFLAGS = @SUNDIALS_LDFLAGS@
     2634
     2635.PHONY: install-slidoc
     2636
     2637nobase_pkgdata_DATA=\
     2638        golgimodule.sli
     2639
     2640install-slidoc:
     2641        NESTRCFILENAME=/dev/null $(DESTDIR)$(NEST_PREFIX)/bin/sli --userargs="@HELPDIRS@" $(NEST_PREFIX)/share/nest/sli/install-help.sli
     2642
     2643install-data-hook: install-exec install-slidoc
     2644
     2645EXTRA_DIST= sli
     2646
     2647EOF
     2648)
     2649
     2650    ("nestmodule_configure_ida.ac" () 
     2651#<<EOF
     2652AC_PREREQ(2.52)
     2653
     2654AC_INIT(golgimodule, 1.0, raikov@oist.jp)
     2655
     2656# These variables are exported to include/config.h
     2657GOLGIMODULE_MAJOR=1
     2658GOLGIMODULE_MINOR=0
     2659GOLGIMODULE_PATCHLEVEL=0
     2660
     2661# Exporting source and build directories requires full path names.
     2662# Thus we have to expand.
     2663# Here, we are in top build dir, since source dir must exist, we can just
     2664# move there and call pwd
     2665if test "x$srcdir" = x ; then
     2666  PKGSRCDIR=`pwd`
     2667else
     2668  PKGSRCDIR=`cd $srcdir && pwd`
     2669fi
     2670PKGBUILDDIR=`pwd`
     2671
     2672# If this is not called, install-sh will be put into .. by bootstrap.sh
     2673# moritz, 06-26-06
     2674AC_CONFIG_AUX_DIR(.)
     2675
     2676AM_INIT_AUTOMAKE(nest, $GOLGIMODULE_VERSION)
     2677
     2678# obtain host system type; HEP 2004-12-20
     2679AC_CANONICAL_HOST
     2680
     2681# ------------------------------------------------------------------------
     2682# Handle options
     2683#
     2684# NOTE: No programs/compilations must be run in this section;
     2685#       otherwise CFLAGS and CXXFLAGS may take on funny default
     2686#       values.
     2687#       HEP 2004-12-20
     2688# ------------------------------------------------------------------------
     2689
     2690# nest-config
     2691NEST_CONFIG=`which nest-config`
     2692AC_ARG_WITH(nest,[  --with-nest=script  nest-config script including path],
     2693[
     2694  if test "$withval" != yes; then
     2695    NEST_CONFIG=$withval
     2696  else
     2697    AC_MSG_ERROR([--with-nest-config expects the nest-config script as argument. See README for details.])
     2698  fi
     2699])
     2700
     2701# -------------------------------------------
     2702# END Handle options
     2703# -------------------------------------------
     2704
     2705# sundials-config
     2706SUNDIALS_CONFIG=`which sundials-config`
     2707AC_ARG_WITH(sundials,[  --with-sundials=script  sundials-config script including path],
     2708[
     2709  if test "$withval" != yes; then
     2710    SUNDIALS_CONFIG=$withval
     2711#  else
     2712#    AC_MSG_ERROR([--with-sundials-config expects the sundials-config script as argument. See README for details.])
     2713  fi
     2714])
     2715
     2716
     2717# does nest-config work
     2718AC_MSG_CHECKING([for nest-config ])
     2719AC_CHECK_FILE($NEST_CONFIG, HAVE_NEST=yes,
     2720              AC_MSG_ERROR([No usable nest-config was found. You may want to use --with-nest-config.]))
     2721AC_MSG_RESULT(found)
     2722
     2723AC_MSG_CHECKING([for sundials-config ])
     2724AC_CHECK_FILE($SUNDIALS_CONFIG, HAVE_SUNDIALS=yes,
     2725              AC_MSG_WARN([No usable sundials-config was found. You may want to use --with-sundials-config.]))
     2726AC_MSG_RESULT(found)
     2727
     2728# the following will crash if nest-config does not run
     2729# careful, lines below must not break
     2730AC_MSG_CHECKING([for NEST directory information ])
     2731NEST_PREFIX=`$NEST_CONFIG --prefix`
     2732NEST_CPPFLAGS=`$NEST_CONFIG --cflags`
     2733NEST_COMPILER=`$NEST_CONFIG --compiler`
     2734if test $prefix = NONE; then prefix=`$NEST_CONFIG --prefix`; fi
     2735AC_MSG_RESULT($NEST_CPPFLAGS)
     2736
     2737
     2738AC_MSG_CHECKING([for SUNDIALS preprocessor flags ])
     2739SUNDIALS_CPPFLAGS="`$SUNDIALS_CONFIG -m ida -t s -l c -s cppflags`"
     2740AC_MSG_RESULT($SUNDIALS_CPPFLAGS)
     2741
     2742AC_MSG_CHECKING([for SUNDIALS linker options ])
     2743SUNDIALS_LDFLAGS="`$SUNDIALS_CONFIG -m ida -t s -l c -s libs` -lblas -llapack"
    24612744AC_MSG_RESULT($SUNDIALS_LDFLAGS)
    24622745
Note: See TracChangeset for help on using the changeset viewer.