Changeset 337


Ignore:
Timestamp:
Aug 6, 2012 11:03:16 AM (7 years ago)
Author:
kulshres
Message:

Merge branch 'master' of 'gitclone' into svn

It may require some work for hessian patterns and advector to work
properly, since they were changed simultaneously by Andrea and I

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

The following commits were merged:

commit aeb288e939c7657aeaf75a8cbb833f9096ee2ce0
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Aug 6 16:46:20 2012 +0200

correct compilation error in message printing

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 0d6e681b19d116bf0aca1d918fb567aed49e1766
Author: Benjamin Letschert <letschi@…>
Date: Tue May 29 15:53:45 2012 +0200

for floor_op and ceil_op in INDO+TIGHT mode ind_dom should be set zero

commit 35689c69c49e02fb1b211e4f873851ce734c839e
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri May 4 16:34:49 2012 +0200

add a comment for clarification

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 710b93301d98610239f17dc40ba8cba6651f2ea5
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri May 4 14:21:49 2012 +0200

add copyright notices

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 830f2cc75ba823c2343f4a524eb3e90ab02bc278
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu May 3 13:59:32 2012 +0200

Use the block allocation and don't write all locations to tape

Now that we ensure block structure while allocating an advector
we don't need to write all locations to tape in order to do
subscripting operations. We can use arithmetic.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 8599c889e5cd684a7066600835df5f0c033eb339
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu May 3 13:57:39 2012 +0200

Allocate advector ensuring contiguous locations

use a dummy blocker to call the function before calling the vector
constructor. Also use the fill constructor since the initialise
constructor is experimental (for some reason) and a fill constructor
is called internally by gcc anyway. This way we won't have to ensure a
n+1 block and get holes.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit d62777e6070cf8b80b7b32616a874186e6463919
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu May 3 13:50:48 2012 +0200

Always put the last freed block to the front

This will make it efficienter if a block is deallocated right
one after the other. There will only be a search the first time
and all others will just work with the front of the list.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 33ae71a35fc04da062c4ba85659cbaf474caf1b8
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Apr 27 17:36:41 2012 +0200

changes in StoreManagemerLocintBlock? to make it work right

add StoreManagerLocintBlock? to be the default StoreManager? in
tape_handling.cpp

All existing ADOL-C programs need to be tested again.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit af30b922ee0a267555fdcdfe66d0823aa98688be
Author: Benjamin Letschert <letschi@…>
Date: Fri Apr 27 13:09:56 2012 +0200

Adding new storem anagement StoreManagerLocintBlock? to storemanager.h
and to tape_handling.cpp

commit 7875317a03b08a2729879edfaec7ae5cd1363ef2
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Feb 29 08:49:25 2012 +0100

convert tape stats to size_t from uint

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 11e535ae503f5961d0c62336d6942c96e4b7c3ba
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Jan 12 13:22:27 2012 +0100

Revert "add missing arguments to ext_fct calls"

This reverts commit 00622f92b5444e81f0c3760eeee0e14d4e8e4787.

This was temporary and wasn't supposed to be uploaded, some parts will
go into trunk.

commit 37ca7b37f3538153054dee40d3a75d560b3aa81f
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Jan 12 13:21:13 2012 +0100

Revert "add safeguards and indo mode to ext_diff"

This reverts commit 507df83d988e3d64848eb0350369094b0b2ce742.

This was temporary for debugging and wasn't supposed to be uploaded

commit 507df83d988e3d64848eb0350369094b0b2ce742
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Sat Dec 31 23:46:23 2011 +0100

add safeguards and indo mode to ext_diff

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 00622f92b5444e81f0c3760eeee0e14d4e8e4787
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Sat Dec 31 00:47:17 2011 +0100

add missing arguments to ext_fct calls

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 1c1c7347867e583509716f7e2a8395875d0e3d53
Author: Benjamin Letschert <letschi@…>
Date: Fri Dec 16 14:18:24 2011 +0100

Bugfix in copy_index_domain

commit 69df20b8f0240e80515c7f0df456f124cef70cf8
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Dec 5 11:32:58 2011 +0100

shift around some code and add another constructor

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit b2c13089d4f5b45e7626e04c17b2f7bee08adc6a
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Nov 29 17:29:47 2011 +0100

const no more needed after last bugfix

add check for gradient w.r.t. rhs vector.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 78ea1e83eb17163fa0703e7b2b289659c4c6d42b
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Nov 28 17:13:23 2011 +0100

bugfix in reverse mode during ref_copyout

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 3a7c70061118c89ad66afeec45d957dbdaf002b3
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Nov 28 17:12:39 2011 +0100

Add one more assignment operator

this one is used when an adubref is copied into another adubref
as in from one advector to another advector, as this needs taping
however we don't need to override copy-constructor, because
construction can only be done when returning adubref.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 9c150d9aa825cf1e5964cd15c7d38b9a34984fce
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Nov 25 12:49:14 2011 +0100

changed aTmp*TRES to (aTmp==0)?0:(aTmp*TRES) and similar occurences to avoid nans by 0*inf

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 0efabbcb41d8b17f0fe55a35ca63ba93913bccbe
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Nov 25 12:32:36 2011 +0100

compile with -std=gnu99 to get both _GNU_SOURCE and _ISOC99_SOURCE

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 45fa79bd4d8ae0f4ef1e39b32f96271134e886f5
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Nov 25 12:20:02 2011 +0100

cast result of trunc to avoid warnings

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit b97ae47a80f7c0034b8f29d14656f75abcd51b4d
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Nov 24 17:53:11 2011 +0100

counting down with unsigned variables is dangerous

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 5dd6a95ce0403f9ac4b262a9546f86e95a5489ac
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Nov 24 17:52:40 2011 +0100

reverse the order of indep vars and add reverse call

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 2d794980215e1ae41af0e3cc6ed8a5e97507a2f7
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Nov 24 17:49:25 2011 +0100

Add functions to print L and R and compute scalar product

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 889d35f671f2d2eea4dda182b0d903746994fbcd
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Nov 24 17:47:31 2011 +0100

bugfixes in luexam

use less adoubles, loop variables for constant sized loops should
remain inactive size_t. counting down with size_t is bad.

const-ness of advectors matters during active subscripting,
espacially when the lhs is a subscripted advector too, unless
there is a expression involving badouble on the rhs.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 0dadd11bf743e7283a26613c1503778c6997654a
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Nov 23 17:18:05 2011 +0100

tweak the example a bit

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 898afff0d43d86941125dd2e71857c619e3f28a4
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Nov 23 17:17:43 2011 +0100

If location buffer must contain n+2 free spaces

in case location buffer goes onto disk then check and write that
block before doing a subscript operation
if location buffer is smaller than n+2 then we cannot continue.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 1c2e4771972f0ce4db38bd959c23d18c061be568
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Nov 23 15:38:50 2011 +0100

one more cast

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 71b506ae55f8d6754f5c2a1f800220cb5a5bb974
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Nov 23 15:27:53 2011 +0100

Compilation fixes for sparse configuration

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 73334f20d51e707ee709a3602060aa3351dc6c29
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Nov 22 18:23:37 2011 +0100

add an example that uses advector with permutations

Lu factorization with pivoting is implemented here. The same traced
procedure can be used for different matrices that require different
pivots.

Zos_forward has been verified, WIP to verify derivatives.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit c54da9e8cd03e99d9362cc1a7eb551101b5a4cb8
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Nov 22 18:20:35 2011 +0100

some more inline helpers for advector

the destructor need not contain anything.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit d403b2d2b7e591db7c353c8c3ce551e7d6174df0
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Nov 22 18:19:58 2011 +0100

implement condassign for adubref

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 696e18b5dcf9534f7609243f085a508fba178b6c
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Nov 22 18:19:09 2011 +0100

bugfix in -= operator for adubref

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit b7dd8285c6fe8262d07d0a5393c15bcca7eeae96
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Nov 21 13:47:48 2011 +0100

implement reference operations in forward and reverse mode

the referenced location is recorded in the taylor buffer of the
reference variable, and read from the taylor buffer before any
operation is performed. The operations are then performed directly
on the referenced location.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit d546c517676a42065a98df782898f9e3472836b2
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Nov 21 13:45:49 2011 +0100

add new operations for the tape to work with references

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 07508c193f53c6c5912485dcb517ca7c67b75234
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Nov 21 13:45:17 2011 +0100

Add a class to work as a reference to adouble and adub

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit e60d733c951a8a1d621a1401744fa03db78e9b92
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Mar 2 15:32:28 2011 +0100

introduce active subscript operation in forward and reverse

subscript operation as previously defined on advector was not quite
correct in case of computed index that changed while being evaluated
from tape. In this case we need the tape to record the subscript
operation so that the correct taylor and adjoint values are propagated
even if the index changed. This is especially true for index computation
via the lookupindex() function, where the index depends on the arguments
x and y which may change their values.

This active subscript is a copy_value operation not a copy_ref one.
So the result should not be used as an lvalue for any further operation.
In case the result is used as an lvalue the original entry in the
vector will not be altered, only the copied out version will be altered.

Also the safe mode of integer propagation for sparsity pattern
computation is not supported, only the tight mode is supported.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 5764beb91000483e02d4c6b52e67d177fff04a42
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Mar 2 13:59:12 2011 +0100

zeroing out the store is not necessary at all

and saves us some time by reducing memory access.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 29d3460e0c7a6d2839a25d8896c37fff98ad6a3c
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Mar 2 13:57:33 2011 +0100

oplate.h is not needed after installation

so don't install it, and don't make it public api. it is totally
internal to ADOL-C itself.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 0e3ac08ba9c6ac0aa7d3820def9e62e079a83e44
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Mar 1 16:00:17 2011 +0100

add missing include

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit b7364c7c2164981ce9e198b69f6aef8684388b43
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Mar 1 15:46:56 2011 +0100

Add new files to buildsystem.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit aaefbdef3a6e00792ce0c57acff67e4f4ee3224b
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Mar 1 15:38:59 2011 +0100

New class advector for index lookup and subscripting

This is a container using std::vector<adouble>. The subscripting
operations return references to adoubles, nothing needs to be written
onto the tape for this since the following operation using the adouble
reference will do the right thing.
The index lookup operation uses a sequence of n condassign_s ops which
are taped, and returns the index which matches the requirement as another
adouble.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

Location:
trunk
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/Makefile.in

    r322 r337  
    146146LTLIBOBJS = @LTLIBOBJS@
    147147MAKEINFO = @MAKEINFO@
     148MANIFEST_TOOL = @MANIFEST_TOOL@
    148149MKDIR_P = @MKDIR_P@
    149150NM = @NM@
     
    175176ac_adolc_cxxflags = @ac_adolc_cxxflags@
    176177ac_aux_dir = @ac_aux_dir@
     178ac_ct_AR = @ac_ct_AR@
    177179ac_ct_CC = @ac_ct_CC@
    178180ac_ct_CXX = @ac_ct_CXX@
     
    208210localedir = @localedir@
    209211localstatedir = @localstatedir@
    210 lt_ECHO = @lt_ECHO@
    211212mandir = @mandir@
    212213mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/Makefile.am

    r171 r337  
    3636
    3737if DOCEXA
    38 noinst_PROGRAMS         = detexam speelpenning powexam odexam \
     38noinst_PROGRAMS         = detexam speelpenning powexam odexam luexam \
    3939                          tapeless_scalar tapeless_vector
    4040endif
     
    4848odexam_SOURCES          = odexam.cpp
    4949
     50luexam_SOURCES          = luexam.cpp
     51
    5052tapeless_scalar_SOURCES = tapeless_scalar.cpp
    5153
  • trunk/ADOL-C/examples/Makefile.in

    r322 r337  
    3939host_triplet = @host@
    4040@DOCEXA_TRUE@noinst_PROGRAMS = detexam$(EXEEXT) speelpenning$(EXEEXT) \
    41 @DOCEXA_TRUE@   powexam$(EXEEXT) odexam$(EXEEXT) \
     41@DOCEXA_TRUE@   powexam$(EXEEXT) odexam$(EXEEXT) luexam$(EXEEXT) \
    4242@DOCEXA_TRUE@   tapeless_scalar$(EXEEXT) tapeless_vector$(EXEEXT)
    4343subdir = ADOL-C/examples
     
    5959am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
    6060am__v_lt_0 = --silent
     61am_luexam_OBJECTS = luexam.$(OBJEXT)
     62luexam_OBJECTS = $(am_luexam_OBJECTS)
     63luexam_LDADD = $(LDADD)
     64luexam_DEPENDENCIES =
    6165am_odexam_OBJECTS = odexam.$(OBJEXT)
    6266odexam_OBJECTS = $(am_odexam_OBJECTS)
     
    105109am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
    106110am__v_GEN_0 = @echo "  GEN   " $@;
    107 SOURCES = $(detexam_SOURCES) $(odexam_SOURCES) $(powexam_SOURCES) \
    108         $(speelpenning_SOURCES) $(tapeless_scalar_SOURCES) \
    109         $(tapeless_vector_SOURCES)
    110 DIST_SOURCES = $(detexam_SOURCES) $(odexam_SOURCES) $(powexam_SOURCES) \
    111         $(speelpenning_SOURCES) $(tapeless_scalar_SOURCES) \
    112         $(tapeless_vector_SOURCES)
     111SOURCES = $(detexam_SOURCES) $(luexam_SOURCES) $(odexam_SOURCES) \
     112        $(powexam_SOURCES) $(speelpenning_SOURCES) \
     113        $(tapeless_scalar_SOURCES) $(tapeless_vector_SOURCES)
     114DIST_SOURCES = $(detexam_SOURCES) $(luexam_SOURCES) $(odexam_SOURCES) \
     115        $(powexam_SOURCES) $(speelpenning_SOURCES) \
     116        $(tapeless_scalar_SOURCES) $(tapeless_vector_SOURCES)
    113117RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
    114118        html-recursive info-recursive install-data-recursive \
     
    202206LTLIBOBJS = @LTLIBOBJS@
    203207MAKEINFO = @MAKEINFO@
     208MANIFEST_TOOL = @MANIFEST_TOOL@
    204209MKDIR_P = @MKDIR_P@
    205210NM = @NM@
     
    231236ac_adolc_cxxflags = @ac_adolc_cxxflags@
    232237ac_aux_dir = @ac_aux_dir@
     238ac_ct_AR = @ac_ct_AR@
    233239ac_ct_CC = @ac_ct_CC@
    234240ac_ct_CXX = @ac_ct_CXX@
     
    264270localedir = @localedir@
    265271localstatedir = @localstatedir@
    266 lt_ECHO = @lt_ECHO@
    267272mandir = @mandir@
    268273mkdir_p = @mkdir_p@
     
    298303powexam_SOURCES = powexam.cpp
    299304odexam_SOURCES = odexam.cpp
     305luexam_SOURCES = luexam.cpp
    300306tapeless_scalar_SOURCES = tapeless_scalar.cpp
    301307tapeless_vector_SOURCES = tapeless_vector.cpp
     
    346352        @rm -f detexam$(EXEEXT)
    347353        $(AM_V_CXXLD)$(CXXLINK) $(detexam_OBJECTS) $(detexam_LDADD) $(LIBS)
     354luexam$(EXEEXT): $(luexam_OBJECTS) $(luexam_DEPENDENCIES)
     355        @rm -f luexam$(EXEEXT)
     356        $(AM_V_CXXLD)$(CXXLINK) $(luexam_OBJECTS) $(luexam_LDADD) $(LIBS)
    348357odexam$(EXEEXT): $(odexam_OBJECTS) $(odexam_DEPENDENCIES)
    349358        @rm -f odexam$(EXEEXT)
     
    369378
    370379@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/detexam.Po@am__quote@
     380@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/luexam.Po@am__quote@
    371381@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/odexam.Po@am__quote@
    372382@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/powexam.Po@am__quote@
  • trunk/ADOL-C/examples/additional_examples/Makefile.in

    r322 r337  
    148148LTLIBOBJS = @LTLIBOBJS@
    149149MAKEINFO = @MAKEINFO@
     150MANIFEST_TOOL = @MANIFEST_TOOL@
    150151MKDIR_P = @MKDIR_P@
    151152NM = @NM@
     
    177178ac_adolc_cxxflags = @ac_adolc_cxxflags@
    178179ac_aux_dir = @ac_aux_dir@
     180ac_ct_AR = @ac_ct_AR@
    179181ac_ct_CC = @ac_ct_CC@
    180182ac_ct_CXX = @ac_ct_CXX@
     
    210212localedir = @localedir@
    211213localstatedir = @localstatedir@
    212 lt_ECHO = @lt_ECHO@
    213214mandir = @mandir@
    214215mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/checkpointing/Makefile.in

    r322 r337  
    138138LTLIBOBJS = @LTLIBOBJS@
    139139MAKEINFO = @MAKEINFO@
     140MANIFEST_TOOL = @MANIFEST_TOOL@
    140141MKDIR_P = @MKDIR_P@
    141142NM = @NM@
     
    167168ac_adolc_cxxflags = @ac_adolc_cxxflags@
    168169ac_aux_dir = @ac_aux_dir@
     170ac_ct_AR = @ac_ct_AR@
    169171ac_ct_CC = @ac_ct_CC@
    170172ac_ct_CXX = @ac_ct_CXX@
     
    200202localedir = @localedir@
    201203localstatedir = @localstatedir@
    202 lt_ECHO = @lt_ECHO@
    203204mandir = @mandir@
    204205mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/clock/Makefile.in

    r322 r337  
    106106LTLIBOBJS = @LTLIBOBJS@
    107107MAKEINFO = @MAKEINFO@
     108MANIFEST_TOOL = @MANIFEST_TOOL@
    108109MKDIR_P = @MKDIR_P@
    109110NM = @NM@
     
    135136ac_adolc_cxxflags = @ac_adolc_cxxflags@
    136137ac_aux_dir = @ac_aux_dir@
     138ac_ct_AR = @ac_ct_AR@
    137139ac_ct_CC = @ac_ct_CC@
    138140ac_ct_CXX = @ac_ct_CXX@
     
    168170localedir = @localedir@
    169171localstatedir = @localstatedir@
    170 lt_ECHO = @lt_ECHO@
    171172mandir = @mandir@
    172173mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/detexam/Makefile.in

    r322 r337  
    142142LTLIBOBJS = @LTLIBOBJS@
    143143MAKEINFO = @MAKEINFO@
     144MANIFEST_TOOL = @MANIFEST_TOOL@
    144145MKDIR_P = @MKDIR_P@
    145146NM = @NM@
     
    171172ac_adolc_cxxflags = @ac_adolc_cxxflags@
    172173ac_aux_dir = @ac_aux_dir@
     174ac_ct_AR = @ac_ct_AR@
    173175ac_ct_CC = @ac_ct_CC@
    174176ac_ct_CXX = @ac_ct_CXX@
     
    204206localedir = @localedir@
    205207localstatedir = @localstatedir@
    206 lt_ECHO = @lt_ECHO@
    207208mandir = @mandir@
    208209mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/ext_diff_func/Makefile.in

    r322 r337  
    138138LTLIBOBJS = @LTLIBOBJS@
    139139MAKEINFO = @MAKEINFO@
     140MANIFEST_TOOL = @MANIFEST_TOOL@
    140141MKDIR_P = @MKDIR_P@
    141142NM = @NM@
     
    167168ac_adolc_cxxflags = @ac_adolc_cxxflags@
    168169ac_aux_dir = @ac_aux_dir@
     170ac_ct_AR = @ac_ct_AR@
    169171ac_ct_CC = @ac_ct_CC@
    170172ac_ct_CXX = @ac_ct_CXX@
     
    200202localedir = @localedir@
    201203localstatedir = @localstatedir@
    202 lt_ECHO = @lt_ECHO@
    203204mandir = @mandir@
    204205mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/fixpoint_exam/Makefile.in

    r322 r337  
    138138LTLIBOBJS = @LTLIBOBJS@
    139139MAKEINFO = @MAKEINFO@
     140MANIFEST_TOOL = @MANIFEST_TOOL@
    140141MKDIR_P = @MKDIR_P@
    141142NM = @NM@
     
    167168ac_adolc_cxxflags = @ac_adolc_cxxflags@
    168169ac_aux_dir = @ac_aux_dir@
     170ac_ct_AR = @ac_ct_AR@
    169171ac_ct_CC = @ac_ct_CC@
    170172ac_ct_CXX = @ac_ct_CXX@
     
    200202localedir = @localedir@
    201203localstatedir = @localstatedir@
    202 lt_ECHO = @lt_ECHO@
    203204mandir = @mandir@
    204205mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/helm/Makefile.in

    r322 r337  
    142142LTLIBOBJS = @LTLIBOBJS@
    143143MAKEINFO = @MAKEINFO@
     144MANIFEST_TOOL = @MANIFEST_TOOL@
    144145MKDIR_P = @MKDIR_P@
    145146NM = @NM@
     
    171172ac_adolc_cxxflags = @ac_adolc_cxxflags@
    172173ac_aux_dir = @ac_aux_dir@
     174ac_ct_AR = @ac_ct_AR@
    173175ac_ct_CC = @ac_ct_CC@
    174176ac_ct_CXX = @ac_ct_CXX@
     
    204206localedir = @localedir@
    205207localstatedir = @localstatedir@
    206 lt_ECHO = @lt_ECHO@
    207208mandir = @mandir@
    208209mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/hessmat/Makefile.in

    r322 r337  
    138138LTLIBOBJS = @LTLIBOBJS@
    139139MAKEINFO = @MAKEINFO@
     140MANIFEST_TOOL = @MANIFEST_TOOL@
    140141MKDIR_P = @MKDIR_P@
    141142NM = @NM@
     
    167168ac_adolc_cxxflags = @ac_adolc_cxxflags@
    168169ac_aux_dir = @ac_aux_dir@
     170ac_ct_AR = @ac_ct_AR@
    169171ac_ct_CC = @ac_ct_CC@
    170172ac_ct_CXX = @ac_ct_CXX@
     
    200202localedir = @localedir@
    201203localstatedir = @localstatedir@
    202 lt_ECHO = @lt_ECHO@
    203204mandir = @mandir@
    204205mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/lighthouse/Makefile.in

    r322 r337  
    153153LTLIBOBJS = @LTLIBOBJS@
    154154MAKEINFO = @MAKEINFO@
     155MANIFEST_TOOL = @MANIFEST_TOOL@
    155156MKDIR_P = @MKDIR_P@
    156157NM = @NM@
     
    182183ac_adolc_cxxflags = @ac_adolc_cxxflags@
    183184ac_aux_dir = @ac_aux_dir@
     185ac_ct_AR = @ac_ct_AR@
    184186ac_ct_CC = @ac_ct_CC@
    185187ac_ct_CXX = @ac_ct_CXX@
     
    215217localedir = @localedir@
    216218localstatedir = @localstatedir@
    217 lt_ECHO = @lt_ECHO@
    218219mandir = @mandir@
    219220mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/lufact/Makefile.in

    r322 r337  
    142142LTLIBOBJS = @LTLIBOBJS@
    143143MAKEINFO = @MAKEINFO@
     144MANIFEST_TOOL = @MANIFEST_TOOL@
    144145MKDIR_P = @MKDIR_P@
    145146NM = @NM@
     
    171172ac_adolc_cxxflags = @ac_adolc_cxxflags@
    172173ac_aux_dir = @ac_aux_dir@
     174ac_ct_AR = @ac_ct_AR@
    173175ac_ct_CC = @ac_ct_CC@
    174176ac_ct_CXX = @ac_ct_CXX@
     
    204206localedir = @localedir@
    205207localstatedir = @localstatedir@
    206 lt_ECHO = @lt_ECHO@
    207208mandir = @mandir@
    208209mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/ode/Makefile.in

    r322 r337  
    150150LTLIBOBJS = @LTLIBOBJS@
    151151MAKEINFO = @MAKEINFO@
     152MANIFEST_TOOL = @MANIFEST_TOOL@
    152153MKDIR_P = @MKDIR_P@
    153154NM = @NM@
     
    179180ac_adolc_cxxflags = @ac_adolc_cxxflags@
    180181ac_aux_dir = @ac_aux_dir@
     182ac_ct_AR = @ac_ct_AR@
    181183ac_ct_CC = @ac_ct_CC@
    182184ac_ct_CXX = @ac_ct_CXX@
     
    212214localedir = @localedir@
    213215localstatedir = @localstatedir@
    214 lt_ECHO = @lt_ECHO@
    215216mandir = @mandir@
    216217mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/openmp_exam/Makefile.in

    r322 r337  
    142142LTLIBOBJS = @LTLIBOBJS@
    143143MAKEINFO = @MAKEINFO@
     144MANIFEST_TOOL = @MANIFEST_TOOL@
    144145MKDIR_P = @MKDIR_P@
    145146NM = @NM@
     
    171172ac_adolc_cxxflags = @ac_adolc_cxxflags@
    172173ac_aux_dir = @ac_aux_dir@
     174ac_ct_AR = @ac_ct_AR@
    173175ac_ct_CC = @ac_ct_CC@
    174176ac_ct_CXX = @ac_ct_CXX@
     
    204206localedir = @localedir@
    205207localstatedir = @localstatedir@
    206 lt_ECHO = @lt_ECHO@
    207208mandir = @mandir@
    208209mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/pow/Makefile.in

    r322 r337  
    138138LTLIBOBJS = @LTLIBOBJS@
    139139MAKEINFO = @MAKEINFO@
     140MANIFEST_TOOL = @MANIFEST_TOOL@
    140141MKDIR_P = @MKDIR_P@
    141142NM = @NM@
     
    167168ac_adolc_cxxflags = @ac_adolc_cxxflags@
    168169ac_aux_dir = @ac_aux_dir@
     170ac_ct_AR = @ac_ct_AR@
    169171ac_ct_CC = @ac_ct_CC@
    170172ac_ct_CXX = @ac_ct_CXX@
     
    200202localedir = @localedir@
    201203localstatedir = @localstatedir@
    202 lt_ECHO = @lt_ECHO@
    203204mandir = @mandir@
    204205mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/scal/Makefile.in

    r322 r337  
    138138LTLIBOBJS = @LTLIBOBJS@
    139139MAKEINFO = @MAKEINFO@
     140MANIFEST_TOOL = @MANIFEST_TOOL@
    140141MKDIR_P = @MKDIR_P@
    141142NM = @NM@
     
    167168ac_adolc_cxxflags = @ac_adolc_cxxflags@
    168169ac_aux_dir = @ac_aux_dir@
     170ac_ct_AR = @ac_ct_AR@
    169171ac_ct_CC = @ac_ct_CC@
    170172ac_ct_CXX = @ac_ct_CXX@
     
    200202localedir = @localedir@
    201203localstatedir = @localstatedir@
    202 lt_ECHO = @lt_ECHO@
    203204mandir = @mandir@
    204205mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/sparse/Makefile.in

    r322 r337  
    155155LTLIBOBJS = @LTLIBOBJS@
    156156MAKEINFO = @MAKEINFO@
     157MANIFEST_TOOL = @MANIFEST_TOOL@
    157158MKDIR_P = @MKDIR_P@
    158159NM = @NM@
     
    184185ac_adolc_cxxflags = @ac_adolc_cxxflags@
    185186ac_aux_dir = @ac_aux_dir@
     187ac_ct_AR = @ac_ct_AR@
    186188ac_ct_CC = @ac_ct_CC@
    187189ac_ct_CXX = @ac_ct_CXX@
     
    217219localedir = @localedir@
    218220localstatedir = @localstatedir@
    219 lt_ECHO = @lt_ECHO@
    220221mandir = @mandir@
    221222mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/speelpenning/Makefile.in

    r322 r337  
    138138LTLIBOBJS = @LTLIBOBJS@
    139139MAKEINFO = @MAKEINFO@
     140MANIFEST_TOOL = @MANIFEST_TOOL@
    140141MKDIR_P = @MKDIR_P@
    141142NM = @NM@
     
    167168ac_adolc_cxxflags = @ac_adolc_cxxflags@
    168169ac_aux_dir = @ac_aux_dir@
     170ac_ct_AR = @ac_ct_AR@
    169171ac_ct_CC = @ac_ct_CC@
    170172ac_ct_CXX = @ac_ct_CXX@
     
    200202localedir = @localedir@
    201203localstatedir = @localstatedir@
    202 lt_ECHO = @lt_ECHO@
    203204mandir = @mandir@
    204205mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/tapesave/Makefile.in

    r322 r337  
    142142LTLIBOBJS = @LTLIBOBJS@
    143143MAKEINFO = @MAKEINFO@
     144MANIFEST_TOOL = @MANIFEST_TOOL@
    144145MKDIR_P = @MKDIR_P@
    145146NM = @NM@
     
    171172ac_adolc_cxxflags = @ac_adolc_cxxflags@
    172173ac_aux_dir = @ac_aux_dir@
     174ac_ct_AR = @ac_ct_AR@
    173175ac_ct_CC = @ac_ct_CC@
    174176ac_ct_CXX = @ac_ct_CXX@
     
    204206localedir = @localedir@
    205207localstatedir = @localstatedir@
    206 lt_ECHO = @lt_ECHO@
    207208mandir = @mandir@
    208209mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/taylor/Makefile.in

    r322 r337  
    158158LTLIBOBJS = @LTLIBOBJS@
    159159MAKEINFO = @MAKEINFO@
     160MANIFEST_TOOL = @MANIFEST_TOOL@
    160161MKDIR_P = @MKDIR_P@
    161162NM = @NM@
     
    187188ac_adolc_cxxflags = @ac_adolc_cxxflags@
    188189ac_aux_dir = @ac_aux_dir@
     190ac_ct_AR = @ac_ct_AR@
    189191ac_ct_CC = @ac_ct_CC@
    190192ac_ct_CXX = @ac_ct_CXX@
     
    220222localedir = @localedir@
    221223localstatedir = @localstatedir@
    222 lt_ECHO = @lt_ECHO@
    223224mandir = @mandir@
    224225mkdir_p = @mkdir_p@
  • trunk/ADOL-C/examples/additional_examples/timing/Makefile.in

    r322 r337  
    228228LTLIBOBJS = @LTLIBOBJS@
    229229MAKEINFO = @MAKEINFO@
     230MANIFEST_TOOL = @MANIFEST_TOOL@
    230231MKDIR_P = @MKDIR_P@
    231232NM = @NM@
     
    257258ac_adolc_cxxflags = @ac_adolc_cxxflags@
    258259ac_aux_dir = @ac_aux_dir@
     260ac_ct_AR = @ac_ct_AR@
    259261ac_ct_CC = @ac_ct_CC@
    260262ac_ct_CXX = @ac_ct_CXX@
     
    290292localedir = @localedir@
    291293localstatedir = @localstatedir@
    292 lt_ECHO = @lt_ECHO@
    293294mandir = @mandir@
    294295mkdir_p = @mkdir_p@
  • trunk/ADOL-C/src/Makefile.am

    r272 r337  
    1212
    1313if SPARSE
    14 AM_CFLAGS            = @ac_adolc_cflags@ -DADOLC_INTERNAL=1 -DSPARSE=1
     14AM_CFLAGS            = @ac_adolc_cflags@ -DADOLC_INTERNAL=1 -DSPARSE=1 -std=gnu99
    1515AM_CXXFLAGS          = @ac_adolc_cxxflags@ -DADOLC_INTERNAL=1 -DSPARSE=1
    1616else
    17 AM_CFLAGS            = @ac_adolc_cflags@ -DADOLC_INTERNAL=1
     17AM_CFLAGS            = @ac_adolc_cflags@ -DADOLC_INTERNAL=1 -std=gnu99
    1818AM_CXXFLAGS          = @ac_adolc_cxxflags@ -DADOLC_INTERNAL=1
    1919endif
     
    3232
    3333EXTRA_DIST           = uni5_for.c fo_rev.c ho_rev.c \
    34                        taping_p.h malloc.h storemanager.h \
     34                       oplate.h taping_p.h malloc.h storemanager.h \
    3535                       externfcts_p.h checkpointing_p.h buffer_temp.h
    3636
    3737pkginclude_HEADERS   = adolc.h adalloc.h adouble.h adutils.h adutilsc.h \
    3838                       common.h convolut.h dvlparms.h fortutils.h\
    39                        interfaces.h oplate.h taping.h usrparms.h \
     39                       interfaces.h taping.h usrparms.h \
    4040                       externfcts.h checkpointing.h fixpoint.h\
    4141                       adolc_sparse.h adolc_openmp.h \
    42                        revolve.h
     42                       revolve.h advector.h
    4343
    4444lib_LTLIBRARIES      = libadolc.la
     
    6161                       indopro_forward_s.c indopro_forward_t.c \
    6262                       nonl_ind_forward_s.c nonl_ind_forward_t.c \
    63                        int_reverse_s.c int_reverse_t.c
     63                       int_reverse_s.c int_reverse_t.c advector.cpp
    6464
    6565libadolc_la_LIBADD   = drivers/libdrivers.la sparse/libsparse.la \
     
    7777                       forward_partx.c \
    7878                       externfcts.cpp checkpointing.cpp \
    79                        fixpoint.cpp fov_offset_forward.c revolve.c
     79                       fixpoint.cpp fov_offset_forward.c revolve.c advector.cpp
    8080
    8181libadolc_la_LIBADD   = drivers/libdrivers.la tapedoc/libtapedoc.la
  • trunk/ADOL-C/src/Makefile.in

    r322 r337  
    8484        fov_reverse.c hos_reverse.c hos_ov_reverse.c hov_reverse.c \
    8585        forward_partx.c externfcts.cpp checkpointing.cpp fixpoint.cpp \
    86         fov_offset_forward.c revolve.c taping_p.h int_forward_s.c \
    87         int_forward_t.c indopro_forward_s.c indopro_forward_t.c \
    88         nonl_ind_forward_s.c nonl_ind_forward_t.c int_reverse_s.c \
    89         int_reverse_t.c
     86        fov_offset_forward.c revolve.c advector.cpp taping_p.h \
     87        int_forward_s.c int_forward_t.c indopro_forward_s.c \
     88        indopro_forward_t.c nonl_ind_forward_s.c nonl_ind_forward_t.c \
     89        int_reverse_s.c int_reverse_t.c
    9090@SPARSE_FALSE@am_libadolc_la_OBJECTS = adalloc.lo malloc.lo adouble.lo \
    9191@SPARSE_FALSE@  convolut.lo fortutils.lo interfaces.lo \
     
    9696@SPARSE_FALSE@  hos_ov_reverse.lo hov_reverse.lo \
    9797@SPARSE_FALSE@  forward_partx.lo externfcts.lo checkpointing.lo \
    98 @SPARSE_FALSE@  fixpoint.lo fov_offset_forward.lo revolve.lo
     98@SPARSE_FALSE@  fixpoint.lo fov_offset_forward.lo revolve.lo \
     99@SPARSE_FALSE@  advector.lo
    99100@SPARSE_TRUE@am_libadolc_la_OBJECTS = adalloc.lo malloc.lo adouble.lo \
    100101@SPARSE_TRUE@   convolut.lo fortutils.lo interfaces.lo \
     
    109110@SPARSE_TRUE@   indopro_forward_t.lo nonl_ind_forward_s.lo \
    110111@SPARSE_TRUE@   nonl_ind_forward_t.lo int_reverse_s.lo \
    111 @SPARSE_TRUE@   int_reverse_t.lo
     112@SPARSE_TRUE@   int_reverse_t.lo advector.lo
    112113libadolc_la_OBJECTS = $(am_libadolc_la_OBJECTS)
    113114AM_V_lt = $(am__v_lt_$(V))
     
    253254LTLIBOBJS = @LTLIBOBJS@
    254255MAKEINFO = @MAKEINFO@
     256MANIFEST_TOOL = @MANIFEST_TOOL@
    255257MKDIR_P = @MKDIR_P@
    256258NM = @NM@
     
    282284ac_adolc_cxxflags = @ac_adolc_cxxflags@
    283285ac_aux_dir = @ac_aux_dir@
     286ac_ct_AR = @ac_ct_AR@
    284287ac_ct_CC = @ac_ct_CC@
    285288ac_ct_CXX = @ac_ct_CXX@
     
    315318localedir = @localedir@
    316319localstatedir = @localstatedir@
    317 lt_ECHO = @lt_ECHO@
    318320mandir = @mandir@
    319321mkdir_p = @mkdir_p@
     
    331333top_builddir = @top_builddir@
    332334top_srcdir = @top_srcdir@
    333 @SPARSE_FALSE@AM_CFLAGS = @ac_adolc_cflags@ -DADOLC_INTERNAL=1
    334 @SPARSE_TRUE@AM_CFLAGS = @ac_adolc_cflags@ -DADOLC_INTERNAL=1 -DSPARSE=1
     335@SPARSE_FALSE@AM_CFLAGS = @ac_adolc_cflags@ -DADOLC_INTERNAL=1 -std=gnu99
     336@SPARSE_TRUE@AM_CFLAGS = @ac_adolc_cflags@ -DADOLC_INTERNAL=1 -DSPARSE=1 -std=gnu99
    335337@SPARSE_FALSE@AM_CXXFLAGS = @ac_adolc_cxxflags@ -DADOLC_INTERNAL=1
    336338@SPARSE_TRUE@AM_CXXFLAGS = @ac_adolc_cxxflags@ -DADOLC_INTERNAL=1 -DSPARSE=1
     
    341343MAINTAINERCLEANFILES = Makefile.in *~ *.orig adolc_config.h config.h.in
    342344EXTRA_DIST = uni5_for.c fo_rev.c ho_rev.c \
    343                        taping_p.h malloc.h storemanager.h \
     345                       oplate.h taping_p.h malloc.h storemanager.h \
    344346                       externfcts_p.h checkpointing_p.h buffer_temp.h
    345347
    346348pkginclude_HEADERS = adolc.h adalloc.h adouble.h adutils.h adutilsc.h \
    347349                       common.h convolut.h dvlparms.h fortutils.h\
    348                        interfaces.h oplate.h taping.h usrparms.h \
     350                       interfaces.h taping.h usrparms.h \
    349351                       externfcts.h checkpointing.h fixpoint.h\
    350352                       adolc_sparse.h adolc_openmp.h \
    351                        revolve.h
     353                       revolve.h advector.h
    352354
    353355lib_LTLIBRARIES = libadolc.la
     
    364366@SPARSE_FALSE@                       forward_partx.c \
    365367@SPARSE_FALSE@                       externfcts.cpp checkpointing.cpp \
    366 @SPARSE_FALSE@                       fixpoint.cpp fov_offset_forward.c revolve.c
     368@SPARSE_FALSE@                       fixpoint.cpp fov_offset_forward.c revolve.c advector.cpp
    367369
    368370@SPARSE_TRUE@libadolc_la_SOURCES = adalloc.c malloc.c adouble.cpp \
     
    380382@SPARSE_TRUE@                       indopro_forward_s.c indopro_forward_t.c \
    381383@SPARSE_TRUE@                       nonl_ind_forward_s.c nonl_ind_forward_t.c \
    382 @SPARSE_TRUE@                       int_reverse_s.c int_reverse_t.c
     384@SPARSE_TRUE@                       int_reverse_s.c int_reverse_t.c advector.cpp
    383385
    384386@SPARSE_FALSE@libadolc_la_LIBADD = drivers/libdrivers.la tapedoc/libtapedoc.la
     
    480482@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adalloc.Plo@am__quote@
    481483@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adouble.Plo@am__quote@
     484@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/advector.Plo@am__quote@
    482485@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkpointing.Plo@am__quote@
    483486@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convolut.Plo@am__quote@
  • trunk/ADOL-C/src/adouble.cpp

    r322 r337  
    1313 
    1414 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
    15                Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
     15               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel,
     16               Kshitij Kulshreshtha
    1617 
    1718 This file is part of ADOL-C. This software is provided as open source.
     
    2223
    2324#include <adolc/adouble.h>
    24 #include <adolc/oplate.h>
     25#include "oplate.h"
    2526#include "taping_p.h"
    2627
     
    13401341    /* y+0.0 is a hack since condassign is currently not defined for
    13411342       badoubles */
    1342     condassign( sy,  y+0.0,  1.0 , -1.0 );
    1343     condassign( a1,  x+0.0, (adouble) atan(y/x),
    1344                 (adouble)( atan(y/x)+sy*2*pihalf));
    1345     condassign( a2,  (adouble) fabs(y), (adouble) (sy*pihalf-atan(x/y)),
    1346                 (adouble) 0.0 );
    1347     condassign( ret, (adouble) (fabs(x) - fabs(y)), a1, a2 );
     1343    condassign( sy,  y,  (adouble)1.0 , (adouble)-1.0 );
     1344    condassign( a1,  x,  atan(y/x),  atan(y/x)+sy*2*pihalf);
     1345    condassign( a2,  fabs(y), sy*pihalf-atan(x/y), (adouble) 0.0 );
     1346    condassign( ret, fabs(x) - fabs(y), a1, a2 );
    13481347    return ret;
    13491348}
     
    13821381    }
    13831382
    1384     condassign (ret, coval, exp(y*ADOLC_MATH_NSP::log(coval)),
    1385             ADOLC_MATH_NSP::pow(coval,y.getValue()) );
     1383    condassign (ret, (adouble) coval, exp(y*ADOLC_MATH_NSP::log(coval)),
     1384                (adouble) ADOLC_MATH_NSP::pow(coval,y.getValue()) );
    13861385
    13871386    return ret;
     
    14011400            fprintf(DIAG_OUT,"\nADOL-C message: negative exponent and zero basis deactivated\n");
    14021401    }
    1403     condassign(a1,-y, ADOLC_MATH_NSP::pow(vx,vy), pow(x,vy));
    1404     condassign(a2, fabs(x), pow(x, vy),a1);
    1405     condassign(ret,x+0.0, exp(y*log(x)),a2);
     1402    condassign(a1, -y, (adouble) ADOLC_MATH_NSP::pow(vx,vy), pow(x,vy));
     1403    condassign(a2, fabs(x), pow(x, vy), a1);
     1404    condassign(ret, x, exp(y*log(x)),a2);
    14061405
    14071406    return ret;
     
    17591758
    17601759/*--------------------------------------------------------------------------*/
    1761 void condassign( adouble &res,        const adouble &cond,
    1762                  const adouble &arg1, const adouble &arg2 ) {
     1760void condassign( adouble &res,         const badouble &cond,
     1761                 const badouble &arg1, const badouble &arg2 ) {
    17631762    ADOLC_OPENMP_THREAD_NUMBER;
    17641763    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    17841783
    17851784/*--------------------------------------------------------------------------*/
    1786 void condassign( adouble &res, const adouble &cond, const adouble &arg ) {
     1785void condassign( adouble &res, const badouble &cond, const badouble &arg ) {
    17871786    ADOLC_OPENMP_THREAD_NUMBER;
    17881787    ADOLC_OPENMP_GET_THREAD_NUMBER;
  • trunk/ADOL-C/src/adouble.h

    r320 r337  
    1010
    1111 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
    12                Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
     12               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel,
     13               Kshitij Kulshreshtha
    1314 
    1415 This file is part of ADOL-C. This software is provided as open source.
     
    6061class adub;
    6162class badouble;
    62 class adubv;
    63 /* class doublev;  that's history */
    6463
    6564/*--------------------------------------------------------------------------*/
     
    8281*/
    8382class ADOLC_DLL_EXPORT badouble {
    84     friend ADOLC_DLL_EXPORT class badoublev;
    8583protected:
    8684    locint location;
     
    9088    //
    9189    // badouble( const badouble& a ) {location = a.location;};
    92     badouble( locint lo ) {
     90    explicit badouble( locint lo ) {
    9391        location = lo;
    9492    };
     
    112110    badouble& operator = ( const adub& );
    113111    double getValue() const;
    114     inline double value() {
     112    inline double value() const {
    115113        return getValue();
    116114    }
     
    230228    /*--------------------------------------------------------------------------*/
    231229    /* Conditionals */
    232     friend ADOLC_DLL_EXPORT void condassign( adouble &res, const adouble &cond,
    233             const adouble &arg1, const adouble &arg2 );
    234     friend ADOLC_DLL_EXPORT void condassign( adouble &res, const adouble &cond,
    235             const adouble &arg );
     230    friend ADOLC_DLL_EXPORT void condassign( adouble &res, const badouble &cond,
     231            const badouble &arg1, const badouble &arg2 );
     232    friend ADOLC_DLL_EXPORT void condassign( adouble &res, const badouble &cond,
     233            const badouble &arg );
    236234};
    237235
     
    251249class ADOLC_DLL_EXPORT adub:public badouble {
    252250    friend ADOLC_DLL_EXPORT class adouble;
     251    friend ADOLC_DLL_EXPORT class advector;
     252    friend ADOLC_DLL_EXPORT class adubref;
    253253#if GCC_VERSION >= 4003
    254254    adub( adub const &) {}
     
    261261        exit(-2);
    262262    };
    263     adub( double ):badouble(0) {
     263    explicit adub( double ):badouble(0) {
    264264        fprintf(DIAG_OUT,"ADOL-C error: illegal  construction of adub variable"
    265265                " from double\n");
     
    346346*/
    347347class ADOLC_DLL_EXPORT adouble:public badouble {
     348    friend ADOLC_DLL_EXPORT class advector;
    348349public:
    349350    adouble( const adub& );
  • trunk/ADOL-C/src/checkpointing.cpp

    r290 r337  
    1313---------------------------------------------------------------------------*/
    1414
    15 #include <adolc/oplate.h>
     15#include "oplate.h"
    1616#include <adolc/adalloc.h>
    1717#include "taping_p.h"
  • trunk/ADOL-C/src/drivers/Makefile.in

    r322 r337  
    162162LTLIBOBJS = @LTLIBOBJS@
    163163MAKEINFO = @MAKEINFO@
     164MANIFEST_TOOL = @MANIFEST_TOOL@
    164165MKDIR_P = @MKDIR_P@
    165166NM = @NM@
     
    191192ac_adolc_cxxflags = @ac_adolc_cxxflags@
    192193ac_aux_dir = @ac_aux_dir@
     194ac_ct_AR = @ac_ct_AR@
    193195ac_ct_CC = @ac_ct_CC@
    194196ac_ct_CXX = @ac_ct_CXX@
     
    224226localedir = @localedir@
    225227localstatedir = @localstatedir@
    226 lt_ECHO = @lt_ECHO@
    227228mandir = @mandir@
    228229mkdir_p = @mkdir_p@
  • trunk/ADOL-C/src/externfcts.cpp

    r197 r337  
    1717#include "taping_p.h"
    1818#include <adolc/adouble.h>
    19 #include <adolc/oplate.h>
     19#include "oplate.h"
    2020#include "buffer_temp.h"
    2121
  • trunk/ADOL-C/src/fo_rev.c

    r290 r337  
    1717
    1818 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
    19                Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
    20  
     19               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel,
     20               Kshitij Kulshreshtha
     21
    2122 This file is part of ADOL-C. This software is provided as open source.
    2223 Any use, reproduction, or distribution of the software constitutes
     
    189190#include <adolc/interfaces.h>
    190191#include <adolc/adalloc.h>
    191 #include <adolc/oplate.h>
     192#include "oplate.h"
    192193#include "taping_p.h"
    193194#include <adolc/externfcts.h>
     
    16641665#endif /* !_NTIGHT_ */
    16651666                break;
     1667
     1668                /*--------------------------------------------------------------------------*/
     1669            case subscript:
     1670                {
     1671                    double val = get_val_r();
     1672                    size_t cnt, idx, numval = (size_t)trunc(fabs(val));
     1673                    locint vectorloc;
     1674                    vectorloc = get_locint_r();
     1675                    res = get_locint_r();
     1676                    arg = get_locint_r();
     1677#if !defined(_NTIGHT_)
     1678                    idx = (size_t)trunc(fabs(TARG));
     1679                    if (idx >= numval)
     1680                        fprintf(DIAG_OUT, "ADOL-C warning: index out of bounds while subscripting n=%z, idx=%z\n", numval, idx);
     1681                    arg1 = vectorloc+idx;
     1682                    ASSIGN_A( Aarg1, ADJOINT_BUFFER[arg1])
     1683                    ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1684                    FOR_0_LE_l_LT_p
     1685                    {
     1686#if defined(_INT_REV_)
     1687                        AARG1_INC |= ARES;
     1688                        ARES_INC = 0;
     1689#else
     1690                        AARG1_INC += ARES;
     1691                        ARES = 0.0;
     1692#endif
     1693                    }
     1694                    ADOLC_GET_TAYLOR(res);
     1695#else
     1696                    fprintf(DIAG_OUT, "ADOL-C error: active subscripting does not work in safe mode, please use tight mode\n");
     1697                    exit(-2);
     1698#endif /* !_NTIGHT_ */
     1699                }
     1700                break;
     1701
     1702            case subscript_ref:
     1703                {
     1704                    double val = get_val_r();
     1705                    size_t cnt, idx, numval = (size_t)trunc(fabs(val));
     1706                    locint vectorloc;
     1707                    vectorloc = get_locint_r();
     1708                    res = get_locint_r();
     1709                    arg = get_locint_r();
     1710#if !defined(_NTIGHT_)
     1711                    idx = (size_t)trunc(fabs(TARG));
     1712                    if (idx >= numval)
     1713                        fprintf(DIAG_OUT, "ADOL-C warning: index out of bounds while subscripting (ref) n=%z, idx=%z\n", numval, idx);
     1714                    arg1 = (size_t)trunc(fabs(TRES));
     1715                    // This is actually NOP
     1716                    // basically all we need is that arg1 == vectorloc+idx
     1717                    // so doing a check here is probably good
     1718                    if (arg1 != vectorloc+idx) {
     1719                        fprintf(DIAG_OUT, "ADOL-C error: indexed active position does not match referenced position\nindexed = %d, referenced = %d\n", vectorloc+idx, arg1);
     1720                        exit(-2);
     1721                    }
     1722                    ADOLC_GET_TAYLOR(res);
     1723#else
     1724                    fprintf(DIAG_OUT, "ADOL-C error: active subscripting does not work in safe mode, please use tight mode\n");
     1725                    exit(-2);
     1726#endif /* !_NTIGHT_ */
     1727                }
     1728                break;
     1729
     1730            case ref_copyout:
     1731                res = get_locint_r();
     1732                arg1 = get_locint_r();
     1733#if !defined(_NTIGHT_)
     1734                arg = (size_t)trunc(fabs(TARG1));
     1735                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1736                ASSIGN_A( Aarg, ADJOINT_BUFFER[arg])
     1737               
     1738                FOR_0_LE_l_LT_p
     1739                {
     1740#if defined(_INT_REV_)                 
     1741                  AARG_INC |= ARES;
     1742                  ARES_INC = 0;
     1743#else
     1744                  AARG_INC += ARES;
     1745                  ARES_INC = 0.0;
     1746#endif
     1747                }
     1748                ADOLC_GET_TAYLOR(res);
     1749#else
     1750                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1751                exit(-2);
     1752#endif
     1753                break;
     1754
     1755
     1756            case ref_incr_a:                        /* Increment an adouble    incr_a */
     1757            case ref_decr_a:                        /* Increment an adouble    decr_a */
     1758                arg1   = get_locint_r();
     1759
     1760#if !defined(_NTIGHT_)
     1761                res = (size_t)trunc(fabs(TARG1));
     1762                ADOLC_GET_TAYLOR(res);
     1763#else
     1764                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1765                exit(-2);
     1766#endif /* !_NTIGHT_ */
     1767                break;
     1768
     1769            case ref_assign_d:            /* assign an adouble variable a    assign_d */
     1770                /* double value. (=) */
     1771                arg1   = get_locint_r();
     1772#if !defined(_NTIGHT_)
     1773                res = (size_t)trunc(fabs(TARG1));
     1774                coval = get_val_r();
     1775
     1776                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1777
     1778                FOR_0_LE_l_LT_p
     1779#if defined(_INT_REV_)                 
     1780                ARES_INC = 0;
     1781#else
     1782                ARES_INC = 0.0;
     1783#endif
     1784
     1785                ADOLC_GET_TAYLOR(res);
     1786#else
     1787                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1788                exit(-2);
     1789#endif /* !_NTIGHT_ */
     1790                break;
     1791
     1792            case ref_assign_d_zero:  /* assign an adouble variable a    assign_d_zero */
     1793            case ref_assign_d_one:   /* double value (0 or 1). (=)       assign_d_one */
     1794                arg1 = get_locint_r();
     1795
     1796#if !defined(_NTIGHT_)
     1797                res = (size_t)trunc(fabs(TARG1));
     1798
     1799                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1800
     1801                FOR_0_LE_l_LT_p
     1802#if defined(_INT_REV_)                 
     1803                ARES_INC = 0;
     1804#else
     1805                ARES_INC = 0.0;
     1806#endif
     1807                ADOLC_GET_TAYLOR(res);
     1808#else
     1809                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1810                exit(-2);
     1811#endif /* !_NTIGHT_ */
     1812                break;
     1813
     1814            case ref_assign_a:           /* assign an adouble variable an    assign_a */
     1815                /* adouble value. (=) */
     1816                arg1 = get_locint_r();
     1817                arg = get_locint_r();
     1818
     1819#if !defined(_NTIGHT_)
     1820                res = (size_t)trunc(fabs(TARG1));
     1821
     1822                ASSIGN_A( Aarg, ADJOINT_BUFFER[arg])
     1823                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1824
     1825                FOR_0_LE_l_LT_p
     1826                {
     1827#if defined(_INT_REV_)                 
     1828                  AARG_INC |= ARES;
     1829                  ARES_INC = 0;
     1830#else
     1831                  AARG_INC += ARES;
     1832                  ARES_INC = 0.0;
     1833#endif
     1834                }
     1835
     1836                ADOLC_GET_TAYLOR(res);
     1837#else
     1838                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1839                exit(-2);
     1840#endif /* !_NTIGHT_ */
     1841                break;
     1842
     1843            case ref_assign_ind:       /* assign an adouble variable an    assign_ind */
     1844                /* independent double value (<<=) */
     1845                arg1 = get_locint_r();
     1846
     1847#if !defined(_NTIGHT_)
     1848                res = (size_t)trunc(fabs(TARG1));
     1849
     1850                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1851
     1852                FOR_0_LE_l_LT_p
     1853                    RESULTS(l,indexi) = ARES_INC;
     1854
     1855                ADOLC_GET_TAYLOR(res);
     1856#else
     1857                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1858                exit(-2);
     1859#endif /* !_NTIGHT_ */
     1860                indexi--;
     1861                break;
     1862
     1863            case ref_eq_plus_d:            /* Add a floating point to an    eq_plus_d */
     1864                /* adouble. (+=) */
     1865                arg1   = get_locint_r();
     1866#if !defined(_NTIGHT_)
     1867                res = (size_t)trunc(fabs(TARG1));
     1868                coval = get_val_r();
     1869
     1870                ADOLC_GET_TAYLOR(res);
     1871#else
     1872                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1873                exit(-2);
     1874#endif /* !_NTIGHT_ */
     1875                break;
     1876
     1877            case ref_eq_plus_a:             /* Add an adouble to another    eq_plus_a */
     1878                /* adouble. (+=) */
     1879                arg1 = get_locint_r();
     1880                arg = get_locint_r();
     1881
     1882#if !defined(_NTIGHT_)
     1883                res = (size_t)trunc(fabs(TARG1));
     1884
     1885                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1886                ASSIGN_A( Aarg, ADJOINT_BUFFER[arg]);
     1887
     1888                FOR_0_LE_l_LT_p
     1889#if defined(_INT_REV_)
     1890                AARG_INC |= ARES_INC;
     1891#else
     1892                AARG_INC += ARES_INC;
     1893#endif
     1894
     1895                ADOLC_GET_TAYLOR(res);
     1896#else
     1897                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1898                exit(-2);
     1899#endif /* !_NTIGHT_ */
     1900                break;
     1901
     1902            case ref_eq_min_d:       /* Subtract a floating point from an    eq_min_d */
     1903                /* adouble. (-=) */
     1904                arg1   = get_locint_r();
     1905#if !defined(_NTIGHT_)
     1906                res = (size_t)trunc(fabs(TARG1));
     1907                coval = get_val_r();
     1908
     1909                ADOLC_GET_TAYLOR(res);
     1910#else
     1911                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1912                exit(-2);
     1913#endif /* !_NTIGHT_ */
     1914               break;
     1915
     1916            case ref_eq_min_a:        /* Subtract an adouble from another    eq_min_a */
     1917                /* adouble. (-=) */
     1918                arg1 = get_locint_r();
     1919                arg = get_locint_r();
     1920
     1921#if !defined(_NTIGHT_)
     1922                res = (size_t)trunc(fabs(TARG1));
     1923                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1924                ASSIGN_A( Aarg, ADJOINT_BUFFER[arg])
     1925
     1926                FOR_0_LE_l_LT_p
     1927#if defined(_INT_REV_)
     1928                AARG_INC |= ARES_INC;
     1929#else
     1930                AARG_INC -= ARES_INC;
     1931#endif
     1932
     1933               ADOLC_GET_TAYLOR(res);
     1934#else
     1935                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1936                exit(-2);
     1937#endif /* !_NTIGHT_ */
     1938                break;
     1939
     1940            case ref_eq_mult_d:              /* Multiply an adouble by a    eq_mult_d */
     1941                /* flaoting point. (*=) */
     1942                arg1   = get_locint_r();
     1943#if !defined(_NTIGHT_)
     1944                res = (size_t)trunc(fabs(TARG1));
     1945                coval = get_val_r();
     1946
     1947#if !defined(_INT_REV_)
     1948                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1949
     1950                FOR_0_LE_l_LT_p
     1951                ARES_INC *= coval;
     1952#endif
     1953
     1954                ADOLC_GET_TAYLOR(res);
     1955#else
     1956                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1957                exit(-2);
     1958#endif /* !_NTIGHT_ */
     1959                break;
     1960
     1961            case ref_eq_mult_a:       /* Multiply one adouble by another    eq_mult_a */
     1962                /* (*=) */
     1963                arg1 = get_locint_r();
     1964                arg = get_locint_r();
     1965
     1966#if !defined(_NTIGHT_)
     1967                res = (size_t)trunc(fabs(TARG1));
     1968                ADOLC_GET_TAYLOR(res);
     1969
     1970                ASSIGN_A( Ares, ADJOINT_BUFFER[res])
     1971                ASSIGN_A( Aarg, ADJOINT_BUFFER[arg])
     1972
     1973                FOR_0_LE_l_LT_p
     1974#if defined(_INT_REV_)
     1975                AARG_INC |= ARES_INC;
     1976#else
     1977                { aTmp = ARES;
     1978                  /* olvo 980713 nn: ARES = 0.0; */
     1979                    ARES_INC =  (aTmp==0)?0:(aTmp * TARG);
     1980                    AARG_INC += (aTmp==0)?0:(aTmp * TRES);
     1981                }
     1982#endif     
     1983#else
     1984                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     1985                exit(-2);
     1986#endif /* !_NTIGHT_ */
     1987                break;
     1988
     1989        case ref_cond_assign:                                      /* cond_assign */
     1990           {
     1991                locint ref    = get_locint_r();
     1992                arg2   = get_locint_r();
     1993                arg1   = get_locint_r();
     1994                arg    = get_locint_r();
     1995#if !defined(_NTIGHT_)
     1996                coval  = get_val_r();
     1997                res = (size_t)trunc(fabs(rp_T[ref]));
     1998
     1999                ADOLC_GET_TAYLOR(res);
     2000
     2001                ASSIGN_A( Aarg1, ADJOINT_BUFFER[arg1])
     2002                ASSIGN_A( Ares,  ADJOINT_BUFFER[res])
     2003                ASSIGN_A( Aarg2, ADJOINT_BUFFER[arg2])
     2004
     2005                /* olvo 980924 changed code a little bit */
     2006                if (TARG > 0.0) {
     2007                    if (res != arg1)
     2008                        FOR_0_LE_l_LT_p
     2009                        { if ((coval <= 0.0) && (ARES))
     2010                          MINDEC(ret_c,2);
     2011#if defined(_INT_REV_)
     2012                              AARG1_INC |= ARES;
     2013                              ARES_INC = 0;
     2014#else
     2015                          AARG1_INC += ARES;
     2016                          ARES_INC = 0.0;
     2017#endif
     2018                        } else
     2019                            FOR_0_LE_l_LT_p
     2020                            if ((coval <= 0.0) && (ARES_INC))
     2021                                    MINDEC(ret_c,2);
     2022                } else {
     2023                    if (res != arg2)
     2024                        FOR_0_LE_l_LT_p
     2025                        { if ((coval <= 0.0) && (ARES))
     2026                          MINDEC(ret_c,2);
     2027#if defined(_INT_REV_)
     2028                          AARG2_INC |= ARES;
     2029                          ARES_INC = 0;
     2030#else
     2031                          AARG2_INC += ARES;
     2032                          ARES_INC = 0.0;
     2033#endif
     2034                        } else
     2035                            FOR_0_LE_l_LT_p
     2036                            if ((coval <= 0.0) && (ARES_INC))
     2037                                    MINDEC(ret_c,2);
     2038                }
     2039#else
     2040                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     2041                exit(-2);
     2042#endif /* !_NTIGHT_ */
     2043                }
     2044                break;
     2045
     2046            case ref_cond_assign_s:                                  /* cond_assign_s */
     2047                arg2   = get_locint_r();
     2048                arg1  = get_locint_r();
     2049                arg   = get_locint_r();
     2050#if !defined(_NTIGHT_)
     2051                coval = get_val_r();
     2052                res = (size_t)trunc(fabs(TARG2));
     2053                ADOLC_GET_TAYLOR(res);
     2054
     2055                ASSIGN_A( Aarg1, ADJOINT_BUFFER[arg1])
     2056                ASSIGN_A( Ares,  ADJOINT_BUFFER[res])
     2057
     2058                /* olvo 980924 changed code a little bit */
     2059                if (TARG > 0.0) {
     2060                    if (res != arg1)
     2061                        FOR_0_LE_l_LT_p
     2062                        { if ((coval <= 0.0) && (ARES))
     2063                          MINDEC(ret_c,2);
     2064#if defined(_INT_REV_)
     2065                          AARG1_INC |= ARES;
     2066                          ARES_INC = 0.0;
     2067#else
     2068                          AARG1_INC += ARES;
     2069                          ARES_INC = 0.0;
     2070#endif
     2071                        } else
     2072                            FOR_0_LE_l_LT_p
     2073                            if ((coval <= 0.0) && (ARES_INC))
     2074                                    MINDEC(ret_c,2);
     2075                } else
     2076                    if (TARG == 0.0) /* we are at the tie */
     2077                        FOR_0_LE_l_LT_p
     2078                        if (ARES_INC)
     2079                            MINDEC(ret_c,0);
     2080#else
     2081                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     2082                exit(-2);
     2083#endif /* !_NTIGHT_ */
     2084                break;
     2085
    16662086
    16672087                /****************************************************************************/
  • trunk/ADOL-C/src/ho_rev.c

    r249 r337  
    1212 
    1313 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
    14                Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
    15  
     14               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel,
     15               Kshitij Kulshreshtha
     16
    1617 This file is part of ADOL-C. This software is provided as open source.
    1718 Any use, reproduction, or distribution of the software constitutes
     
    267268#include <adolc/interfaces.h>
    268269#include <adolc/adalloc.h>
    269 #include <adolc/oplate.h>
     270#include "oplate.h"
    270271#include "taping_p.h"
    271272#include <adolc/convolut.h>
     
    20402041            break;
    20412042
     2043                /*--------------------------------------------------------------------------*/
     2044            case subscript:
     2045                coval = get_val_r();
     2046                {
     2047                    size_t cnt, idx, numval = (size_t)trunc(fabs(coval));
     2048                    locint vectorloc;
     2049                    vectorloc = get_locint_r();
     2050                    res = get_locint_r();
     2051                    arg = get_locint_r();
     2052                    ASSIGN_T(Targ, rpp_T[arg])
     2053                    idx = (size_t)trunc(fabs(TARG));
     2054                    if (idx >= numval)
     2055                        fprintf(DIAG_OUT, "ADOL-C warning: index out of bounds while subscripting n=%z, idx=%z\n", numval, idx);
     2056                    arg1 = vectorloc+idx;
     2057                    ASSIGN_A(Aarg1, rpp_A[arg1])
     2058                    ASSIGN_A(Ares, rpp_A[res])
     2059
     2060                    FOR_0_LE_l_LT_p
     2061                    if (0 == ARES) {
     2062                        HOV_INC(Aarg1, k1)
     2063                        HOV_INC(Ares, k1)
     2064                    } else {
     2065                        MAXDEC(AARG1,ARES);
     2066                        AARG1_INC_O;
     2067                        ARES_INC = 0.0;
     2068                        FOR_0_LE_i_LT_k
     2069                        {
     2070                            AARG1_INC += ARES;
     2071                            ARES_INC = 0.0;
     2072                        }
     2073                    }
     2074                    GET_TAYL(res,k,p)
     2075                }
     2076                break;
     2077
     2078            case subscript_ref:
     2079                coval = get_val_r();
     2080                {
     2081                    size_t cnt, idx, numval = (size_t)trunc(fabs(coval));
     2082                    locint vectorloc;
     2083                    vectorloc = get_locint_r();
     2084                    res = get_locint_r();
     2085                    arg = get_locint_r();
     2086                    ASSIGN_T(Targ, rpp_T[arg])
     2087                    ASSIGN_T(Tres, rpp_T[res])
     2088                    idx = (size_t)trunc(fabs(TARG));
     2089                    if (idx >= numval)
     2090                        fprintf(DIAG_OUT, "ADOL-C warning: index out of bounds while subscripting (ref) n=%z, idx=%z\n", numval, idx);
     2091                    arg1 = (size_t)trunc(fabs(TRES));
     2092                    // This is actually NOP
     2093                    // basically all we need is that arg1 == vectorloc[idx]
     2094                    // so doing a check here is probably good
     2095                    if (arg1 != vectorloc+idx) {
     2096                        fprintf(DIAG_OUT, "ADOL-C error: indexed active position does not match referenced position\nindexed = %d, referenced = %d\n", vectorloc+idx, arg1);
     2097                        exit(-2);
     2098                    }
     2099                    GET_TAYL(res,k,p)
     2100                }
     2101                break;
     2102
     2103            case ref_copyout:
     2104                res = get_locint_r();
     2105                arg1 = get_locint_r();
     2106
     2107                ASSIGN_T(Targ1, rpp_T[arg1])
     2108                arg = (size_t)trunc(fabs(TARG1));
     2109
     2110                ASSIGN_A(Ares, rpp_A[res])
     2111                ASSIGN_A(Aarg, rpp_A[arg])
     2112
     2113                FOR_0_LE_l_LT_p
     2114                if (0 == ARES) {
     2115                    HOV_INC(Aarg, k1)
     2116                    HOV_INC(Ares, k1)
     2117                } else {
     2118                    MAXDEC(AARG,ARES);
     2119                    AARG_INC_O;
     2120                    ARES_INC = 0.0;
     2121                    FOR_0_LE_i_LT_k
     2122                    {
     2123                        AARG_INC += ARES;
     2124                        ARES_INC = 0.0;
     2125                    }
     2126                }
     2127                GET_TAYL(res,k,p)
     2128                break;
     2129
     2130            case ref_incr_a:                        /* Increment an adouble    incr_a */
     2131            case ref_decr_a:                        /* Increment an adouble    decr_a */
     2132                arg1   = get_locint_r();
     2133
     2134                ASSIGN_T(Targ1, rpp_T[arg1])
     2135                res = (size_t)trunc(fabs(TARG1));
     2136
     2137                GET_TAYL(res,k,p)
     2138                break;
     2139
     2140            case ref_assign_d:      /* assign an adouble variable a    assign_d */
     2141                /* double value. (=) */
     2142                coval = get_val_r();
     2143                // fallthrough
     2144            case ref_assign_d_zero: /* assign an adouble a        assign_d_zero */
     2145            case ref_assign_d_one:  /* double value. (=)           assign_d_one */
     2146                arg1   = get_locint_r();
     2147
     2148                ASSIGN_T(Targ1, rpp_T[arg1])
     2149                res = (size_t)trunc(fabs(TARG1));
     2150
     2151                ASSIGN_A(Ares, rpp_A[res])
     2152
     2153                FOR_0_LE_l_LT_pk1
     2154                ARES_INC = 0.0;
     2155
     2156                GET_TAYL(res,k,p)
     2157                break;
     2158
     2159            case ref_assign_a:     /* assign an adouble variable an    assign_a */
     2160                /* adouble value. (=) */
     2161                arg1 = get_locint_r();
     2162                arg = get_locint_r();
     2163
     2164                ASSIGN_T(Targ1, rpp_T[arg1])
     2165                res = (size_t)trunc(fabs(TARG1));
     2166
     2167                ASSIGN_A(Aarg, rpp_A[arg])
     2168                ASSIGN_A(Ares, rpp_A[res])
     2169
     2170                FOR_0_LE_l_LT_p
     2171                if  (0 == ARES) {
     2172                    HOV_INC(Aarg, k1)
     2173                    HOV_INC(Ares, k1)
     2174                } else {
     2175                    MAXDEC(AARG,ARES);
     2176                    AARG_INC_O;
     2177                    ARES_INC = 0.0;
     2178                    FOR_0_LE_i_LT_k
     2179                    { /* ! no tempory */
     2180                        AARG_INC += ARES;
     2181                        ARES_INC = 0.0;
     2182                    }
     2183                }
     2184
     2185                GET_TAYL(res,k,p)
     2186                break;
     2187
     2188            case ref_assign_ind:       /* assign an adouble variable an    assign_ind */
     2189                /* independent double value (<<=) */
     2190                arg1 = get_locint_r();
     2191                ASSIGN_T(Targ1, rpp_T[arg1])
     2192                res = (size_t)trunc(fabs(TARG1));
     2193                ASSIGN_A(Ares, rpp_A[res])
     2194
     2195                FOR_0_LE_l_LT_p
     2196                {
     2197#ifdef _HOV_
     2198                    if (nonzero) /* ??? question: why here? */
     2199                    nonzero[l][indexi] = (int)ARES;
     2200#endif /* _HOV_ */
     2201                    ARES_INC_O;
     2202                    FOR_0_LE_i_LT_k
     2203                        RESULTS(l,indexi,i) = ARES_INC;
     2204                }
     2205
     2206                GET_TAYL(res,k,p)
     2207                    indexi--;
     2208                break;
     2209
     2210        case ref_eq_plus_d:            /* Add a floating point to an    eq_plus_d */
     2211            /* adouble. (+=) */
     2212                arg1   = get_locint_r();
     2213                ASSIGN_T(Targ1, rpp_T[arg1])
     2214                res = (size_t)trunc(fabs(TARG1));
     2215                coval = get_val_r();
     2216
     2217                GET_TAYL(res,k,p)
     2218                break;
     2219
     2220            case ref_eq_plus_a:             /* Add an adouble to another    eq_plus_a */
     2221                /* adouble. (+=) */
     2222                arg1 = get_locint_r();
     2223                arg = get_locint_r();
     2224
     2225                ASSIGN_T(Targ1, rpp_T[arg1])
     2226                res = (size_t)trunc(fabs(TARG1));
     2227                ASSIGN_A(Ares, rpp_A[res])
     2228                ASSIGN_A(Aarg, rpp_A[arg])
     2229
     2230                FOR_0_LE_l_LT_p
     2231                if  (0 == ARES) {
     2232                    HOV_INC(Ares, k1)
     2233                    HOV_INC(Aarg, k1)
     2234                } else {
     2235                    MAXDEC(AARG,ARES);
     2236                    AARG_INC_O;
     2237                    ARES_INC_O;
     2238                    FOR_0_LE_i_LT_k
     2239                    AARG_INC += ARES_INC;
     2240                }
     2241
     2242                GET_TAYL(res,k,p)
     2243                break;
     2244
     2245            case ref_eq_min_d:       /* Subtract a floating point from an    eq_min_d */
     2246                /* adouble. (-=) */
     2247                arg1   = get_locint_r();
     2248                ASSIGN_T(Targ1, rpp_T[arg1])
     2249                res = (size_t)trunc(fabs(TARG1));
     2250                coval = get_val_r();
     2251
     2252                GET_TAYL(res,k,p)
     2253                break;
     2254
     2255            case ref_eq_min_a:        /* Subtract an adouble from another    eq_min_a */
     2256                /* adouble. (-=) */
     2257                arg1 = get_locint_r();
     2258                arg = get_locint_r();
     2259               
     2260                ASSIGN_T(Targ1, rpp_T[arg1])
     2261                res = (size_t)trunc(fabs(TARG1));
     2262                ASSIGN_A(Ares, rpp_A[res])
     2263                ASSIGN_A(Aarg, rpp_A[arg])
     2264
     2265                FOR_0_LE_l_LT_p
     2266                if  (0==ARES) {
     2267                    HOV_INC(Ares, k1)
     2268                    HOV_INC(Aarg, k1)
     2269                } else {
     2270                    MAXDEC(AARG,ARES);
     2271                    AARG_INC_O;
     2272                    ARES_INC_O;
     2273                    FOR_0_LE_i_LT_k
     2274                    AARG_INC -= ARES_INC;
     2275                }
     2276
     2277                GET_TAYL(res,k,p)
     2278                break;
     2279
     2280            case ref_eq_mult_d:              /* Multiply an adouble by a    eq_mult_d */
     2281                /* flaoting point. (*=) */
     2282                arg1   = get_locint_r();
     2283                ASSIGN_T(Targ1, rpp_T[arg1])
     2284                res = (size_t)trunc(fabs(TARG1));
     2285                coval = get_val_r();
     2286
     2287                ASSIGN_A(Ares, rpp_A[res])
     2288
     2289                FOR_0_LE_l_LT_p
     2290                if ( 0 == ARES_INC )
     2291                    HOV_INC(Ares, k)
     2292                    else
     2293                        FOR_0_LE_i_LT_k
     2294                        ARES_INC *= coval;
     2295
     2296                GET_TAYL(res,k,p)
     2297                break;
     2298
     2299        case ref_eq_mult_a:       /* Multiply one adouble by another    eq_mult_a */
     2300                /* (*=) */
     2301                arg1 = get_locint_r();
     2302                arg = get_locint_r();
     2303                ASSIGN_T(Targ1, rpp_T[arg1])
     2304                res = (size_t)trunc(fabs(TARG1));
     2305
     2306                GET_TAYL(res,k,p)
     2307
     2308                ASSIGN_A(Ares, rpp_A[res])
     2309                ASSIGN_A(Aarg, rpp_A[arg])
     2310                ASSIGN_A(Aqo,  rp_Atemp)
     2311                ASSIGN_T(Tres, rpp_T[res])
     2312                ASSIGN_T(Targ, rpp_T[arg])
     2313
     2314                FOR_0_LE_l_LT_p {
     2315                    if (0 == ARES) {
     2316                    HOV_INC(Aarg, k1)
     2317                        HOV_INC(Ares, k1)
     2318                    } else {
     2319                        MAXDEC(ARES,2.0);
     2320                        MAXDEC(AARG,ARES);
     2321                        AARG_INC_O;
     2322                        ARES_INC_O;
     2323                        conv(k,Ares,Targ,rp_Atemp);
     2324                        if(arg != res) {
     2325                            inconv(k,Ares,Tres,Aarg);
     2326                            FOR_0_LE_i_LT_k
     2327                            ARES_INC = AQO_INC;
     2328                        } else
     2329                            FOR_0_LE_i_LT_k
     2330                            ARES_INC = 2.0 * AQO_INC;
     2331                        HOV_INC(Aarg,k)
     2332                        HOS_OV_INC(Tres,k)
     2333                        HOS_OV_INC(Targ,k)
     2334                        HOS_OV_ASSIGN_A(Aqo,  rp_Atemp)
     2335                    }
     2336            }
     2337                break;
     2338
     2339            case ref_cond_assign:                                      /* cond_assign */
     2340            {   
     2341                revreal *Tref;
     2342                locint ref   = get_locint_r();
     2343                arg2  = get_locint_r();
     2344                arg1  = get_locint_r();
     2345                arg   = get_locint_r();
     2346                coval = get_val_r();
     2347               
     2348                ASSIGN_T(Tref, rpp_T[ref])
     2349
     2350#ifdef _HIGHER_ORDER_
     2351#define TREF  *Tref
     2352#else
     2353#define TREF   rpp_T[ref]
     2354#endif   
     2355
     2356                res = (size_t)trunc(fabs(TREF));
     2357#undef TREF
     2358                GET_TAYL(res,k,p)
     2359
     2360                ASSIGN_A(Aarg1, rpp_A[arg1])
     2361                ASSIGN_A(Ares,  rpp_A[res])
     2362                ASSIGN_A(Aarg2, rpp_A[arg2])
     2363                ASSIGN_T(Targ,  rpp_T[arg])
     2364
     2365                /* olvo 980925 changed code a little bit */
     2366                if (TARG > 0.0) {
     2367                    if (res != arg1)
     2368                        FOR_0_LE_l_LT_p
     2369                        { if (0 == ARES) {
     2370                          HOV_INC(Ares,  k1)
     2371                              HOV_INC(Aarg1, k1)
     2372                          } else {
     2373                              if (coval <= 0.0)
     2374                                  MINDEC(ret_c,2);
     2375                              MAXDEC(AARG1,ARES);
     2376                              ARES_INC = 0.0;
     2377                              AARG1_INC_O;
     2378                              FOR_0_LE_i_LT_k
     2379                              { AARG1_INC += ARES;
     2380                                ARES_INC = 0;
     2381                              }
     2382                          }
     2383                    }
     2384                    else
     2385                        FOR_0_LE_l_LT_p {
     2386                            if ((coval <= 0.0) && (ARES))
     2387                            MINDEC(ret_c,2);
     2388                            HOV_INC(Ares,  k1)
     2389                        }
     2390                    } else /* TARG <= 0.0 */
     2391            {
     2392                if (res != arg2)
     2393                        FOR_0_LE_l_LT_p
     2394                        { if (0 == ARES) {
     2395                          HOV_INC(Ares,  k1)
     2396                              HOV_INC(Aarg2, k1)
     2397                          } else {
     2398                              if (TARG == 0.0) /* we are at the tie */
     2399                              { MINDEC(ret_c,0);
     2400                                  AARG1 = 5.0;
     2401                                  AARG2_INC = 5.0;
     2402                              } else {
     2403                                  if (coval <= 0.0)
     2404                                      MINDEC(ret_c,2);
     2405                                  MAXDEC(AARG2,ARES);
     2406                                  AARG2_INC_O;
     2407                              }
     2408                              ARES_INC = 0.0;
     2409
     2410                              FOR_0_LE_i_LT_k
     2411                              { AARG2_INC += ARES;
     2412                                ARES_INC = 0;
     2413                              }
     2414                          }
     2415                      HOV_INC(Aarg1, k1)
     2416                    } else
     2417                        FOR_0_LE_l_LT_p {
     2418                            if (ARES) {
     2419                            if (TARG == 0.0) /* we are at the tie */
     2420                                { MINDEC(ret_c,0);
     2421                                    AARG1 = 5.0;
     2422                                    AARG2 = 5.0;
     2423                                } else
     2424                                    if (coval <= 0.0)
     2425                                        MINDEC(ret_c,2);
     2426                            }
     2427                        HOV_INC(Ares,  k1)
     2428                        HOV_INC(Aarg1, k1)
     2429                        HOV_INC(Aarg2, k1)
     2430                    }
     2431                }
     2432            }
     2433                break;
     2434
     2435            case ref_cond_assign_s:                                  /* cond_assign_s */
     2436                arg2   = get_locint_r();
     2437                arg1  = get_locint_r();
     2438                arg   = get_locint_r();
     2439                coval = get_val_r();
     2440               
     2441                ASSIGN_T(Targ2, rpp_T[arg2])
     2442                res = (size_t)trunc(fabs(TARG2));
     2443
     2444                GET_TAYL(res,k,p)
     2445
     2446                ASSIGN_A(Aarg1, rpp_A[arg1])
     2447                ASSIGN_A(Ares,  rpp_A[res])
     2448                ASSIGN_T(Targ,  rpp_T[arg])
     2449
     2450                /* olvo 980925 changed code a little bit */
     2451                if (TARG == 0.0) /* we are at the tie */
     2452                { FOR_0_LE_l_LT_p
     2453                    { if  (ARES)
     2454                      AARG1 = 5.0;
     2455                      HOV_INC(Aarg1, k1)
     2456                      HOV_INC(Ares,  k1)
     2457                    }
     2458                    MINDEC(ret_c,0);
     2459                } else
     2460                    if (TARG > 0.0) {
     2461                        if (res != arg1)
     2462                            FOR_0_LE_l_LT_p
     2463                            { if  (0 == ARES) {
     2464                              HOV_INC(Ares,  k1)
     2465                                  HOV_INC(Aarg1, k1)
     2466                              } else {
     2467                                  if (coval <= 0.0)
     2468                                      MINDEC(ret_c,2);
     2469                                  MAXDEC(AARG1,ARES);
     2470                                  ARES_INC = 0.0;
     2471                                  AARG1_INC_O;
     2472                                  FOR_0_LE_i_LT_k
     2473                                  { (AARG1_INC) += ARES;
     2474                                    ARES_INC = 0;
     2475                                  }
     2476                              }
     2477                        }
     2478                        else
     2479                            FOR_0_LE_l_LT_p {
     2480                                if ((coval <= 0.0) && (ARES))
     2481                                MINDEC(ret_c,2);
     2482                                HOV_INC(Ares,  k1)
     2483                            }
     2484                        }
     2485            break;
     2486
    20422487                /****************************************************************************/
    20432488                /*                                                          REMAINING STUFF */
  • trunk/ADOL-C/src/oplate.h

    r106 r337  
    66 
    77 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
    8                Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
     8               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel,
     9               Kshitij Kulshreshtha
    910 
    1011 This file is part of ADOL-C. This software is provided as open source.
     
    1617#if !defined(ADOLC_OPLATE_P_H)
    1718#define ADOLC_OPLATE_P_H 1
    18 
    19 #include <adolc/common.h>
    2019
    2120/****************************************************************************/
     
    8382  floor_op,
    8483  ext_diff,
    85   ignore_me
     84  ignore_me,
     85  subscript = 80,
     86  subscript_ref,
     87  ref_assign_d_zero,
     88  ref_assign_d_one,
     89  ref_assign_d,
     90  ref_assign_a,
     91  ref_assign_ind,
     92  ref_incr_a,
     93  ref_decr_a,
     94  ref_eq_plus_d,
     95  ref_eq_min_d,
     96  ref_eq_plus_a,
     97  ref_eq_min_a,
     98  ref_eq_mult_d,
     99  ref_eq_mult_a,
     100  ref_copyout,
     101  ref_cond_assign,
     102  ref_cond_assign_s
    86103};
    87104
  • trunk/ADOL-C/src/sparse/Makefile.in

    r322 r337  
    161161LTLIBOBJS = @LTLIBOBJS@
    162162MAKEINFO = @MAKEINFO@
     163MANIFEST_TOOL = @MANIFEST_TOOL@
    163164MKDIR_P = @MKDIR_P@
    164165NM = @NM@
     
    190191ac_adolc_cxxflags = @ac_adolc_cxxflags@
    191192ac_aux_dir = @ac_aux_dir@
     193ac_ct_AR = @ac_ct_AR@
    192194ac_ct_CC = @ac_ct_CC@
    193195ac_ct_CXX = @ac_ct_CXX@
     
    223225localedir = @localedir@
    224226localstatedir = @localstatedir@
    225 lt_ECHO = @lt_ECHO@
    226227mandir = @mandir@
    227228mkdir_p = @mkdir_p@
  • trunk/ADOL-C/src/sparse/sparsedrivers.cpp

    r331 r337  
    1313----------------------------------------------------------------------------*/
    1414#include <adolc/sparse/sparsedrivers.h>
    15 #include <adolc/oplate.h>
     15#include "oplate.h"
    1616#include <adolc/adalloc.h>
    1717#include <adolc/interfaces.h>
  • trunk/ADOL-C/src/storemanager.h

    r267 r337  
    99
    1010 Copyright (c) 2006 Johannes Willkomm <johannes.willkomm@rwth-aachen.de>
    11  Written by Johannes Willkomm <johannes.willkomm@rwth-aachen.de>
    12  
     11               2011-2012 Kshitij Kulshreshtha <kshitij@math.upb.de>
     12               2012 Benjamin Letschert <letschi@mail.upb.de>
     13
    1314 This file is part of ADOL-C.
    1415
     
    3536
    3637
     38 3) Have a look a class StoreManagerLocintBlock. This class uses a list of
     39    of free blocks of different sizes instead of free locations.
    3740
    3841 class StoreManagerInSitu
     
    5255
    5356 History:
     57          20120427 bl:     add blocking store management
    5458          20110208 kk:     incorporated in ADOL-C; moved some code arround
    5559          20060507 jw:     begin
     
    6165
    6266#include <adolc/common.h>
     67#include <list>
    6368
    6469class StoreManager {
     
    7075  virtual locint next_loc() = 0;
    7176  virtual void free_loc(locint) = 0;
     77  virtual void ensure_block(size_t n) = 0;
    7278
    7379//   // effectively the current size of the store array
     
    105111  virtual locint next_loc();
    106112  virtual void free_loc(locint loc);
     113  virtual void ensure_block(size_t n) {}
     114};
     115
     116class StoreManagerLocintBlock : public StoreManager {
     117protected:
     118    double * &storePtr;
     119    struct FeldBlock {
     120        locint next; // next location
     121        size_t size; // number of following free locations
     122        FeldBlock(): next(0), size(0) {}
     123        FeldBlock(const struct FeldBlock &block) :
     124            next(block.next),size(block.size) {}
     125    };
     126
     127    list<struct FeldBlock> indexFeld;
     128    size_t &groesse;
     129    size_t &anzahl;
     130private:
     131    void grow( );
     132public:
     133    StoreManagerLocintBlock(double * &storePtr, size_t &size, size_t &numlives);
     134    StoreManagerLocintBlock(const StoreManagerLocintBlock *const stm, double * &storePtr, size_t &size, size_t &numLives);
     135
     136    virtual ~StoreManagerLocintBlock();
     137    virtual inline size_t size() const { return anzahl; }
     138
     139    virtual inline size_t maxSize() const { return groesse; }
     140
     141    virtual locint next_loc();
     142    virtual void free_loc(locint loc);
     143    virtual void ensure_block(size_t n);
    107144};
    108145
  • trunk/ADOL-C/src/tape_handling.cpp

    r295 r337  
    55 Contents: management of tape infos
    66
    7  Copyright (c) Andreas Kowarz, Andrea Walther
    8  
     7 Copyright (c) Andreas Kowarz, Andrea Walther, Kshitij Kulshreshtha,
     8               Benjamin Letschert
     9
    910 This file is part of ADOL-C. This software is provided as open source.
    1011 Any use, reproduction, or distribution of the software constitutes
     
    4344  storeSize = 0;
    4445  numLives = 1;
    45   storeManagerPtr = new StoreManagerLocint(store, storeSize, numLives);
     46  storeManagerPtr = new StoreManagerLocintBlock(store, storeSize, numLives);
    4647}
    4748
     
    6970    memcpy(store, gtv.store, storeSize*sizeof(double));
    7071    storeManagerPtr = new
    71         StoreManagerLocint(
    72             dynamic_cast<StoreManagerLocint*>(gtv.storeManagerPtr),
     72        StoreManagerLocintBlock(
     73            dynamic_cast<StoreManagerLocintBlock*>(gtv.storeManagerPtr),
    7374            store, storeSize, numLives);
    7475    return *this;
     
    170171    storePtr = new double[groesse];
    171172    indexFeld = new locint[groesse];
    172     memset(storePtr, 0, groesse*sizeof(double));
    173173    // we use index 0 as end-of-list marker
    174174    size_t i = 1;
     
    11001100                    ADOLC_GLOBAL_TAPE_VARS.storeSize * sizeof(double));
    11011101            ADOLC_GLOBAL_TAPE_VARS.storeManagerPtr = new
    1102                 StoreManagerLocint(
    1103                     dynamic_cast<StoreManagerLocint*>(globalTapeVars_s->storeManagerPtr),
     1102                StoreManagerLocintBlock(
     1103                    dynamic_cast<StoreManagerLocintBlock*>(globalTapeVars_s->storeManagerPtr),
    11041104                    ADOLC_GLOBAL_TAPE_VARS.store,
    11051105                    ADOLC_GLOBAL_TAPE_VARS.storeSize,
     
    11801180}
    11811181
     1182StoreManagerLocintBlock::StoreManagerLocintBlock(double * &storePtr, size_t &size, size_t &numlives) :
     1183    storePtr(storePtr),
     1184    groesse(size), anzahl(numlives)
     1185{
     1186    indexFeld.clear();
     1187#ifdef ADOLC_DEBUG
     1188    std::cerr << "StoreManagerIntegerBlock::StoreManagerIntegerBlock()\n";
     1189#endif
     1190}
     1191
     1192StoreManagerLocintBlock::~StoreManagerLocintBlock()
     1193{
     1194#ifdef ADOLC_DEBUG
     1195    std::cerr << "StoreManagerIntegerBlock::~StoreManagerIntegerBlock()\n";
     1196#endif
     1197    if (storePtr) {
     1198     delete[] storePtr;
     1199     storePtr = 0;
     1200    }
     1201    if (indexFeld.size() ) {
     1202        indexFeld.clear();
     1203    }
     1204    groesse = 0;
     1205    anzahl = 0;
     1206}
     1207
     1208StoreManagerLocintBlock::StoreManagerLocintBlock(
     1209    const StoreManagerLocintBlock *const stm,
     1210    double * &storePtr, size_t &size, size_t &numlives) :
     1211    storePtr(storePtr),
     1212    groesse(size), anzahl(numlives)
     1213{
     1214#ifdef ADOLC_DEBUG
     1215    std::cerr << "StoreManagerInteger::StoreManagerInteger()\n";
     1216#endif
     1217    indexFeld.clear();
     1218    list<struct FeldBlock>::const_iterator iter = stm->indexFeld.begin();
     1219    for (; iter != stm->indexFeld.end(); iter++)
     1220        indexFeld.push_back( *iter );
     1221}
     1222
     1223
     1224locint StoreManagerLocintBlock::next_loc() {
     1225    if ( indexFeld.size()==0 )
     1226        grow();
     1227
     1228    locint const result = indexFeld.front().next;
     1229    indexFeld.front().next++;
     1230    indexFeld.front().size--;
     1231
     1232    if (indexFeld.front().size == 0)
     1233          indexFeld.pop_front();
     1234
     1235    ++anzahl;
     1236
     1237#ifdef ADOLC_DEBUG
     1238     std::cerr  << "next_loc() , anzahl= " <<anzahl << ", groesse= "<< groesse << endl;
     1239    list<struct FeldBlock>::iterator iter = indexFeld.begin();
     1240    for( ; iter != indexFeld.end(); iter++ )
     1241       std::cerr << "INDEXFELD ( " << iter->next << " , " << iter->size << ")" << endl;
     1242    std::cerr << "next_loc: " << result << " fill: " << size() << "max: " << maxSize() << endl;
     1243#endif
     1244    return result;
     1245}
     1246
     1247void StoreManagerLocintBlock::ensure_block(size_t n) {
     1248    bool grown = false;
     1249
     1250    if ( indexFeld.size()==0 ) {
     1251#ifdef ADOLC_DEBUG
     1252        std::cerr << "no free blocks...growing " << endl;
     1253#endif
     1254        grow();
     1255        grown = true;
     1256    }
     1257
     1258    while (indexFeld.front().size < n) {
     1259        if (grown && indexFeld.back().size >= n) {
     1260#ifdef ADOLC_DEBUG
     1261            std::cerr << "bringing back to front " << endl;
     1262#endif
     1263            struct FeldBlock tmp(indexFeld.back());
     1264            indexFeld.pop_back();
     1265            indexFeld.push_front(tmp);
     1266        }
     1267        else if (grown && indexFeld.back().size < n) {
     1268#ifdef ADOLC_DEBUG
     1269            std::cerr << "still not enough...growing " << endl;
     1270#endif
     1271            grow();
     1272        }
     1273        else {
     1274#ifdef ADOLC_DEBUG
     1275            std::cerr << "searching for big enough block " << endl;
     1276#endif
     1277            bool found = false;
     1278            list<struct FeldBlock>::iterator iter = indexFeld.begin();
     1279            for (; iter != indexFeld.end() ; iter++ ) {
     1280                if ( iter->size >= n) {
     1281                    if (iter != indexFeld.begin() ) {
     1282                        struct FeldBlock tmp(*iter);
     1283                        iter = indexFeld.erase(iter);
     1284                        indexFeld.push_front(tmp);
     1285                    }
     1286                    found = true;
     1287                    break;
     1288                }
     1289            }
     1290            if (!found) {
     1291#ifdef ADOLC_DEBUG
     1292                std::cerr << "no big enough block...growing " << endl;
     1293#endif
     1294                grow();
     1295                grown = true;
     1296            }
     1297        }
     1298    }
     1299
     1300#ifdef ADOLC_DEBUG
     1301    std::cerr << "ensure_Block: " << " fill: " << size() << "max: " << maxSize() << endl;
     1302    std::cerr << "ensure_Block (" << n << ")" << endl;
     1303    list<struct FeldBlock>::iterator iter = indexFeld.begin();
     1304    for( ; iter != indexFeld.end(); iter++ )
     1305       std::cerr << "INDEXFELD ( " << iter->next << " , " << iter->size << ")" << endl;
     1306#endif
     1307}
     1308
     1309void StoreManagerLocintBlock::grow() {
     1310    if (groesse == 0){
     1311        groesse += initialeGroesse;
     1312        struct FeldBlock tmp;
     1313        tmp.next = 0;
     1314        tmp.size = groesse;
     1315        indexFeld.push_back(tmp);
     1316    }
     1317
     1318    size_t const alteGroesse = groesse;
     1319    groesse *= 2;
     1320
     1321    if (groesse > std::numeric_limits<locint>::max()) {
     1322      // encapsulate this error message
     1323      fprintf(DIAG_OUT,"\nADOL-C error:\n");
     1324      fprintf(DIAG_OUT,"maximal number (%d) of live active variables exceeded\n\n",
     1325           std::numeric_limits<locint>::max());
     1326      exit(-3);
     1327    }
     1328
     1329#ifdef ADOLC_DEBUG
     1330    // index 0 is not used, means one slot less
     1331    std::cerr << "StoreManagerIntegerBlock::grow(): increase size from " << alteGroesse
     1332      << " to " << groesse << " entries (currently " << size() << " entries used)\n";
     1333#endif
     1334
     1335    double *const oldStore = storePtr;
     1336
     1337#if defined(ADOLC_DEBUG)
     1338    std::cerr << "StoreManagerInteger::grow(): allocate " << groesse * sizeof(double) << " B doubles "
     1339      << "and " << groesse * sizeof(struct FeldBlock) << " B LinkBlocks\n";
     1340#endif
     1341    storePtr = new double[groesse];
     1342    memset(storePtr, 0, groesse*sizeof(double));
     1343    size_t i = 0;
     1344
     1345    if (alteGroesse != initialeGroesse) { // not the first time
     1346#if defined(ADOLC_DEBUG)
     1347      std::cerr << "StoreManagerInteger::grow(): copy values\n";
     1348#endif
     1349      for (size_t j = i; j < alteGroesse; ++j) {
     1350          storePtr[j] = oldStore[j];
     1351      }
     1352
     1353#if defined(ADOLC_DEBUG)
     1354      std::cerr << "StoreManagerInteger::grow(): free " << alteGroesse * sizeof(double)
     1355          << " + " << alteGroesse * sizeof(struct FeldBlock) << " B\n";
     1356#endif
     1357      delete [] oldStore;
     1358    }
     1359    list<struct FeldBlock>::iterator iter = indexFeld.begin();
     1360    for (; iter != indexFeld.end() ; iter++ ) {
     1361         if (iter->next + iter->size == alteGroesse ) {
     1362              iter->size += alteGroesse;
     1363              // move the block to the end of the list because that is where
     1364              // other functions expect the newly grown block to be
     1365              struct FeldBlock tmp(*iter);
     1366              iter = indexFeld.erase(iter);
     1367              indexFeld.push_back(tmp);
     1368              break;
     1369         }
     1370    }
     1371    if (iter == indexFeld.end()) {
     1372         struct FeldBlock tmp;
     1373         tmp.next = alteGroesse;
     1374         tmp.size = alteGroesse;
     1375         indexFeld.push_back(tmp);
     1376    }
     1377#ifdef ADOLC_DEBUG
     1378    std::cerr << "Growing:" << endl;
     1379    iter = indexFeld.begin();
     1380    for( ; iter != indexFeld.end(); iter++ )
     1381       std::cerr << "INDEXFELD ( " << iter->next << " , " << iter->size << ")" << endl;
     1382#endif
     1383}
     1384
     1385void StoreManagerLocintBlock::free_loc(locint loc) {
     1386    assert( loc < groesse);
     1387
     1388    list<struct FeldBlock>::iterator iter = indexFeld.begin();
     1389    for (; iter != indexFeld.end() ; iter++ ) {
     1390         if (loc+1 == iter->next || iter->next + iter->size == loc) {
     1391              iter->size++;
     1392              if (loc + 1 == iter->next)
     1393                   iter->next = loc;
     1394    // bringing the matched element to the front maybe a good idea
     1395    // in case several contiguous adouble are deallcated right after
     1396    // one another, e.g. advector
     1397              struct FeldBlock tmp(*iter);
     1398              iter = indexFeld.erase(iter);
     1399              indexFeld.push_front(tmp);
     1400              iter = indexFeld.begin();
     1401              break;
     1402         }
     1403    }
     1404    if (iter == indexFeld.end()) {
     1405         struct FeldBlock tmp;
     1406         tmp.next = loc;
     1407         tmp.size = 1;
     1408         indexFeld.push_front(tmp);
     1409    }
     1410
     1411    --anzahl;
     1412#ifdef ADOLC_DEBUG
     1413    std::cerr << "free_loc: " << loc << " fill: " << size() << "max: " << maxSize() << endl;
     1414
     1415    iter = indexFeld.begin();
     1416    for( ; iter != indexFeld.end(); iter++ )
     1417       std::cerr << "INDEXFELD ( " << iter->next << " , " << iter->size << ")" << endl;
     1418#endif
     1419}
     1420
     1421void ensureContiguousLocations(size_t n) {
     1422    ADOLC_OPENMP_THREAD_NUMBER;
     1423    ADOLC_OPENMP_GET_THREAD_NUMBER;
     1424    ADOLC_GLOBAL_TAPE_VARS.storeManagerPtr->ensure_block(n);
     1425}
  • trunk/ADOL-C/src/tapedoc/Makefile.in

    r322 r337  
    161161LTLIBOBJS = @LTLIBOBJS@
    162162MAKEINFO = @MAKEINFO@
     163MANIFEST_TOOL = @MANIFEST_TOOL@
    163164MKDIR_P = @MKDIR_P@
    164165NM = @NM@
     
    190191ac_adolc_cxxflags = @ac_adolc_cxxflags@
    191192ac_aux_dir = @ac_aux_dir@
     193ac_ct_AR = @ac_ct_AR@
    192194ac_ct_CC = @ac_ct_CC@
    193195ac_ct_CXX = @ac_ct_CXX@
     
    223225localedir = @localedir@
    224226localstatedir = @localstatedir@
    225 lt_ECHO = @lt_ECHO@
    226227mandir = @mandir@
    227228mkdir_p = @mkdir_p@
  • trunk/ADOL-C/src/tapedoc/tapedoc.c

    r320 r337  
    1616
    1717#include <adolc/tapedoc/tapedoc.h>
    18 #include <adolc/oplate.h>
     18#include "oplate.h"
    1919#include "taping_p.h"
    2020#include <adolc/adalloc.h>
  • trunk/ADOL-C/src/taping.c

    r295 r337  
    77
    88 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
    9                Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
     9               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel,
     10               Kshitij Kulshreshtha
    1011 
    1112 This file is part of ADOL-C. This software is provided as open source.
     
    1819#include <string.h>
    1920
    20 #include <adolc/oplate.h>
     21#include "oplate.h"
    2122#include "taping_p.h"
    2223
  • trunk/ADOL-C/src/taping.h

    r294 r337  
    5757ADOLC_DLL_EXPORT void disableBranchSwitchWarnings();
    5858
     59ADOLC_DLL_EXPORT void ensureContiguousLocations(size_t n);
     60
    5961END_C_DECLS
    6062
  • trunk/ADOL-C/src/uni5_for.c

    r336 r337  
    2121 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
    2222               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel,
    23                Benjamin Letschert
     23               Benjamin Letschert, Kshitij Kulshreshtha
     24               
    2425
    2526 This file is part of ADOL-C. This software is provided as open source.
     
    3334#include <adolc/taping.h>
    3435#include "taping_p.h"
    35 #include <adolc/oplate.h>
     36#include "oplate.h"
    3637#include <adolc/externfcts.h>
    3738#include "externfcts_p.h"
     
    36233624#if defined(_INDO_)
    36243625#if defined(_INDOPRO_)
     3626#ifdef _TIGHT_
     3627                ind_dom[res][0] = 0;
     3628#else
    36253629                copy_index_domain(res, arg, ind_dom);
     3630#endif /* _TIGHT_ */
    36263631#endif
    36273632#if defined(_NONLIND_)
     
    36553660#if defined(_INDO_)
    36563661#if defined(_INDOPRO_)
     3662#ifdef _TIGHT_
     3663                ind_dom[res][0] = 0;
     3664#else
    36573665                copy_index_domain(res, arg, ind_dom);
     3666#endif /* _TIGHT_ */
    36583667#endif
    36593668#if defined(_NONLIND_)
     
    38463855                break;
    38473856
     3857
     3858                /*--------------------------------------------------------------------------*/
     3859            case subscript:
     3860                coval = get_val_f();
     3861                arg = get_locint_f();
     3862                res = get_locint_f();
     3863                {
     3864                    size_t cnt, idx, numvar = (size_t)trunc(fabs(coval));
     3865                    locint vectorloc;
     3866                    vectorloc = get_locint_f();
     3867#if !defined(_NTIGHT_)
     3868                    idx = (size_t)trunc(fabs(dp_T0[arg]));
     3869                    if (idx >= numvar)
     3870                        fprintf(DIAG_OUT, "ADOL-C warning: index out of bounds while subscripting n=%z, idx=%z\n", numvar, idx);
     3871                    arg1 = vectorloc+idx;
     3872                    IF_KEEP_WRITE_TAYLOR(res,keep,k,p);
     3873                    dp_T0[res] = dp_T0[arg1];
     3874#if defined(_INDO_)
     3875                    copy_index_domain(res, arg1, ind_dom);
     3876#else
     3877#if !defined(_ZOS_) /* BREAK_ZOS */
     3878                    ASSIGN_T(Targ1,TAYLOR_BUFFER[arg1])
     3879                    ASSIGN_T(Tres,TAYLOR_BUFFER[res])
     3880
     3881                    FOR_0_LE_l_LT_pk
     3882                    TRES_INC = TARG1_INC;
     3883#endif
     3884#endif
     3885#else
     3886                    fprintf(DIAG_OUT, "ADOL-C error: active subscripting does not work in safe mode, please use tight mode\n");
     3887                    exit(-2);
     3888#endif /* ALL_TOGETHER_AGAIN */
     3889                }
     3890                break;
     3891
     3892            case subscript_ref:
     3893                coval = get_val_f();
     3894                arg = get_locint_f();
     3895                res = get_locint_f();
     3896                {
     3897                    size_t cnt, idx, numvar = (size_t)trunc(fabs(coval));
     3898                    locint vectorloc;
     3899                    vectorloc = get_locint_f();
     3900#if !defined(_NTIGHT_)
     3901                    idx = (size_t)trunc(fabs(dp_T0[arg]));
     3902                    if (idx >= numvar)
     3903                        fprintf(DIAG_OUT, "ADOL-C warning: index out of bounds while subscripting (ref) n=%z, idx=%z\n", numvar, idx);
     3904                    arg1 = vectorloc+idx;
     3905                    IF_KEEP_WRITE_TAYLOR(res,keep,k,p);
     3906                    dp_T0[res] = arg1;
     3907#else
     3908                    fprintf(DIAG_OUT, "ADOL-C error: active subscripting does not work in safe mode, please use tight mode\n");
     3909                    exit(-2);
     3910#endif
     3911                }
     3912                break;
     3913
     3914            case ref_copyout:
     3915                arg = get_locint_f();
     3916                res = get_locint_f();
     3917#if !defined(_NTIGHT_)
     3918                arg1 = (size_t)trunc(fabs(dp_T0[arg]));
     3919                IF_KEEP_WRITE_TAYLOR(res,keep,k,p);
     3920                dp_T0[res] = dp_T0[arg1];
     3921#if defined(_INDO_)
     3922                copy_index_domain(res, arg1, ind_dom);
     3923#else
     3924#if !defined(_ZOS_) /* BREAK_ZOS */
     3925                ASSIGN_T(Targ1,TAYLOR_BUFFER[arg1])
     3926                ASSIGN_T(Tres,TAYLOR_BUFFER[res])
     3927
     3928                FOR_0_LE_l_LT_pk
     3929                TRES_INC = TARG1_INC;
     3930#endif
     3931#endif
     3932#else
     3933                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     3934                exit(-2);
     3935#endif /* ALL_TOGETHER_AGAIN */
     3936                break;
     3937
     3938            case ref_incr_a:
     3939                arg = get_locint_f();
     3940#if !defined(_NTIGHT_)
     3941                arg1 = (size_t)trunc(fabs(dp_T0[arg]));
     3942                IF_KEEP_WRITE_TAYLOR(arg1,keep,k,p);
     3943                dp_T0[arg1]++;
     3944#else
     3945                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     3946                exit(-2);
     3947#endif
     3948                break;
     3949
     3950            case ref_decr_a:
     3951                arg = get_locint_f();
     3952#if !defined(_NTIGHT_)
     3953                arg1 = (size_t)trunc(fabs(dp_T0[arg]));
     3954                IF_KEEP_WRITE_TAYLOR(arg1,keep,k,p);
     3955                dp_T0[arg1]--;
     3956#else
     3957                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     3958                exit(-2);
     3959#endif
     3960                break;
     3961
     3962            case ref_assign_d:
     3963                arg = get_locint_f();
     3964                coval = get_val_f();
     3965               
     3966#if !defined(_NTIGHT_)
     3967                arg1 = (size_t)trunc(fabs(dp_T0[arg]));
     3968                IF_KEEP_WRITE_TAYLOR(arg1,keep,k,p)
     3969                dp_T0[arg1] = coval;
     3970#if defined(_INDO_)
     3971                ind_dom[arg1][0] = 0;
     3972#else
     3973#if !defined(_ZOS_)
     3974                ASSIGN_T(Targ1, TAYLOR_BUFFER[arg1])
     3975
     3976                FOR_0_LE_l_LT_pk
     3977                TARG1_INC = 0;
     3978#endif
     3979#endif
     3980#else
     3981                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     3982                exit(-2);
     3983#endif
     3984                break;
     3985
     3986            case ref_assign_d_zero:
     3987                arg = get_locint_f();
     3988
     3989#if !defined(_NTIGHT_)
     3990                arg1 = (size_t)trunc(fabs(dp_T0[arg]));
     3991                IF_KEEP_WRITE_TAYLOR(arg1,keep,k,p)
     3992                dp_T0[arg1] = 0.0;
     3993#if defined(_INDO_)
     3994                ind_dom[arg1][0] = 0;
     3995#else
     3996#if !defined(_ZOS_)
     3997                ASSIGN_T(Targ1, TAYLOR_BUFFER[arg1])
     3998
     3999                FOR_0_LE_l_LT_pk
     4000                TARG1_INC = 0;
     4001#endif
     4002#endif
     4003#else
     4004                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4005                exit(-2);
     4006#endif
     4007                break;
     4008
     4009            case ref_assign_d_one:
     4010                arg = get_locint_f();
     4011
     4012#if !defined(_NTIGHT_)
     4013                arg1 = (size_t)trunc(fabs(dp_T0[arg]));
     4014                IF_KEEP_WRITE_TAYLOR(arg1,keep,k,p)
     4015                dp_T0[arg1] = 1.0;
     4016#if defined(_INDO_)
     4017                ind_dom[arg1][0] = 0;
     4018#else
     4019#if !defined(_ZOS_)
     4020                ASSIGN_T(Targ1, TAYLOR_BUFFER[arg1])
     4021
     4022                FOR_0_LE_l_LT_pk
     4023                TARG1_INC = 0;
     4024#endif
     4025#endif
     4026#else
     4027                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4028                exit(-2);
     4029#endif
     4030                break;
     4031
     4032            case ref_assign_a:           /* assign an adouble variable an    assign_a */
     4033                /* adouble value. (=) */
     4034                arg = get_locint_f();
     4035                res = get_locint_f();
     4036
     4037#if !defined(_NTIGHT_)
     4038                arg1 = (size_t)trunc(fabs(dp_T0[res]));
     4039                IF_KEEP_WRITE_TAYLOR(arg1,keep,k,p)
     4040                dp_T0[arg1] = dp_T0[arg];
     4041#if defined(_INDO_)
     4042                copy_index_domain(arg1, arg, ind_dom);
     4043#else
     4044#if !defined(_ZOS_) /* BREAK_ZOS */
     4045                ASSIGN_T(Targ,TAYLOR_BUFFER[arg])
     4046                ASSIGN_T(Targ1,TAYLOR_BUFFER[arg1])
     4047
     4048                FOR_0_LE_l_LT_pk
     4049                TARG1_INC = TARG_INC;
     4050#endif
     4051#endif
     4052#else
     4053                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4054                exit(-2);
     4055#endif /* ALL_TOGETHER_AGAIN */
     4056                break;
     4057
     4058            case ref_assign_ind:       /* assign an adouble variable an    assign_ind */
     4059                /* independent double value (<<=) */
     4060                arg = get_locint_f();
     4061
     4062
     4063#if !defined(_NTIGHT_)
     4064                res = (size_t)trunc(fabs(dp_T0[arg]));
     4065                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4066                dp_T0[res] = basepoint[indexi];
     4067#if defined(_INDO_)
     4068                ind_dom[res][0] = 1;
     4069                ind_dom[res][2] = indexi;
     4070#else
     4071#if !defined(_ZOS_) /* BREAK_ZOS */
     4072                ASSIGN_T(Tres, TAYLOR_BUFFER[res])
     4073
     4074#ifdef _INT_FOR_
     4075                FOR_0_LE_l_LT_p
     4076                TRES_INC = ARGUMENT(indexi,l,i);
     4077#else
     4078                FOR_0_LE_l_LT_p
     4079                FOR_0_LE_i_LT_k
     4080                TRES_INC = ARGUMENT(indexi,l,i);
     4081#endif
     4082#endif
     4083#endif
     4084#else
     4085                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4086                exit(-2);
     4087#endif /* ALL_TOGETHER_AGAIN */
     4088                ++indexi;
     4089                break;
     4090
     4091            case ref_eq_plus_d:            /* Add a floating point to an    eq_plus_d */
     4092                /* adouble. (+=) */
     4093                arg  = get_locint_f();
     4094                coval = get_val_f();
     4095
     4096
     4097#if !defined(_NTIGHT_)
     4098                res = (size_t)trunc(fabs(dp_T0[arg]));
     4099                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4100                dp_T0[res] += coval;
     4101#else
     4102                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4103                exit(-2);
     4104#endif /* !_NTIGHT_ */
     4105                break;
     4106
     4107                /*--------------------------------------------------------------------------*/
     4108            case ref_eq_plus_a:             /* Add an adouble to another    eq_plus_a */
     4109                /* adouble. (+=) */
     4110                arg = get_locint_f();
     4111                arg1 = get_locint_f();
     4112
     4113#if !defined(_NTIGHT_)
     4114                res = (size_t)trunc(fabs(dp_T0[arg1]));
     4115                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4116                dp_T0[res] += dp_T0[arg];
     4117#if defined(_INDO_)
     4118                merge_2_index_domains(res, arg, ind_dom);
     4119#else
     4120#if !defined(_ZOS_) /* BREAK_ZOS */
     4121                ASSIGN_T(Tres, TAYLOR_BUFFER[res])
     4122                ASSIGN_T(Targ, TAYLOR_BUFFER[arg])
     4123
     4124#ifdef _INT_FOR_
     4125                FOR_0_LE_l_LT_pk
     4126                TRES_INC |= TARG_INC;
     4127#else
     4128                FOR_0_LE_l_LT_pk
     4129                TRES_INC += TARG_INC;
     4130#endif
     4131#endif
     4132#endif
     4133#else
     4134                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4135                exit(-2);
     4136#endif /* ALL_TOGETHER_AGAIN */
     4137                break;
     4138
     4139            case ref_eq_min_d:       /* Subtract a floating point from an    eq_min_d */
     4140                /* adouble. (-=) */
     4141                arg = get_locint_f();
     4142                coval = get_val_f();
     4143
     4144#if !defined(_NTIGHT_)
     4145                res = (size_t)trunc(fabs(dp_T0[arg]));
     4146                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4147                dp_T0[res] -= coval;
     4148#else
     4149                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4150                exit(-2);
     4151#endif /* !_NTIGHT_ */
     4152                break;
     4153
     4154                /*--------------------------------------------------------------------------*/
     4155            case ref_eq_min_a:        /* Subtract an adouble from another    eq_min_a */
     4156                /* adouble. (-=) */
     4157                arg = get_locint_f();
     4158                arg1 = get_locint_f();
     4159
     4160#if !defined(_NTIGHT_)
     4161                res = (size_t)trunc(fabs(dp_T0[arg1]));
     4162                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4163                dp_T0[res] -= dp_T0[arg];
     4164#if defined(_INDO_)
     4165                merge_2_index_domains(res, arg, ind_dom);
     4166#else
     4167#if !defined(_ZOS_) /* BREAK_ZOS */
     4168                ASSIGN_T(Tres, TAYLOR_BUFFER[res])
     4169                ASSIGN_T(Targ, TAYLOR_BUFFER[arg])
     4170
     4171#ifdef _INT_FOR_
     4172                FOR_0_LE_l_LT_pk
     4173                TRES_INC |= TARG_INC;
     4174#else
     4175                FOR_0_LE_l_LT_pk
     4176                TRES_INC -= TARG_INC;
     4177#endif
     4178#endif
     4179#endif
     4180#else
     4181                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4182                exit(-2);
     4183#endif /* ALL_TOGETHER_AGAIN */
     4184                break;
     4185
     4186            case ref_eq_mult_d:              /* Multiply an adouble by a    eq_mult_d */
     4187                /* flaoting point. (*=) */
     4188                arg = get_locint_f();
     4189                coval = get_val_f();
     4190
     4191#if !defined(_NTIGHT_)
     4192                res = (size_t)trunc(fabs(dp_T0[arg]));
     4193                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4194                dp_T0[res] *= coval;
     4195#if !defined(_INDO_)
     4196#if !defined(_ZOS_) /* BREAK_ZOS */
     4197#if !defined( _INT_FOR_)
     4198
     4199                FOR_0_LE_l_LT_pk
     4200                ASSIGN_T(Tres, TAYLOR_BUFFER[res])
     4201
     4202                FOR_0_LE_l_LT_pk
     4203                TRES_INC *= coval;
     4204#endif
     4205#endif
     4206#endif
     4207#else
     4208                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4209                exit(-2);
     4210#endif /* ALL_TOGETHER_AGAIN */
     4211                break;
     4212
     4213            case ref_eq_mult_a:       /* Multiply one adouble by another    eq_mult_a */
     4214                /* (*=) */
     4215                arg = get_locint_f();
     4216                arg1 = get_locint_f();
     4217
     4218#if !defined(_NTIGHT_)
     4219                res = (size_t)trunc(fabs(dp_T0[arg1]));
     4220                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4221#if defined(_INDO_)
     4222                merge_2_index_domains(res, arg, ind_dom);
     4223#if defined(_NONLIND_)
     4224                extend_nonlinearity_domain_binary(res, arg, ind_dom, nonl_dom);
     4225#endif
     4226#else
     4227#if !defined(_ZOS_) /* BREAK_ZOS */
     4228                ASSIGN_T(Tres, TAYLOR_BUFFER[res])
     4229                ASSIGN_T(Targ, TAYLOR_BUFFER[arg])
     4230
     4231                INC_pk_1(Tres)
     4232                INC_pk_1(Targ)
     4233
     4234#ifdef _INT_FOR_
     4235                FOR_p_GT_l_GE_0
     4236                TRES_FODEC |= TARG_DEC;
     4237#else
     4238                FOR_p_GT_l_GE_0
     4239                FOR_k_GT_i_GE_0
     4240                { TRES_FODEC = dp_T0[res]*TARG_DEC +
     4241                               TRES*dp_T0[arg];
     4242                  DEC_TRES_FO
     4243#ifdef _HIGHER_ORDER_
     4244                  TresOP = Tres-i;
     4245                  TargOP = Targ;
     4246
     4247                  for (j=0;j<i;j++)
     4248                  *Tres += (*TresOP++) * (*TargOP--);
     4249                  Tres--;
     4250#endif /* _HIGHER_ORDER_ */
     4251                }
     4252#endif
     4253#endif
     4254#endif
     4255                dp_T0[res] *= dp_T0[arg];
     4256#else
     4257                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4258                exit(-2);
     4259#endif /* !_NTIGHT_ */
     4260                break;
     4261
     4262            case ref_cond_assign:                                      /* cond_assign */
     4263                arg   = get_locint_f();
     4264                arg1  = get_locint_f();
     4265                arg2  = get_locint_f();
     4266                {
     4267                    locint ref = get_locint_f();
     4268                    coval = get_val_f();
     4269#if !defined(_NTIGHT_)
     4270                    res   = (size_t)trunc(fabs(dp_T0[ref]));
     4271
     4272                    IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4273
     4274                /* olvo 980924 changed order to allow reflexive ops */
     4275#if defined(_INDO_)
     4276                if (dp_T0[arg] > 0) {
     4277                    if (coval <= 0.0)
     4278                        MINDEC(ret_c,2);
     4279                    dp_T0[res] = dp_T0[arg1];
     4280
     4281                    combine_2_index_domains(res, arg1, arg2, ind_dom);
     4282                } else {
     4283                    if (coval > 0.0)
     4284                        MINDEC(ret_c,2);
     4285                    if (dp_T0[arg] == 0)
     4286                        MINDEC(ret_c,0);
     4287                    dp_T0[res] = dp_T0[arg2];
     4288
     4289                    combine_2_index_domains(res, arg1, arg2, ind_dom);
     4290                }
     4291#else
     4292#if !defined(_ZOS_) /* BREAK_ZOS */
     4293                ASSIGN_T(Tres,  TAYLOR_BUFFER[res])
     4294                ASSIGN_T(Targ1, TAYLOR_BUFFER[arg1])
     4295                ASSIGN_T(Targ2, TAYLOR_BUFFER[arg2])
     4296#endif /* ALL_TOGETHER_AGAIN */
     4297
     4298#ifdef _INT_FOR_
     4299                coval = get_val_f();
     4300
     4301                if (dp_T0[arg] > 0)
     4302                    FOR_0_LE_l_LT_pk
     4303                    TRES_INC = TARG1_INC;
     4304                else
     4305                    FOR_0_LE_l_LT_pk
     4306                    TRES_INC = TARG2_INC;
     4307
     4308                if (dp_T0[arg] > 0) {
     4309                    if (coval <= 0.0)
     4310                        MINDEC(ret_c,2);
     4311                    dp_T0[res] = dp_T0[arg1];
     4312                } else {
     4313                    if (coval > 0.0)
     4314                        MINDEC(ret_c,2);
     4315                    if (dp_T0[arg] == 0)
     4316                        MINDEC(ret_c,0);
     4317                    dp_T0[res] = dp_T0[arg2];
     4318                }
     4319                FOR_0_LE_l_LT_pk
     4320                TRES_INC = TARG1_INC | TARG2_INC;
     4321#else
     4322#if !defined(_ZOS_) /* BREAK_ZOS */
     4323                if (dp_T0[arg] > 0)
     4324                    FOR_0_LE_l_LT_pk
     4325                    TRES_INC = TARG1_INC;
     4326                else
     4327                    FOR_0_LE_l_LT_pk
     4328                    TRES_INC = TARG2_INC;
     4329#endif
     4330
     4331                if (dp_T0[arg] > 0) {
     4332                    if (coval <= 0.0)
     4333                        MINDEC(ret_c,2);
     4334                    dp_T0[res] = dp_T0[arg1];
     4335                } else {
     4336                    if (coval > 0.0)
     4337                        MINDEC(ret_c,2);
     4338                    if (dp_T0[arg] == 0)
     4339                        MINDEC(ret_c,0);
     4340                    dp_T0[res] = dp_T0[arg2];
     4341                }
     4342#endif
     4343#endif
     4344#else
     4345                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4346                exit(-2);
     4347#endif /* ALL_TOGETHER_AGAIN */
     4348                }
     4349                break;
     4350
     4351            case ref_cond_assign_s:                                  /* cond_assign_s */
     4352                arg   = get_locint_f();
     4353                arg1  = get_locint_f();
     4354                arg2   = get_locint_f();
     4355                coval = get_val_f();
     4356
     4357#if !defined(_NTIGHT_)
     4358                res = (size_t)trunc(fabs(dp_T0[arg2]));
     4359                IF_KEEP_WRITE_TAYLOR(res,keep,k,p)
     4360
     4361                /* olvo 980924 changed order to allow reflexive ops */
     4362#if defined(_INDO_)
     4363                    copy_index_domain(res, arg1, ind_dom);
     4364#else
     4365#if !defined(_ZOS_) /* BREAK_ZOS */
     4366                ASSIGN_T(Tres,  TAYLOR_BUFFER[res])
     4367                ASSIGN_T(Targ1, TAYLOR_BUFFER[arg1])
     4368#endif /* ALL_TOGETHER_AGAIN */
     4369
     4370#ifdef _INT_FOR_
     4371                coval = get_val_f();
     4372
     4373                if (dp_T0[arg] > 0)
     4374                    FOR_0_LE_l_LT_pk
     4375                    TRES_INC = TARG1_INC;
     4376
     4377                if (dp_T0[arg] > 0) {
     4378                    if (coval <= 0.0)
     4379                        MINDEC(ret_c,2);
     4380                    dp_T0[res] = dp_T0[arg1];
     4381                } else
     4382                    if (dp_T0[arg] == 0)
     4383                        MINDEC(ret_c,0);
     4384#else
     4385#if !defined(_ZOS_) /* BREAK_ZOS */
     4386                if (dp_T0[arg] > 0)
     4387                    FOR_0_LE_l_LT_pk
     4388                    TRES_INC = TARG1_INC;
     4389#endif
     4390                if (dp_T0[arg] > 0) {
     4391                    if (coval <= 0.0)
     4392                        MINDEC(ret_c,2);
     4393                    dp_T0[res] = dp_T0[arg1];
     4394                } else
     4395                    if (dp_T0[arg] == 0)
     4396                        MINDEC(ret_c,0);
     4397#endif
     4398#endif
     4399#else
     4400                fprintf(DIAG_OUT, "ADOL-C error: active vector element referencing does not work in safe mode, please use tight mode\n");
     4401                exit(-2);
     4402#endif /* ALL_TOGETHER_AGAIN */
     4403                break;
    38484404
    38494405                /****************************************************************************/
  • trunk/ADOL-C/test/Makefile.in

    r322 r337  
    145145LTLIBOBJS = @LTLIBOBJS@
    146146MAKEINFO = @MAKEINFO@
     147MANIFEST_TOOL = @MANIFEST_TOOL@
    147148MKDIR_P = @MKDIR_P@
    148149NM = @NM@
     
    174175ac_adolc_cxxflags = @ac_adolc_cxxflags@
    175176ac_aux_dir = @ac_aux_dir@
     177ac_ct_AR = @ac_ct_AR@
    176178ac_ct_CC = @ac_ct_CC@
    177179ac_ct_CXX = @ac_ct_CXX@
     
    207209localedir = @localedir@
    208210localstatedir = @localstatedir@
    209 lt_ECHO = @lt_ECHO@
    210211mandir = @mandir@
    211212mkdir_p = @mkdir_p@
  • trunk/MSVisualStudio/v10/installer.sh

    r213 r337  
    22INCFILES=(adolc.h adalloc.h adouble.h adutils.h adutilsc.h \
    33         common.h convolut.h dvlparms.h fortutils.h \
    4          interfaces.h oplate.h taping.h usrparms.h \
     4         interfaces.h taping.h usrparms.h \
    55         externfcts.h checkpointing.h fixpoint.h \
    66         adolc_sparse.h adolc_openmp.h \
  • trunk/Makefile.in

    r322 r337  
    171171LTLIBOBJS = @LTLIBOBJS@
    172172MAKEINFO = @MAKEINFO@
     173MANIFEST_TOOL = @MANIFEST_TOOL@
    173174MKDIR_P = @MKDIR_P@
    174175NM = @NM@
     
    200201ac_adolc_cxxflags = @ac_adolc_cxxflags@
    201202ac_aux_dir = @ac_aux_dir@
     203ac_ct_AR = @ac_ct_AR@
    202204ac_ct_CC = @ac_ct_CC@
    203205ac_ct_CXX = @ac_ct_CXX@
     
    233235localedir = @localedir@
    234236localstatedir = @localstatedir@
    235 lt_ECHO = @lt_ECHO@
    236237mandir = @mandir@
    237238mkdir_p = @mkdir_p@
  • trunk/aclocal.m4

    <
    r322 r337  
    1414m4_ifndef([AC_AUTOCONF_VERSION],
    1515  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
    16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
    17 [m4_warning([this file was generated for autoconf 2.67.
     16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
     17[m4_warning([this file was generated for autoconf 2.68.
    1818You have another version of autoconf.  It may work, but is not guaranteed to.
    1919If you have problems, you may need to regenerate the build system entirely.
     
    2323#
    2424#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
    25 #                 2006, 2007, 2008 Free Software Foundation, Inc.
     25#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
     26#                 Inc.
    2627#   Written by Gordon Matzigkeit, 1996
    2728#
     
    3233m4_define([_LT_COPYING], [dnl
    3334#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
    34 #                 2006, 2007, 2008 Free Software Foundation, Inc.
     35#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
     36#                 Inc.
    3537#   Written by Gordon Matzigkeit, 1996
    3638#
     
    5961])
    6062
    61 # serial 56 LT_INIT
     63# serial 57 LT_INIT
    6264
    6365
     
    8890AC_DEFUN([LT_INIT],
    8991[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
     92AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
    9093AC_BEFORE([$0], [LT_LANG])dnl
    9194AC_BEFORE([$0], [LT_OUTPUT])dnl
     
    103106AC_REQUIRE([LTOBSOLETE_VERSION])dnl
    104107m4_require([_LT_PROG_LTMAIN])dnl
     108
     109_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
    105110
    106111dnl Parse OPTIONS
     
    140145  esac
    141146done
    142 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
     147cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
    143148])
    144149
     
    160165[AC_REQUIRE([AC_CANONICAL_HOST])dnl
    161166AC_REQUIRE([AC_CANONICAL_BUILD])dnl
     167AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
     168AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
     169
    162170_LT_DECL([], [host_alias], [0], [The host system])dnl
    163171_LT_DECL([], [host], [0])dnl
     
    182190m4_require([_LT_FILEUTILS_DEFAULTS])dnl
    183191m4_require([_LT_CHECK_SHELL_FEATURES])dnl
     192m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
    184193m4_require([_LT_CMD_RELOAD])dnl
    185194m4_require([_LT_CHECK_MAGIC_METHOD])dnl
     195m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
    186196m4_require([_LT_CMD_OLD_ARCHIVE])dnl
    187197m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
     198m4_require([_LT_WITH_SYSROOT])dnl
    188199
    189200_LT_CONFIG_LIBTOOL_INIT([
     
    201212
    202213m4_require([_LT_TAG_COMPILER])dnl
    203 _LT_PROG_ECHO_BACKSLASH
    204214
    205215case $host_os in
     
    215225esac
    216226
    217 # Sed substitution that helps us do robust quoting.  It backslashifies
    218 # metacharacters that are still active within double-quoted strings.
    219 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
    220 
    221 # Same as above, but do not quote variable references.
    222 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
    223 
    224 # Sed substitution to delay expansion of an escaped shell variable in a
    225 # double_quote_subst'ed string.
    226 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
    227 
    228 # Sed substitution to delay expansion of an escaped single quote.
    229 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
    230 
    231 # Sed substitution to avoid accidental globbing in evaled expressions
    232 no_glob_subst='s/\*/\\\*/g'
    233 
    234227# Global variables:
    235228ofile=libtool
     
    271264])# _LT_SETUP
    272265
     266
     267# _LT_PREPARE_SED_QUOTE_VARS
     268# --------------------------
     269# Define a few sed substitution that help us do robust quoting.
     270m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
     271[# Backslashify metacharacters that are still active within
     272# double-quoted strings.
     273sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
     274
     275# Same as above, but do not quote variable references.
     276double_quote_subst='s/\([["`\\]]\)/\\\1/g'
     277
     278# Sed substitution to delay expansion of an escaped shell variable in a
     279# double_quote_subst'ed string.
     280delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
     281
     282# Sed substitution to delay expansion of an escaped single quote.
     283delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
     284
     285# Sed substitution to avoid accidental globbing in evaled expressions
     286no_glob_subst='s/\*/\\\*/g'
     287])
    273288
    274289# _LT_PROG_LTMAIN
     
    424439# must have a single quote delimited value for this to work.
    425440m4_define([_LT_CONFIG_STATUS_DECLARE],
    426 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
     441[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
    427442
    428443
     
    434449# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
    435450#
    436 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
     451#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
    437452m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
    438453[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
     
    533548compiler='$compiler_DEFAULT'
    534549
     550# A function that is used when there is no print builtin or printf.
     551func_fallback_echo ()
     552{
     553  eval 'cat <<_LTECHO_EOF
     554\$[]1
     555_LTECHO_EOF'
     556}
     557
    535558# Quote evaled strings.
    536559for var in lt_decl_all_varnames([[ \
    537560]], lt_decl_quote_varnames); do
    538     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
     561    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    539562    *[[\\\\\\\`\\"\\\$]]*)
    540       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
     563      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
    541564      ;;
    542565    *)
     
    549572for var in lt_decl_all_varnames([[ \
    550573]], lt_decl_dquote_varnames); do
    551     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
     574    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
    552575    *[[\\\\\\\`\\"\\\$]]*)
    553       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
     576      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
    554577      ;;
    555578    *)
     
    559582done
    560583
    561 # Fix-up fallback echo if it was mangled by the above quoting rules.
    562 case \$lt_ECHO in
    563 *'\\\[$]0 --fallback-echo"')dnl "
    564   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
    565   ;;
    566 esac
    567 
    568584_LT_OUTPUT_LIBTOOL_INIT
    569585])
    570586
     587# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
     588# ------------------------------------
     589# Generate a child script FILE with all initialization necessary to
     590# reuse the environment learned by the parent script, and make the
     591# file executable.  If COMMENT is supplied, it is inserted after the
     592# `#!' sequence but before initialization text begins.  After this
     593# macro, additional text can be appended to FILE to form the body of
     594# the child script.  The macro ends with non-zero status if the
     595# file could not be fully written (such as if the disk is full).
     596m4_ifdef([AS_INIT_GENERATED],
     597[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
     598[m4_defun([_LT_GENERATED_FILE_INIT],
     599[m4_require([AS_PREPARE])]dnl
     600[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
     601[lt_write_fail=0
     602cat >$1 <<_ASEOF || lt_write_fail=1
     603#! $SHELL
     604# Generated by $as_me.
     605$2
     606SHELL=\${CONFIG_SHELL-$SHELL}
     607export SHELL
     608_ASEOF
     609cat >>$1 <<\_ASEOF || lt_write_fail=1
     610AS_SHELL_SANITIZE
     611_AS_PREPARE
     612exec AS_MESSAGE_FD>&1
     613_ASEOF
     614test $lt_write_fail = 0 && chmod +x $1[]dnl
     615m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
    571616
    572617# LT_OUTPUT
     
    578623[: ${CONFIG_LT=./config.lt}
    579624AC_MSG_NOTICE([creating $CONFIG_LT])
    580 cat >"$CONFIG_LT" <<_LTEOF
    581 #! $SHELL
    582 # Generated by $as_me.
    583 # Run this file to recreate a libtool stub with the current configuration.
    584 
     625_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
     626[# Run this file to recreate a libtool stub with the current configuration.])
     627
     628cat >>"$CONFIG_LT" <<\_LTEOF
    585629lt_cl_silent=false
    586 SHELL=\${CONFIG_SHELL-$SHELL}
    587 _LTEOF
    588 
    589 cat >>"$CONFIG_LT" <<\_LTEOF
    590 AS_SHELL_SANITIZE
    591 _AS_PREPARE
    592 
    593 exec AS_MESSAGE_FD>&1
    594630exec AS_MESSAGE_LOG_FD>>config.log
    595631{
     
    617653configured by $[0], generated by m4_PACKAGE_STRING.
    618654
    619 Copyright (C) 2008 Free Software Foundation, Inc.
     655Copyright (C) 2010 Free Software Foundation, Inc.
    620656This config.lt script is free software; the Free Software Foundation
    621657gives unlimited permision to copy, distribute and modify it."
     
    662698# open by configure.  Here we exec the FD to /dev/null, effectively closing
    663699# config.log, so it can be properly (re)opened and appended to by config.lt.
    664 if test "$no_create" != yes; then
    665   lt_cl_success=:
    666   test "$silent" = yes &&
    667     lt_config_lt_args="$lt_config_lt_args --quiet"
    668   exec AS_MESSAGE_LOG_FD>/dev/null
    669   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
    670   exec AS_MESSAGE_LOG_FD>>config.log
    671   $lt_cl_success || AS_EXIT(1)
    672 fi
     700lt_cl_success=:
     701test "$silent" = yes &&
     702  lt_config_lt_args="$lt_config_lt_args --quiet"
     703exec AS_MESSAGE_LOG_FD>/dev/null
     704$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
     705exec AS_MESSAGE_LOG_FD>>config.log
     706$lt_cl_success || AS_EXIT(1)
    673707])# LT_OUTPUT
    674708
     
    733767  # text mode, it properly converts lines to CR/LF.  This bash problem
    734768  # is reportedly fixed, but why not run on old versions too?
    735   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
    736     || (rm -f "$cfgfile"; exit 1)
    737 
    738   _LT_PROG_XSI_SHELLFNS
    739 
    740   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
    741     || (rm -f "$cfgfile"; exit 1)
    742 
    743   mv -f "$cfgfile" "$ofile" ||
     769  sed '$q' "$ltmain" >> "$cfgfile" \
     770     || (rm -f "$cfgfile"; exit 1)
     771
     772  _LT_PROG_REPLACE_SHELLFNS
     773
     774   mv -f "$cfgfile" "$ofile" ||
    744775    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    745776  chmod +x "$ofile"
     
    847878AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
    848879AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
     880AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
    849881dnl aclocal-1.4 backwards compatibility:
    850882dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
     
    852884dnl AC_DEFUN([AC_LIBTOOL_FC], [])
    853885dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
     886dnl AC_DEFUN([AC_LIBTOOL_RC], [])
    854887
    855888
     
    956989        LDFLAGS="$save_LDFLAGS"
    957990    ])
     991    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
     992      [lt_cv_ld_force_load=no
     993      cat > conftest.c << _LT_EOF
     994int forced_loaded() { return 2;}
     995_LT_EOF
     996      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
     997      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
     998      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
     999      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
     1000      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
     1001      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
     1002      cat > conftest.c << _LT_EOF
     1003int main() { return 0;}
     1004_LT_EOF
     1005      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
     1006      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
     1007      _lt_result=$?
     1008      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
     1009        lt_cv_ld_force_load=yes
     1010      else
     1011        cat conftest.err >&AS_MESSAGE_LOG_FD
     1012      fi
     1013        rm -f conftest.err libconftest.a conftest conftest.c
     1014        rm -rf conftest.dSYM
     1015    ])
    9581016    case $host_os in
    9591017    rhapsody* | darwin1.[[012]])
     
    9831041      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
    9841042    fi
    985     if test "$DSYMUTIL" != ":"; then
     1043    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
    9861044      _lt_dsymutil='~$DSYMUTIL $lib || :'
    9871045    else
     
    10031061  _LT_TAGVAR(hardcode_automatic, $1)=yes
    10041062  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
    1005   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
     1063  if test "$lt_cv_ld_force_load" = "yes"; then
     1064    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
     1065  else
     1066    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
     1067  fi
    10061068  _LT_TAGVAR(link_all_deplibs, $1)=yes
    10071069  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
     
    10111073  esac
    10121074  if test "$_lt_dar_can_shared" = "yes"; then
    1013     output_verbose_link_cmd=echo
     1075    output_verbose_link_cmd=func_echo_all
    10141076    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
    10151077    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
     
    10271089])
    10281090
    1029 # _LT_SYS_MODULE_PATH_AIX
    1030 # -----------------------
     1091# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
     1092# ----------------------------------
    10311093# Links a minimal program and checks the executable
    10321094# for the system default hardcoded library path. In most cases,
     
    10351097# If we don't find anything, use the default library path according
    10361098# to the aix ld manual.
     1099# Store the results from the different compilers for each TAGNAME.
     1100# Allow to override them for all tags through lt_cv_aix_libpath.
    10371101m4_defun([_LT_SYS_MODULE_PATH_AIX],
    10381102[m4_require([_LT_DECL_SED])dnl
    1039 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
    1040 lt_aix_libpath_sed='
    1041     /Import File Strings/,/^$/ {
    1042         /^0/ {
    1043             s/^0  *\(.*\)$/\1/
    1044             p
    1045         }
    1046     }'
    1047 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
    1048 # Check for a 64-bit object if we didn't find anything.
    1049 if test -z "$aix_libpath"; then
    1050   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
    1051 fi],[])
    1052 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
     1103if test "${lt_cv_aix_libpath+set}" = set; then
     1104  aix_libpath=$lt_cv_aix_libpath
     1105else
     1106  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
     1107  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
     1108  lt_aix_libpath_sed='[
     1109      /Import File Strings/,/^$/ {
     1110          /^0/ {
     1111              s/^0  *\([^ ]*\) *$/\1/
     1112              p
     1113          }
     1114      }]'
     1115  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
     1116  # Check for a 64-bit object if we didn't find anything.
     1117  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
     1118    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
     1119  fi],[])
     1120  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
     1121    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
     1122  fi
     1123  ])
     1124  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
     1125fi
    10531126])# _LT_SYS_MODULE_PATH_AIX
    10541127
     
    10571130# -------------------
    10581131m4_define([_LT_SHELL_INIT],
    1059 [ifdef([AC_DIVERSION_NOTICE],
    1060              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
    1061          [AC_DIVERT_PUSH(NOTICE)])
    1062 $1
    1063 AC_DIVERT_POP
    1064 ])# _LT_SHELL_INIT
     1132[m4_divert_text([M4SH-INIT], [$1
     1133])])# _LT_SHELL_INIT
     1134
    10651135
    10661136
    10671137# _LT_PROG_ECHO_BACKSLASH
    10681138# -----------------------
    1069 # Add some code to the start of the generated configure script which
    1070 # will find an echo command which doesn't interpret backslashes.
     1139# Find how we can fake an echo command that does not interpret backslash.
     1140# In particular, with Autoconf 2.60 or later we add some code to the start
     1141# of the generated configure script which will find a shell with a builtin
     1142# printf (which we can use as an echo command).
    10711143m4_defun([_LT_PROG_ECHO_BACKSLASH],
    1072 [_LT_SHELL_INIT([
    1073 # Check that we are running under the correct shell.
    1074 SHELL=${CONFIG_SHELL-/bin/sh}
    1075 
    1076 case X$lt_ECHO in
    1077 X*--fallback-echo)
    1078   # Remove one level of quotation (which was required for Make).
    1079   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
    1080   ;;
     1144[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
     1145ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
     1146ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
     1147
     1148AC_MSG_CHECKING([how to print strings])
     1149# Test print first, because it will be a builtin if present.
     1150if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
     1151   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
     1152  ECHO='print -r --'
     1153elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
     1154  ECHO='printf %s\n'
     1155else
     1156  # Use this function as a fallback that always works.
     1157  func_fallback_echo ()
     1158  {
     1159    eval 'cat <<_LTECHO_EOF
     1160$[]1
     1161_LTECHO_EOF'
     1162  }
     1163  ECHO='func_fallback_echo'
     1164fi
     1165
     1166# func_echo_all arg...
     1167# Invoke $ECHO with all args, space-separated.
     1168func_echo_all ()
     1169{
     1170    $ECHO "$*"
     1171}
     1172
     1173case "$ECHO" in
     1174  printf*) AC_MSG_RESULT([printf]) ;;
     1175  print*) AC_MSG_RESULT([print -r]) ;;
     1176  *) AC_MSG_RESULT([cat]) ;;
    10811177esac
    10821178
    1083 ECHO=${lt_ECHO-echo}
    1084 if test "X[$]1" = X--no-reexec; then
    1085   # Discard the --no-reexec flag, and continue.
    1086   shift
    1087 elif test "X[$]1" = X--fallback-echo; then
    1088   # Avoid inline document here, it may be left over
    1089   :
    1090 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
    1091   # Yippee, $ECHO works!
    1092   :
    1093 else
    1094   # Restart under the correct shell.
    1095   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
    1096 fi
    1097 
    1098 if test "X[$]1" = X--fallback-echo; then
    1099   # used as fallback echo
    1100   shift
    1101   cat <<_LT_EOF
    1102 [$]*
    1103 _LT_EOF
    1104   exit 0
    1105 fi
    1106 
    1107 # The HP-UX ksh and POSIX shell print the target directory to stdout
    1108 # if CDPATH is set.
    1109 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    1110 
    1111 if test -z "$lt_ECHO"; then
    1112   if test "X${echo_test_string+set}" != Xset; then
    1113     # find a string as large as possible, as long as the shell can cope with it
    1114     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
    1115       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
    1116       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
    1117          { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
    1118       then
    1119         break
    1120       fi
    1121     done
    1122   fi
    1123 
    1124   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
    1125      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
    1126      test "X$echo_testing_string" = "X$echo_test_string"; then
    1127     :
    1128   else
    1129     # The Solaris, AIX, and Digital Unix default echo programs unquote
    1130     # backslashes.  This makes it impossible to quote backslashes using
    1131     #   echo "$something" | sed 's/\\/\\\\/g'
    1132     #
    1133     # So, first we look for a working echo in the user's PATH.
    1134 
    1135     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
    1136     for dir in $PATH /usr/ucb; do
    1137       IFS="$lt_save_ifs"
    1138       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
    1139          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
    1140          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
    1141          test "X$echo_testing_string" = "X$echo_test_string"; then
    1142         ECHO="$dir/echo"
    1143         break
    1144       fi
    1145     done
    1146     IFS="$lt_save_ifs"
    1147 
    1148     if test "X$ECHO" = Xecho; then
    1149       # We didn't find a better echo, so look for alternatives.
    1150       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
    1151          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
    1152          test "X$echo_testing_string" = "X$echo_test_string"; then
    1153         # This shell has a builtin print -r that does the trick.
    1154         ECHO='print -r'
    1155       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
    1156            test "X$CONFIG_SHELL" != X/bin/ksh; then
    1157         # If we have ksh, try running configure again with it.
    1158         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
    1159         export ORIGINAL_CONFIG_SHELL
    1160         CONFIG_SHELL=/bin/ksh
    1161         export CONFIG_SHELL
    1162         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
    1163       else
    1164         # Try using printf.
    1165         ECHO='printf %s\n'
    1166         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
    1167            echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
    1168            test "X$echo_testing_string" = "X$echo_test_string"; then
    1169           # Cool, printf works
    1170           :
    1171         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
    1172              test "X$echo_testing_string" = 'X\t' &&
    1173              echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
    1174              test "X$echo_testing_string" = "X$echo_test_string"; then
    1175           CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
    1176           export CONFIG_SHELL
    1177           SHELL="$CONFIG_SHELL"
    1178           export SHELL
    1179           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
    1180         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
    1181              test "X$echo_testing_string" = 'X\t' &&
    1182              echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
    1183              test "X$echo_testing_string" = "X$echo_test_string"; then
    1184           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
    1185         else
    1186           # maybe with a smaller string...
    1187           prev=:
    1188 
    1189           for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
    1190             if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
    1191             then
    1192               break
    1193             fi
    1194             prev="$cmd"
    1195           done
    1196 
    1197           if test "$prev" != 'sed 50q "[$]0"'; then
    1198             echo_test_string=`eval $prev`
    1199             export echo_test_string
    1200             exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
    1201           else
    1202             # Oops.  We lost completely, so just stick with echo.
    1203             ECHO=echo
    1204           fi
    1205         fi
    1206       fi
    1207     fi
    1208   fi
    1209 fi
    1210 
    1211 # Copy echo and quote the copy suitably for passing to libtool from
    1212 # the Makefile, instead of quoting the original, which is used later.
    1213 lt_ECHO=$ECHO
    1214 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
    1215    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
    1216 fi
    1217 
    1218 AC_SUBST(lt_ECHO)
    1219 ])
     1179m4_ifdef([_AS_DETECT_SUGGESTED],
     1180[_AS_DETECT_SUGGESTED([
     1181  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
     1182    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
     1183    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
     1184    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
     1185    PATH=/empty FPATH=/empty; export PATH FPATH
     1186    test "X`printf %s $ECHO`" = "X$ECHO" \
     1187      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
     1188
    12201189_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
    1221 _LT_DECL([], [ECHO], [1],
    1222     [An echo program that does not interpret backslashes])
     1190_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
    12231191])# _LT_PROG_ECHO_BACKSLASH
    12241192
     1193
     1194# _LT_WITH_SYSROOT
     1195# ----------------
     1196AC_DEFUN([_LT_WITH_SYSROOT],
     1197[AC_MSG_CHECKING([for sysroot])
     1198AC_ARG_WITH([sysroot],
     1199[  --with-sysroot[=DIR] Search for dependent libraries within DIR
     1200                        (or the compiler's sysroot if not specified).],
     1201[], [with_sysroot=no])
     1202
     1203dnl lt_sysroot will always be passed unquoted.  We quote it here
     1204dnl in case the user passed a directory name.
     1205lt_sysroot=
     1206case ${with_sysroot} in #(
     1207 yes)
     1208   if test "$GCC" = yes; then
     1209     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
     1210   fi
     1211   ;; #(
     1212 /*)
     1213   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
     1214   ;; #(
     1215 no|'')
     1216   ;; #(
     1217 *)
     1218   AC_MSG_RESULT([${with_sysroot}])
     1219   AC_MSG_ERROR([The sysroot must be an absolute path.])
     1220   ;;
     1221esac
     1222
     1223 AC_MSG_RESULT([${lt_sysroot:-no}])
     1224_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
     1225[dependent libraries, and in which our libraries should be installed.])])
    12251226
    12261227# _LT_ENABLE_LOCK
     
    12521253*-*-irix6*)
    12531254  # Find out which ABI we are using.
    1254   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
     1255  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
    12551256  if AC_TRY_EVAL(ac_compile); then
    12561257    if test "$lt_cv_prog_gnu_ld" = yes; then
     
    13701371
    13711372
     1373# _LT_PROG_AR
     1374# -----------
     1375m4_defun([_LT_PROG_AR],
     1376[AC_CHECK_TOOLS(AR, [ar], false)
     1377: ${AR=ar}
     1378: ${AR_FLAGS=cru}
     1379_LT_DECL([], [AR], [1], [The archiver])
     1380_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
     1381
     1382AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
     1383  [lt_cv_ar_at_file=no
     1384   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
     1385     [echo conftest.$ac_objext > conftest.lst
     1386      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
     1387      AC_TRY_EVAL([lt_ar_try])
     1388      if test "$ac_status" -eq 0; then
     1389        # Ensure the archiver fails upon bogus file names.
     1390        rm -f conftest.$ac_objext libconftest.a
     1391        AC_TRY_EVAL([lt_ar_try])
     1392        if test "$ac_status" -ne 0; then
     1393          lt_cv_ar_at_file=@
     1394        fi
     1395      fi
     1396      rm -f conftest.* libconftest.a
     1397     ])
     1398  ])
     1399
     1400if test "x$lt_cv_ar_at_file" = xno; then
     1401  archiver_list_spec=
     1402else
     1403  archiver_list_spec=$lt_cv_ar_at_file
     1404fi
     1405_LT_DECL([], [archiver_list_spec], [1],
     1406  [How to feed a file listing to the archiver])
     1407])# _LT_PROG_AR
     1408
     1409
    13721410# _LT_CMD_OLD_ARCHIVE
    13731411# -------------------
    13741412m4_defun([_LT_CMD_OLD_ARCHIVE],
    1375 [AC_CHECK_TOOL(AR, ar, false)
    1376 test -z "$AR" && AR=ar
    1377 test -z "$AR_FLAGS" && AR_FLAGS=cru
    1378 _LT_DECL([], [AR], [1], [The archiver])
    1379 _LT_DECL([], [AR_FLAGS], [1])
     1413[_LT_PROG_AR
    13801414
    13811415AC_CHECK_TOOL(STRIP, strip, :)
     
    14041438  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
    14051439fi
     1440
     1441case $host_os in
     1442  darwin*)
     1443    lock_old_archive_extraction=yes ;;
     1444  *)
     1445    lock_old_archive_extraction=no ;;
     1446esac
    14061447_LT_DECL([], [old_postinstall_cmds], [2])
    14071448_LT_DECL([], [old_postuninstall_cmds], [2])
    14081449_LT_TAGDECL([], [old_archive_cmds], [2],
    14091450    [Commands used to build an old-style archive])
     1451_LT_DECL([], [lock_old_archive_extraction], [0],
     1452    [Whether to use a lock for old archive extraction])
    14101453])# _LT_CMD_OLD_ARCHIVE
    14111454
     
    14321475   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    14331476   -e 's:$: $lt_compiler_flag:'`
    1434    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
     1477   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    14351478   (eval "$lt_compile" 2>conftest.err)
    14361479   ac_status=$?
    14371480   cat conftest.err >&AS_MESSAGE_LOG_FD
    1438    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
     1481   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    14391482   if (exit $ac_status) && test -s "$ac_outfile"; then
    14401483     # The compiler can only warn and ignore the option if not recognized
    14411484     # So say no if there are warnings other than the usual output.
    1442      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
     1485     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
    14431486     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
    14441487     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
     
    14801523       # Append any errors to the config.log.
    14811524       cat conftest.err 1>&AS_MESSAGE_LOG_FD
    1482        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
     1525       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
    14831526       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
    14841527       if diff conftest.exp conftest.er2 >/dev/null; then
     
    15401583    # Instead, let's just punt: use the minimum linelength reported by
    15411584    # all of the supported platforms: 8192 (on NT/2K/XP).
     1585    lt_cv_sys_max_cmd_len=8192;
     1586    ;;
     1587
     1588  mint*)
     1589    # On MiNT this can take a long time and run out of memory.
    15421590    lt_cv_sys_max_cmd_len=8192;
    15431591    ;;
     
    16071655      # maximum length that is only half of the actual maximum length, but
    16081656      # we can't tell.
    1609       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
    1610                  = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
     1657      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
     1658                 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
    16111659              test $i != 17 # 1/2 MB should be enough
    16121660      do
     
    16591707  lt_status=$lt_dlunknown
    16601708  cat > conftest.$ac_ext <<_LT_EOF
    1661 [#line __oline__ "configure"
     1709[#line $LINENO "configure"
    16621710#include "confdefs.h"
    16631711
     
    17001748#endif
    17011749
    1702 void fnord() { int i=42;}
     1750/* When -fvisbility=hidden is used, assume the code has been annotated
     1751   correspondingly for the symbols needed.  */
     1752#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
     1753int fnord () __attribute__((visibility("default")));
     1754#endif
     1755
     1756int fnord () { return 42; }
    17031757int main ()
    17041758{
     
    17091763    {
    17101764      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
    1711       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
     1765      else
     1766        {
     1767          if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
     1768          else puts (dlerror ());
     1769        }
    17121770      /* dlclose (self); */
    17131771    }
     
    18851943   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    18861944   -e 's:$: $lt_compiler_flag:'`
    1887    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
     1945   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    18881946   (eval "$lt_compile" 2>out/conftest.err)
    18891947   ac_status=$?
    18901948   cat out/conftest.err >&AS_MESSAGE_LOG_FD
    1891    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
     1949   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    18921950   if (exit $ac_status) && test -s out/conftest2.$ac_objext
    18931951   then
    18941952     # The compiler can only warn and ignore the option if not recognized
    18951953     # So say no if there are warnings
    1896      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
     1954     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
    18971955     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
    18981956     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
     
    20532111m4_require([_LT_DECL_OBJDUMP])dnl
    20542112m4_require([_LT_DECL_SED])dnl
     2113m4_require([_LT_CHECK_SHELL_FEATURES])dnl
    20552114AC_MSG_CHECKING([dynamic linker characteristics])
    20562115m4_if([$1],
     
    20612120    *) lt_awk_arg="/^libraries:/" ;;
    20622121  esac
    2063   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
    2064   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
     2122  case $host_os in
     2123    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
     2124    *) lt_sed_strip_eq="s,=/,/,g" ;;
     2125  esac
     2126  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
     2127  case $lt_search_path_spec in
     2128  *\;*)
    20652129    # if the path contains ";" then we assume it to be the separator
    20662130    # otherwise default to the standard path separator (i.e. ":") - it is
    20672131    # assumed that no part of a normal pathname contains ";" but that should
    20682132    # okay in the real world where ";" in dirpaths is itself problematic.
    2069     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
    2070   else
    2071     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
    2072   fi
     2133    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
     2134    ;;
     2135  *)
     2136    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
     2137    ;;
     2138  esac
    20732139  # Ok, now we have the path, separated by spaces, we can step through it
    20742140  # and add multilib dir if necessary.
     
    20832149    fi
    20842150  done
    2085   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
     2151  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
    20862152BEGIN {RS=" "; FS="/|\n";} {
    20872153  lt_foo="";
     
    21032169  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
    21042170}'`
    2105   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
     2171  # AWK program above erroneously prepends '/' to C:/dos/paths
     2172  # for these hosts.
     2173  case $host_os in
     2174    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
     2175      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
     2176  esac
     2177  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
    21062178else
    21072179  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
     
    21912263    library_names_spec='$libname.ixlibrary $libname.a'
    21922264    # Create ${libname}_ixlibrary.a entries in /sys/libs.
    2193     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     2265    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
    21942266    ;;
    21952267  esac
     
    22222294  need_lib_prefix=no
    22232295
    2224   case $GCC,$host_os in
    2225   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
     2296  case $GCC,$cc_basename in
     2297  yes,*)
     2298    # gcc
    22262299    library_names_spec='$libname.dll.a'
    22272300    # DLL is installed to $(libdir)/../bin by postinstall_cmds
     
    22442317      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
    22452318      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
    2246       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
     2319m4_if([$1], [],[
     2320      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
    22472321      ;;
    22482322    mingw* | cegcc*)
    22492323      # MinGW DLLs use traditional 'lib' prefix
    22502324      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
    2251       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
    2252       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
    2253         # It is most probably a Windows format PATH printed by
    2254         # mingw gcc, but we are running on Cygwin. Gcc prints its search
    2255         # path with ; separators, and with drive letters. We can handle the
    2256         # drive letters (cygwin fileutils understands them), so leave them,
    2257         # especially as we might pass files found there to a mingw objdump,
    2258         # which wouldn't understand a cygwinified path. Ahh.
    2259         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
    2260       else
    2261         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
    2262       fi
    22632325      ;;
    22642326    pw32*)
     
    22672329      ;;
    22682330    esac
     2331    dynamic_linker='Win32 ld.exe'
    22692332    ;;
    22702333
     2334  *,cl*)
     2335    # Native MSVC
     2336    libname_spec='$name'
     2337    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
     2338    library_names_spec='${libname}.dll.lib'
     2339
     2340    case $build_os in
     2341    mingw*)
     2342      sys_lib_search_path_spec=
     2343      lt_save_ifs=$IFS
     2344      IFS=';'
     2345      for lt_path in $LIB
     2346      do
     2347        IFS=$lt_save_ifs
     2348        # Let DOS variable expansion print the short 8.3 style file name.
     2349        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
     2350        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
     2351      done
     2352      IFS=$lt_save_ifs
     2353      # Convert to MSYS style.
     2354      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
     2355      ;;
     2356    cygwin*)
     2357      # Convert to unix form, then to dos form, then back to unix form
     2358      # but this time dos style (no spaces!) so that the unix form looks
     2359      # like /cygdrive/c/PROGRA~1:/cygdr...
     2360      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
     2361      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
     2362      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
     2363      ;;
     2364    *)
     2365      sys_lib_search_path_spec="$LIB"
     2366      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
     2367        # It is most probably a Windows format PATH.
     2368        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
     2369      else
     2370        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
     2371      fi
     2372      # FIXME: find the short name or the path components, as spaces are
     2373      # common. (e.g. "Program Files" -> "PROGRA~1")
     2374      ;;
     2375    esac
     2376
     2377    # DLL is installed to $(libdir)/../bin by postinstall_cmds
     2378    postinstall_cmds='base_file=`basename \${file}`~
     2379      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
     2380      dldir=$destdir/`dirname \$dlpath`~
     2381      test -d \$dldir || mkdir -p \$dldir~
     2382      $install_prog $dir/$dlname \$dldir/$dlname'
     2383    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
     2384      dlpath=$dir/\$dldll~
     2385       $RM \$dlpath'
     2386    shlibpath_overrides_runpath=yes
     2387    dynamic_linker='Win32 link.exe'
     2388    ;;
     2389
    22712390  *)
     2391    # Assume MSVC wrapper
    22722392    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
     2393    dynamic_linker='Win32 ld.exe'
    22732394    ;;
    22742395  esac
    2275   dynamic_linker='Win32 ld.exe'
    22762396  # FIXME: first we should search . and the directory the executable is in
    22772397  shlibpath_var=PATH
     
    23572477  soname_spec='${libname}${release}${shared_ext}$major'
    23582478  shlibpath_var=LD_LIBRARY_PATH
     2479  hardcode_into_libs=yes
     2480  ;;
     2481
     2482haiku*)
     2483  version_type=linux
     2484  need_lib_prefix=no
     2485  need_version=no
     2486  dynamic_linker="$host_os runtime_loader"
     2487  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
     2488  soname_spec='${libname}${release}${shared_ext}$major'
     2489  shlibpath_var=LIBRARY_PATH
     2490  shlibpath_overrides_runpath=yes
     2491  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
    23592492  hardcode_into_libs=yes
    23602493  ;;
     
    24022535    ;;
    24032536  esac
    2404   # HP-UX runs *really* slowly unless shared libraries are mode 555.
     2537  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
    24052538  postinstall_cmds='chmod 555 $lib'
     2539  # or fails outright, so override atomically:
     2540  install_override_mode=555
    24062541  ;;
    24072542
     
    24702605  shlibpath_var=LD_LIBRARY_PATH
    24712606  shlibpath_overrides_runpath=no
     2607
    24722608  # Some binutils ld are patched to set DT_RUNPATH
    2473   save_LDFLAGS=$LDFLAGS
    2474   save_libdir=$libdir
    2475   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
    2476        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
    2477   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
    2478     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
    2479        [shlibpath_overrides_runpath=yes])])
    2480   LDFLAGS=$save_LDFLAGS
    2481   libdir=$save_libdir
     2609  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
     2610    [lt_cv_shlibpath_overrides_runpath=no
     2611    save_LDFLAGS=$LDFLAGS
     2612    save_libdir=$libdir
     2613    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
     2614         LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
     2615    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
     2616      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
     2617         [lt_cv_shlibpath_overrides_runpath=yes])])
     2618    LDFLAGS=$save_LDFLAGS
     2619    libdir=$save_libdir
     2620    ])
     2621  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
    24822622
    24832623  # This implies no fast_install, which is unacceptable.
     
    24882628  # Append ld.so.conf contents to the search path
    24892629  if test -f /etc/ld.so.conf; then
    2490     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
     2630    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
    24912631    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
    24922632  fi
     
    24992639  # assume the GNU/Linux dynamic linker is in use.
    25002640  dynamic_linker='GNU/Linux ld.so'
    2501   ;;
    2502 
    2503 netbsdelf*-gnu)
    2504   version_type=linux
    2505   need_lib_prefix=no
    2506   need_version=no
    2507   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
    2508   soname_spec='${libname}${release}${shared_ext}$major'
    2509   shlibpath_var=LD_LIBRARY_PATH
    2510   shlibpath_overrides_runpath=no
    2511   hardcode_into_libs=yes
    2512   dynamic_linker='NetBSD ld.elf_so'
    25132641  ;;
    25142642
     
    27332861_LT_DECL([], [soname_spec], [1],
    27342862    [[The coded name of the library, if different from the real name]])
     2863_LT_DECL([], [install_override_mode], [1],
     2864    [Permission mode override for installation of shared libraries])
    27352865_LT_DECL([], [postinstall_cmds], [2],
    27362866    [Command to use after installation of a shared archive])
     
    28452975m4_require([_LT_DECL_SED])dnl
    28462976m4_require([_LT_DECL_EGREP])dnl
     2977m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
    28472978
    28482979AC_ARG_WITH([gnu-ld],
     
    29663097reload_cmds='$LD$reload_flag -o $output$reload_objs'
    29673098case $host_os in
     3099  cygwin* | mingw* | pw32* | cegcc*)
     3100    if test "$GCC" != yes; then
     3101      reload_cmds=false
     3102    fi
     3103    ;;
    29683104  darwin*)
    29693105    if test "$GCC" = yes; then
     
    29743110    ;;
    29753111esac
    2976 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
    2977 _LT_DECL([], [reload_cmds], [2])dnl
     3112_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
     3113_LT_TAGDECL([], [reload_cmds], [2])dnl
    29783114])# _LT_CMD_RELOAD
    29793115
     
    30273163  # func_win32_libid shell function, so use a weaker test based on 'objdump',
    30283164  # unless we find 'file', for example because we are cross-compiling.
    3029   if ( file / ) >/dev/null 2>&1; then
     3165  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
     3166  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
    30303167    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
    30313168    lt_cv_file_magic_cmd='func_win32_libid'
    30323169  else
    3033     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
     3170    # Keep this pattern in sync with the one in func_win32_libid.
     3171    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
    30343172    lt_cv_file_magic_cmd='$OBJDUMP -f'
    30353173  fi
    30363174  ;;
    30373175
    3038 cegcc)
     3176cegcc*)
    30393177  # use the weaker test based on 'objdump'. See mingw*.
    30403178  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
     
    30663204  ;;
    30673205
     3206haiku*)
     3207  lt_cv_deplibs_check_method=pass_all
     3208  ;;
     3209
    30683210hpux10.20* | hpux11*)
    30693211  lt_cv_file_magic_cmd=/usr/bin/file
     
    30743216    ;;
    30753217  hppa*64*)
    3076     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
     3218    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
    30773219    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
    30783220    ;;
    30793221  *)
    3080     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
     3222    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
    30813223    lt_cv_file_magic_test_file=/usr/lib/libc.sl
    30823224    ;;
     
    31043246  ;;
    31053247
    3106 netbsd* | netbsdelf*-gnu)
     3248netbsd*)
    31073249  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
    31083250    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
     
    31783320esac
    31793321])
     3322
     3323file_magic_glob=
     3324want_nocaseglob=no
     3325if test "$build" = "$host"; then
     3326  case $host_os in
     3327  mingw* | pw32*)
     3328    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
     3329      want_nocaseglob=yes
     3330    else
     3331      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
     3332    fi
     3333    ;;
     3334  esac
     3335fi
     3336
    31803337file_magic_cmd=$lt_cv_file_magic_cmd
    31813338deplibs_check_method=$lt_cv_deplibs_check_method
     
    31853342    [Method to check whether dependent libraries are shared objects])
    31863343_LT_DECL([], [file_magic_cmd], [1],
    3187     [Command to use when deplibs_check_method == "file_magic"])
     3344    [Command to use when deplibs_check_method = "file_magic"])
     3345_LT_DECL([], [file_magic_glob], [1],
     3346    [How to find potential files when deplibs_check_method = "file_magic"])
     3347_LT_DECL([], [want_nocaseglob], [1],
     3348    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
    31883349])# _LT_CHECK_MAGIC_METHOD
    31893350
     
    32423403else
    32433404  # Didn't find any BSD compatible name lister, look for dumpbin.
    3244   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
     3405  if test -n "$DUMPBIN"; then :
     3406    # Let the user override the test.
     3407  else
     3408    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
     3409    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
     3410    *COFF*)
     3411      DUMPBIN="$DUMPBIN -symbols"
     3412      ;;
     3413    *)
     3414      DUMPBIN=:
     3415      ;;
     3416    esac
     3417  fi
    32453418  AC_SUBST([DUMPBIN])
    32463419  if test "$DUMPBIN" != ":"; then
     
    32553428  [lt_cv_nm_interface="BSD nm"
    32563429  echo "int some_variable = 0;" > conftest.$ac_ext
    3257   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
     3430  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
    32583431  (eval "$ac_compile" 2>conftest.err)
    32593432  cat conftest.err >&AS_MESSAGE_LOG_FD
    3260   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
     3433  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
    32613434  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    32623435  cat conftest.err >&AS_MESSAGE_LOG_FD
    3263   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
     3436  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
    32643437  cat conftest.out >&AS_MESSAGE_LOG_FD
    32653438  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     
    32753448dnl AC_DEFUN([AM_PROG_NM], [])
    32763449dnl AC_DEFUN([AC_PROG_NM], [])
     3450
     3451# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
     3452# --------------------------------
     3453# how to determine the name of the shared library
     3454# associated with a specific link library.
     3455#  -- PORTME fill in with the dynamic library characteristics
     3456m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
     3457[m4_require([_LT_DECL_EGREP])
     3458m4_require([_LT_DECL_OBJDUMP])
     3459m4_require([_LT_DECL_DLLTOOL])
     3460AC_CACHE_CHECK([how to associate runtime and link libraries],
     3461lt_cv_sharedlib_from_linklib_cmd,
     3462[lt_cv_sharedlib_from_linklib_cmd='unknown'
     3463
     3464case $host_os in
     3465cygwin* | mingw* | pw32* | cegcc*)
     3466  # two different shell functions defined in ltmain.sh
     3467  # decide which to use based on capabilities of $DLLTOOL
     3468  case `$DLLTOOL --help 2>&1` in
     3469  *--identify-strict*)
     3470    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
     3471    ;;
     3472  *)
     3473    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
     3474    ;;
     3475  esac
     3476  ;;
     3477*)
     3478  # fallback: assume linklib IS sharedlib
     3479  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
     3480  ;;
     3481esac
     3482])
     3483sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
     3484test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
     3485
     3486_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
     3487    [Command to associate shared and link libraries])
     3488])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
     3489
     3490
     3491# _LT_PATH_MANIFEST_TOOL
     3492# ----------------------
     3493# locate the manifest tool
     3494m4_defun([_LT_PATH_MANIFEST_TOOL],
     3495[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
     3496test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
     3497AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
     3498  [lt_cv_path_mainfest_tool=no
     3499  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
     3500  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
     3501  cat conftest.err >&AS_MESSAGE_LOG_FD
     3502  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
     3503    lt_cv_path_mainfest_tool=yes
     3504  fi
     3505  rm -f conftest*])
     3506if test "x$lt_cv_path_mainfest_tool" != xyes; then
     3507  MANIFEST_TOOL=:
     3508fi
     3509_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
     3510])# _LT_PATH_MANIFEST_TOOL
    32773511
    32783512
     
    32843518LIBM=
    32853519case $host in
    3286 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
     3520*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
    32873521  # These system don't have libm, or don't need it
    32883522  ;;
     
    33123546
    33133547if test "$GCC" = yes; then
    3314   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
     3548  case $cc_basename in
     3549  nvcc*)
     3550    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
     3551  *)
     3552    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
     3553  esac
    33153554
    33163555  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     
    33293568[AC_REQUIRE([AC_CANONICAL_HOST])dnl
    33303569AC_REQUIRE([AC_PROG_CC])dnl
     3570AC_REQUIRE([AC_PROG_AWK])dnl
    33313571AC_REQUIRE([LT_PATH_NM])dnl
    33323572AC_REQUIRE([LT_PATH_LD])dnl
     
    33963636
    33973637# Transform an extracted symbol line into symbol name and symbol address
    3398 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
    3399 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
     3638lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
     3639lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
    34003640
    34013641# Handle CRLF in mingw tool chain
     
    34333673    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    34343674  fi
     3675  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
    34353676
    34363677  # Check to see that the pipe works correctly.
     
    34543695    # Now try to grab the symbols.
    34553696    nlist=conftest.nm
    3456     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
     3697    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
    34573698      # Try sorting and uniquifying the output.
    34583699      if sort "$nlist" | uniq > "$nlist"T; then
     
    34663707        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
    34673708          cat <<_LT_EOF > conftest.$ac_ext
     3709/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
     3710#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
     3711/* DATA imports from DLLs on WIN32 con't be const, because runtime
     3712   relocations are performed -- see ld's documentation on pseudo-relocs.  */
     3713# define LT@&t@_DLSYM_CONST
     3714#elif defined(__osf__)
     3715/* This system does not cope well with relocations in const data.  */
     3716# define LT@&t@_DLSYM_CONST
     3717#else
     3718# define LT@&t@_DLSYM_CONST const
     3719#endif
     3720
    34683721#ifdef __cplusplus
    34693722extern "C" {
     
    34773730
    34783731/* The mapping between symbol names and symbols.  */
    3479 const struct {
     3732LT@&t@_DLSYM_CONST struct {
    34803733  const char *name;
    34813734  void       *address;
     
    35033756          # Now try linking the two files.
    35043757          mv conftest.$ac_objext conftstm.$ac_objext
    3505           lt_save_LIBS="$LIBS"
    3506           lt_save_CFLAGS="$CFLAGS"
     3758          lt_globsym_save_LIBS=$LIBS
     3759          lt_globsym_save_CFLAGS=$CFLAGS
    35073760          LIBS="conftstm.$ac_objext"
    35083761          CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
     
    35103763            pipe_works=yes
    35113764          fi
    3512           LIBS="$lt_save_LIBS"
    3513           CFLAGS="$lt_save_CFLAGS"
     3765          LIBS=$lt_globsym_save_LIBS
     3766          CFLAGS=$lt_globsym_save_CFLAGS
    35143767        else
    35153768          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
     
    35443797fi
    35453798
     3799# Response file support.
     3800if test "$lt_cv_nm_interface" = "MS dumpbin"; then
     3801  nm_file_list_spec='@'
     3802elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
     3803  nm_file_list_spec='@'
     3804fi
     3805
    35463806_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
    35473807    [Take the output of nm and produce a listing of raw symbols and C names])
     
    35543814    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
    35553815    [Transform the output of nm in a C name address pair when lib prefix is needed])
     3816_LT_DECL([], [nm_file_list_spec], [1],
     3817    [Specify filename containing input files for $NM])
    35563818]) # _LT_CMD_GLOBAL_SYMBOLS
    35573819
     
    35653827_LT_TAGVAR(lt_prog_compiler_static, $1)=
    35663828
    3567 AC_MSG_CHECKING([for $compiler option to produce PIC])
    35683829m4_if([$1], [CXX], [
    35693830  # C++ specific cases for pic, static, wl, etc.
     
    36153876      # DJGPP does not support shared libraries at all
    36163877      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
     3878      ;;
     3879    haiku*)
     3880      # PIC is the default for Haiku.
     3881      # The "-static" flag exists, but is broken.
     3882      _LT_TAGVAR(lt_prog_compiler_static, $1)=
    36173883      ;;
    36183884    interix[[3-9]]*)
     
    36643930          ;;
    36653931        esac
     3932        ;;
     3933      mingw* | cygwin* | os2* | pw32* | cegcc*)
     3934        # This hack is so that the source file can tell whether it is being
     3935        # built for inclusion in a dll (and should export symbols for example).
     3936        m4_if([$1], [GCJ], [],
     3937          [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
    36663938        ;;
    36673939      dgux*)
     
    37544026            _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    37554027            ;;
    3756           xlc* | xlC*)
    3757             # IBM XL 8.0 on PPC
     4028          xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
     4029            # IBM XL 8.0, 9.0 on PPC and BlueGene
    37584030            _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    37594031            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
     
    37854057        esac
    37864058        ;;
    3787       netbsd* | netbsdelf*-gnu)
     4059      netbsd*)
    37884060        ;;
    37894061      *qnx* | *nto*)
     
    38174089      solaris*)
    38184090        case $cc_basename in
    3819           CC*)
     4091          CC* | sunCC*)
    38204092            # Sun C++ 4.2, 5.x and Centerline C++
    38214093            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
     
    39214193      ;;
    39224194
     4195    haiku*)
     4196      # PIC is the default for Haiku.
     4197      # The "-static" flag exists, but is broken.
     4198      _LT_TAGVAR(lt_prog_compiler_static, $1)=
     4199      ;;
     4200
    39234201    hpux*)
    39244202      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
     
    39614239    *)
    39624240      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
     4241      ;;
     4242    esac
     4243
     4244    case $cc_basename in
     4245    nvcc*) # Cuda Compiler Driver 2.2
     4246      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
     4247      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
    39634248      ;;
    39644249    esac
     
    40264311        _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
    40274312        ;;
    4028       pgcc* | pgf77* | pgf90* | pgf95*)
     4313      nagfor*)
     4314        # NAG Fortran compiler
     4315        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
     4316        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
     4317        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
     4318        ;;
     4319      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
    40294320        # Portland Group compilers (*not* the Pentium gcc compiler,
    40304321        # which looks to be a dead project)
     
    40384329        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
    40394330        ;;
    4040       xl*)
    4041         # IBM XL C 8.0/Fortran 10.1 on PPC
     4331      xl* | bgxl* | bgf* | mpixl*)
     4332        # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
    40424333        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    40434334        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
     
    40464337      *)
    40474338        case `$CC -V 2>&1 | sed 5q` in
     4339        *Sun\ F* | *Sun*Fortran*)
     4340          # Sun Fortran 8.3 passes all unrecognized flags to the linker
     4341          _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
     4342          _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
     4343          _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
     4344          ;;
    40484345        *Sun\ C*)
    40494346          # Sun C 5.9
     
    40524349          _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
    40534350          ;;
    4054         *Sun\ F*)
    4055           # Sun Fortran 8.3 passes all unrecognized flags to the linker
    4056           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
    4057           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    4058           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
    4059           ;;
    40604351        esac
    40614352        ;;
     
    40884379      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
    40894380      case $cc_basename in
    4090       f77* | f90* | f95*)
     4381      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
    40914382        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
    40924383      *)
     
    41454436    ;;
    41464437esac
    4147 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
    4148 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
    4149         [How to pass a linker flag through the compiler])
     4438
     4439AC_CACHE_CHECK([for $compiler option to produce PIC],
     4440  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
     4441  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
     4442_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
    41504443
    41514444#
     
    41664459        [Additional compiler flags for building library objects])
    41674460
     4461_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
     4462        [How to pass a linker flag through the compiler])
    41684463#
    41694464# Check to make sure the static flag actually works.
     
    41864481[AC_REQUIRE([LT_PATH_LD])dnl
    41874482AC_REQUIRE([LT_PATH_NM])dnl
     4483m4_require([_LT_PATH_MANIFEST_TOOL])dnl
    41884484m4_require([_LT_FILEUTILS_DEFAULTS])dnl
    41894485m4_require([_LT_DECL_EGREP])dnl
     
    41944490m4_if([$1], [CXX], [
    41954491  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
     4492  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
    41964493  case $host_os in
    41974494  aix[[4-9]]*)
    41984495    # If we're using GNU nm, then we don't want the "-C" option.
    41994496    # -C means demangle to AIX nm, but means don't demangle with GNU nm
     4497    # Also, AIX nm treats weak defined symbols like other global defined
     4498    # symbols, whereas GNU nm marks them as "W".
    42004499    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
    4201       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     4500      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
    42024501    else
    42034502      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     
    42064505  pw32*)
    42074506    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
    4208   ;;
     4507    ;;
    42094508  cygwin* | mingw* | cegcc*)
    4210     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
    4211   ;;
    4212   linux* | k*bsd*-gnu)
    4213     _LT_TAGVAR(link_all_deplibs, $1)=no
    4214   ;;
     4509    case $cc_basename in
     4510    cl*) ;;
     4511    *)
     4512      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
     4513      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
     4514      ;;
     4515    esac
     4516    ;;
    42154517  *)
    42164518    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    4217   ;;
     4519    ;;
    42184520  esac
    4219   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
    42204521], [
    42214522  runpath_var=
     
    42774578    with_gnu_ld=no
    42784579    ;;
    4279   linux* | k*bsd*-gnu)
    4280     _LT_TAGVAR(link_all_deplibs, $1)=no
    4281     ;;
    42824580  esac
    42834581
    42844582  _LT_TAGVAR(ld_shlibs, $1)=yes
     4583
     4584  # On some targets, GNU ld is compatible enough with the native linker
     4585  # that we're better off using the native interface for both.
     4586  lt_use_gnu_ld_interface=no
    42854587  if test "$with_gnu_ld" = yes; then
     4588    case $host_os in
     4589      aix*)
     4590        # The AIX port of GNU ld has always aspired to compatibility
     4591        # with the native linker.  However, as the warning in the GNU ld
     4592        # block says, versions before 2.19.5* couldn't really create working
     4593        # shared libraries, regardless of the interface used.
     4594        case `$LD -v 2>&1` in
     4595          *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
     4596          *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
     4597          *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
     4598          *)
     4599            lt_use_gnu_ld_interface=yes
     4600            ;;
     4601        esac
     4602        ;;
     4603      *)
     4604        lt_use_gnu_ld_interface=yes
     4605        ;;
     4606    esac
     4607  fi
     4608
     4609  if test "$lt_use_gnu_ld_interface" = yes; then
    42864610    # If archive_cmds runs LD, not CC, wlarc should be empty
    42874611    wlarc='${wl}'
     
    43174641        cat <<_LT_EOF 1>&2
    43184642
    4319 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
     4643*** Warning: the GNU linker, at least up to release 2.19, is reported
    43204644*** to be unable to reliably create shared libraries on AIX.
    43214645*** Therefore, libtool is disabling shared libraries support.  If you
    4322 *** really care for shared libraries, you may want to modify your PATH
    4323 *** so that a non-GNU linker is found, and then restart.
     4646*** really care for shared libraries, you may want to install binutils
     4647*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
     4648*** You will then need to restart the configuration process.
    43244649
    43254650_LT_EOF
     
    43574682      # as there is no search path for DLLs.
    43584683      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
     4684      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
    43594685      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
    43604686      _LT_TAGVAR(always_export_symbols, $1)=no
    43614687      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
    4362       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
     4688      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
     4689      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
    43634690
    43644691      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
     
    43784705      ;;
    43794706
     4707    haiku*)
     4708      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
     4709      _LT_TAGVAR(link_all_deplibs, $1)=yes
     4710      ;;
     4711
    43804712    interix[[3-9]]*)
    43814713      _LT_TAGVAR(hardcode_direct, $1)=no
     
    44034735         && test "$tmp_diet" = no
    44044736      then
    4405         tmp_addflag=
     4737        tmp_addflag=' $pic_flag'
    44064738        tmp_sharedflag='-shared'
    44074739        case $cc_basename,$host_cpu in
    44084740        pgcc*)                          # Portland Group C compiler
    4409           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
     4741          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
    44104742          tmp_addflag=' $pic_flag'
    44114743          ;;
    4412         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
    4413           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
     4744        pgf77* | pgf90* | pgf95* | pgfortran*)
     4745                                        # Portland Group f77 and f90 compilers
     4746          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
    44144747          tmp_addflag=' $pic_flag -Mnomain' ;;
    44154748        ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
     
    44224755          _LT_TAGVAR(whole_archive_flag_spec, $1)=
    44234756          tmp_sharedflag='--shared' ;;
    4424         xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
     4757        xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
    44254758          tmp_sharedflag='-qmkshrobj'
    44264759          tmp_addflag= ;;
     4760        nvcc*)  # Cuda Compiler Driver 2.2
     4761          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
     4762          _LT_TAGVAR(compiler_needs_object, $1)=yes
     4763          ;;
    44274764        esac
    44284765        case `$CC -V 2>&1 | sed 5q` in
    44294766        *Sun\ C*)                       # Sun C 5.9
    4430           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
     4767          _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
    44314768          _LT_TAGVAR(compiler_needs_object, $1)=yes
    44324769          tmp_sharedflag='-G' ;;
     
    44444781
    44454782        case $cc_basename in
    4446         xlf*)
     4783        xlf* | bgf* | bgxlf* | mpixlf*)
    44474784          # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
    44484785          _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
    44494786          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
    44504787          _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
    4451           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
     4788          _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
    44524789          if test "x$supports_anon_versioning" = xyes; then
    44534790            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
    44544791              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
    44554792              echo "local: *; };" >> $output_objdir/$libname.ver~
    4456               $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
     4793              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
    44574794          fi
    44584795          ;;
     
    44634800      ;;
    44644801
    4465     netbsd* | netbsdelf*-gnu)
     4802    netbsd*)
    44664803      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
    44674804        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
    44684805        wlarc=
    44694806      else
    4470         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    4471         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     4807        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
     4808        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
    44724809      fi
    44734810      ;;
     
    44874824_LT_EOF
    44884825      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
    4489         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    4490         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     4826        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
     4827        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
    44914828      else
    44924829        _LT_TAGVAR(ld_shlibs, $1)=no
     
    45344871    *)
    45354872      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
    4536         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    4537         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     4873        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
     4874        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
    45384875      else
    45394876        _LT_TAGVAR(ld_shlibs, $1)=no
     
    45754912        # If we're using GNU nm, then we don't want the "-C" option.
    45764913        # -C means demangle to AIX nm, but means don't demangle with GNU nm
     4914        # Also, AIX nm treats weak defined symbols like other global
     4915        # defined symbols, whereas GNU nm marks them as "W".
    45774916        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
    4578           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     4917          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
    45794918        else
    45804919          _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     
    46384977          shared_flag="$shared_flag "'${wl}-G'
    46394978        fi
    4640         _LT_TAGVAR(link_all_deplibs, $1)=no
    46414979      else
    46424980        # not using gcc
     
    46645002        # Determine the default libpath from the value encoded in an
    46655003        # empty executable.
    4666         _LT_SYS_MODULE_PATH_AIX
     5004        _LT_SYS_MODULE_PATH_AIX([$1])
    46675005        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    4668         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
     5006        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    46695007      else
    46705008        if test "$host_cpu" = ia64; then
     
    46755013         # Determine the default libpath from the value encoded in an
    46765014         # empty executable.
    4677          _LT_SYS_MODULE_PATH_AIX
     5015         _LT_SYS_MODULE_PATH_AIX([$1])
    46785016         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    46795017          # Warning - without using the other run time loading flags,
     
    46815019          _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    46825020          _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    4683           # Exported symbols can be pulled into shared objects from archives
    4684           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
     5021          if test "$with_gnu_ld" = yes; then
     5022            # We only use this code for GNU lds that support --whole-archive.
     5023            _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
     5024          else
     5025            # Exported symbols can be pulled into shared objects from archives
     5026            _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
     5027          fi
    46855028          _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
    46865029          # This is similar to how AIX traditionally builds its shared libraries.
     
    47145057      # hardcode_libdir_flag_spec is actually meaningless, as there is
    47155058      # no search path for DLLs.
    4716       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
    4717       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
    4718       # Tell ltmain to make .lib files, not .a files.
    4719       libext=lib
    4720       # Tell ltmain to make .dll files, not .so files.
    4721       shrext_cmds=".dll"
    4722       # FIXME: Setting linknames here is a bad hack.
    4723       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
    4724       # The linker will automatically build a .lib file if we build a DLL.
    4725       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
    4726       # FIXME: Should let the user specify the lib program.
    4727       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
    4728       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
    4729       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
     5059      case $cc_basename in
     5060      cl*)
     5061        # Native MSVC
     5062        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
     5063        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
     5064        _LT_TAGVAR(always_export_symbols, $1)=yes
     5065        _LT_TAGVAR(file_list_spec, $1)='@'
     5066        # Tell ltmain to make .lib files, not .a files.
     5067        libext=lib
     5068        # Tell ltmain to make .dll files, not .so files.
     5069        shrext_cmds=".dll"
     5070        # FIXME: Setting linknames here is a bad hack.
     5071        _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
     5072        _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
     5073            sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
     5074          else
     5075            sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
     5076          fi~
     5077          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
     5078          linknames='
     5079        # The linker will not automatically build a static lib if we build a DLL.
     5080        # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
     5081        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
     5082        _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
     5083        # Don't use ranlib
     5084        _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
     5085        _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
     5086          lt_tool_outputfile="@TOOL_OUTPUT@"~
     5087          case $lt_outputfile in
     5088            *.exe|*.EXE) ;;
     5089            *)
     5090              lt_outputfile="$lt_outputfile.exe"
     5091              lt_tool_outputfile="$lt_tool_outputfile.exe"
     5092              ;;
     5093          esac~
     5094          if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
     5095            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
     5096            $RM "$lt_outputfile.manifest";
     5097          fi'
     5098        ;;
     5099      *)
     5100        # Assume MSVC wrapper
     5101        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
     5102        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
     5103        # Tell ltmain to make .lib files, not .a files.
     5104        libext=lib
     5105        # Tell ltmain to make .dll files, not .so files.
     5106        shrext_cmds=".dll"
     5107        # FIXME: Setting linknames here is a bad hack.
     5108        _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
     5109        # The linker will automatically build a .lib file if we build a DLL.
     5110        _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
     5111        # FIXME: Should let the user specify the lib program.
     5112        _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
     5113        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
     5114        ;;
     5115      esac
    47305116      ;;
    47315117
     
    47655151    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
    47665152    freebsd* | dragonfly*)
    4767       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
     5153      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
    47685154      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
    47695155      _LT_TAGVAR(hardcode_direct, $1)=yes
     
    47735159    hpux9*)
    47745160      if test "$GCC" = yes; then
    4775         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
     5161        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
    47765162      else
    47775163        _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
     
    47885174
    47895175    hpux10*)
    4790       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
    4791         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
     5176      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
     5177        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
    47925178      else
    47935179        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
     
    48075193
    48085194    hpux11*)
    4809       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
     5195      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
    48105196        case $host_cpu in
    48115197        hppa*64*)
     
    48135199          ;;
    48145200        ia64*)
    4815           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
     5201          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
    48165202          ;;
    48175203        *)
    4818           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
     5204          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
    48195205          ;;
    48205206        esac
     
    48285214          ;;
    48295215        *)
    4830           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
     5216        m4_if($1, [], [
     5217          # Older versions of the 11.00 compiler do not understand -b yet
     5218          # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
     5219          _LT_LINKER_OPTION([if $CC understands -b],
     5220            _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
     5221            [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
     5222            [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
     5223          [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
    48315224          ;;
    48325225        esac
     
    48565249    irix5* | irix6* | nonstopux*)
    48575250      if test "$GCC" = yes; then
    4858         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
     5251        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    48595252        # Try to use the -exported_symbol ld option, if it does not
    48605253        # work, assume that -exports_file does not work either and
    48615254        # implicitly export all symbols.
    4862         save_LDFLAGS="$LDFLAGS"
    4863         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
    4864         AC_LINK_IFELSE(int foo(void) {},
    4865           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
    4866         )
    4867         LDFLAGS="$save_LDFLAGS"
     5255        # This should be the same for all languages, so no per-tag cache variable.
     5256        AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
     5257          [lt_cv_irix_exported_symbol],
     5258          [save_LDFLAGS="$LDFLAGS"
     5259           LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
     5260           AC_LINK_IFELSE(
     5261             [AC_LANG_SOURCE(
     5262                [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
     5263                              [C++], [[int foo (void) { return 0; }]],
     5264                              [Fortran 77], [[
     5265      subroutine foo
     5266      end]],
     5267                              [Fortran], [[
     5268      subroutine foo
     5269      end]])])],
     5270              [lt_cv_irix_exported_symbol=yes],
     5271              [lt_cv_irix_exported_symbol=no])
     5272           LDFLAGS="$save_LDFLAGS"])
     5273        if test "$lt_cv_irix_exported_symbol" = yes; then
     5274          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
     5275        fi
    48685276      else
    4869         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
    4870         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
     5277        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
     5278        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
    48715279      fi
    48725280      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
     
    48775285      ;;
    48785286
    4879     netbsd* | netbsdelf*-gnu)
     5287    netbsd*)
    48805288      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
    48815289        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
     
    49305338      _LT_TAGVAR(hardcode_minus_L, $1)=yes
    49315339      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
    4932       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
     5340      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
    49335341      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
    49345342      ;;
     
    49375345      if test "$GCC" = yes; then
    49385346        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    4939         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
     5347        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    49405348      else
    49415349        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    4942         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
     5350        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
    49435351      fi
    49445352      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
     
    49505358      if test "$GCC" = yes; then
    49515359        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
    4952         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
     5360        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
    49535361        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
    49545362      else
    49555363        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
    4956         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
     5364        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
    49575365        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
    4958         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
     5366        $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
    49595367
    49605368        # Both c and cxx compiler support -rpath directly
     
    49695377      if test "$GCC" = yes; then
    49705378        wlarc='${wl}'
    4971         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
     5379        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
    49725380        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
    4973           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
     5381          $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
    49745382      else
    49755383        case `$CC -V 2>&1` in
     
    51475555      # systems, -lgcc has to come before -lc. If gcc already passes -lc
    51485556      # to ld, don't add -lc before -lgcc.
    5149       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
    5150       $RM conftest*
    5151       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
    5152 
    5153       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
    5154         soname=conftest
    5155         lib=conftest
    5156         libobjs=conftest.$ac_objext
    5157         deplibs=
    5158         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
    5159         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
    5160         compiler_flags=-v
    5161         linker_flags=-v
    5162         verstring=
    5163         output_objdir=.
    5164         libname=conftest
    5165         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
    5166         _LT_TAGVAR(allow_undefined_flag, $1)=
    5167         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
    5168         then
    5169           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
    5170         else
    5171           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
    5172         fi
    5173         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
    5174       else
    5175         cat conftest.err 1>&5
    5176       fi
    5177       $RM conftest*
    5178       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
     5557      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
     5558        [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
     5559        [$RM conftest*
     5560        echo "$lt_simple_compile_test_code" > conftest.$ac_ext
     5561
     5562        if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
     5563          soname=conftest
     5564          lib=conftest
     5565          libobjs=conftest.$ac_objext
     5566          deplibs=
     5567          wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
     5568          pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
     5569          compiler_flags=-v
     5570          linker_flags=-v
     5571          verstring=
     5572          output_objdir=.
     5573          libname=conftest
     5574          lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
     5575          _LT_TAGVAR(allow_undefined_flag, $1)=
     5576          if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
     5577          then
     5578            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
     5579          else
     5580            lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
     5581          fi
     5582          _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
     5583        else
     5584          cat conftest.err 1>&5
     5585        fi
     5586        $RM conftest*
     5587        ])
     5588      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
    51795589      ;;
    51805590    esac
     
    52415651_LT_TAGDECL([], [link_all_deplibs], [0],
    52425652    [Whether libtool must link a program against all its dependency libraries])
    5243 _LT_TAGDECL([], [fix_srcfile_path], [1],
    5244     [Fix the shell variable $srcfile for the compiler])
    52455653_LT_TAGDECL([], [always_export_symbols], [0],
    52465654    [Set to "yes" if exported symbols are required])
     
    52535661_LT_TAGDECL([], [prelink_cmds], [2],
    52545662    [Commands necessary for linking programs (against libraries) with templates])
     5663_LT_TAGDECL([], [postlink_cmds], [2],
     5664    [Commands necessary for finishing linking programs])
    52555665_LT_TAGDECL([], [file_list_spec], [1],
    52565666    [Specify filename containing input files])
     
    53425752
    53435753
    5344 # _LT_PROG_CXX
    5345 # ------------
    5346 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
    5347 # compiler, we have our own version here.
    5348 m4_defun([_LT_PROG_CXX],
    5349 [
    5350 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
    5351 AC_PROG_CXX
     5754# _LT_LANG_CXX_CONFIG([TAG])
     5755# --------------------------
     5756# Ensure that the configuration variables for a C++ compiler are suitably
     5757# defined.  These variables are subsequently used by _LT_CONFIG to write
     5758# the compiler configuration to `libtool'.
     5759m4_defun([_LT_LANG_CXX_CONFIG],
     5760[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
     5761m4_require([_LT_DECL_EGREP])dnl
     5762m4_require([_LT_PATH_MANIFEST_TOOL])dnl
    53525763if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
    53535764    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
     
    53575768  _lt_caught_CXX_error=yes
    53585769fi
    5359 popdef([AC_MSG_ERROR])
    5360 ])# _LT_PROG_CXX
    5361 
    5362 dnl aclocal-1.4 backwards compatibility:
    5363 dnl AC_DEFUN([_LT_PROG_CXX], [])
    5364 
    5365 
    5366 # _LT_LANG_CXX_CONFIG([TAG])
    5367 # --------------------------
    5368 # Ensure that the configuration variables for a C++ compiler are suitably
    5369 # defined.  These variables are subsequently used by _LT_CONFIG to write
    5370 # the compiler configuration to `libtool'.
    5371 m4_defun([_LT_LANG_CXX_CONFIG],
    5372 [AC_REQUIRE([_LT_PROG_CXX])dnl
    5373 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
    5374 m4_require([_LT_DECL_EGREP])dnl
    53755770
    53765771AC_LANG_PUSH(C++)
     
    53945789_LT_TAGVAR(link_all_deplibs, $1)=unknown
    53955790_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
     5791_LT_TAGVAR(reload_flag, $1)=$reload_flag
     5792_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
    53965793_LT_TAGVAR(no_undefined_flag, $1)=
    53975794_LT_TAGVAR(whole_archive_flag_spec, $1)=
     
    54255822  # Allow CC to be a program name with arguments.
    54265823  lt_save_CC=$CC
     5824  lt_save_CFLAGS=$CFLAGS
    54275825  lt_save_LD=$LD
    54285826  lt_save_GCC=$GCC
     
    54425840  test -z "${LDCXX+set}" || LD=$LDCXX
    54435841  CC=${CXX-"c++"}
     5842  CFLAGS=$CXXFLAGS
    54445843  compiler=$CC
    54455844  _LT_TAGVAR(compiler, $1)=$CC
     
    54635862      # archiving commands below assume that GNU ld is being used.
    54645863      if test "$with_gnu_ld" = yes; then
    5465         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    5466         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     5864        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
     5865        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
    54675866
    54685867        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
     
    54965895      # what "hidden" libraries, object files and flags are used when
    54975896      # linking a shared library.
    5498       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
     5897      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
    54995898
    55005899    else
     
    56056004          # Determine the default libpath from the value encoded in an empty
    56066005          # executable.
    5607           _LT_SYS_MODULE_PATH_AIX
     6006          _LT_SYS_MODULE_PATH_AIX([$1])
    56086007          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    56096008
    5610           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
     6009          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
    56116010        else
    56126011          if test "$host_cpu" = ia64; then
     
    56176016            # Determine the default libpath from the value encoded in an
    56186017            # empty executable.
    5619             _LT_SYS_MODULE_PATH_AIX
     6018            _LT_SYS_MODULE_PATH_AIX([$1])
    56206019            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
    56216020            # Warning - without using the other run time loading flags,
     
    56236022            _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
    56246023            _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
    5625             # Exported symbols can be pulled into shared objects from archives
    5626             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
     6024            if test "$with_gnu_ld" = yes; then
     6025              # We only use this code for GNU lds that support --whole-archive.
     6026              _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
     6027            else
     6028              # Exported symbols can be pulled into shared objects from archives
     6029              _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
     6030            fi
    56276031            _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
    56286032            # This is similar to how AIX traditionally builds its shared
     
    56546058
    56556059      cygwin* | mingw* | pw32* | cegcc*)
    5656         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
    5657         # as there is no search path for DLLs.
    5658         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'