Project

General

Profile

Revision 7f251033

ID7f251033905d8a2a88d80215cd693003b5e92bc6

Added by Georg Kunz over 9 years ago

Initial import of Horizon-4 release.

View differences:

HORIZONvsOMNeT
1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2
PLEASE NOTE: THIS SOFTWARE PACKAGE INCLUDES HORIZON - NOT OMNET++ 
3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4

  
5
See README for more information.
INSTALL
1
INSTALLATION INSTRUCTIONS
2
~~~~~~~~~~~~~~~~~~~~~~~~~
3

  
4
Dependencies
5
~~~~~~~~~~~~
6

  
7
In addition to the dependecies imposed by OMNeT++, Horizon requires the following
8
libraries/features to be installed:
9

  
10
 - libatomic-ops-dev
11
 - pthread
12

  
13

  
14
Build options
15
~~~~~~~~~~~~~
16

  
17
These are Horizon specific build options that can be set in configure.user
18

  
19
 - NOBARRIER:
20
    Enable or disable the use of barrier messages.
21
     yes -> no NOT use barrier messages (default)
22
     no  -> use barrier messages
23

  
24
 - CACHE_LINE_SIZE:
25
    In combination with NOBARRIER: Define the cache line size used for aligning
26
    synchronization data structures to cache line borders.
27
     0: Disable alignment.
28
    Check /sys/devices/system/cpu/cpu0/cache/index*/coherency_line_size to determine
29
    the cache line size of your system. Typically, this value is 64 or 128.
30
    Defaults to the value read from the pseudo file stated above.
31

  
32
 - ENABLE_OWNERSHIP:
33
    Enable or disable ownership management. Do NOT use ownership management in
34
    conjunction with parallel execution. Defaults to "no".
35
    
36
 - ATOMIC_OPS_DEBUG
37

  
38

  
39
Building Horizon - Quick Guide
40
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41

  
42
From the command prompt run
43

  
44
  $ . setenv
45
  $ ./configure
46
  $ make
47
  
LIMITATIONS
1
 Limitations
2
 ===========
3
 
4
 Horizon imposes the following limitations on the programming model and/or the
5
 API of OMNeT++:
6
 
7
 * Ownership model disabled
8
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
9
   In Horizon the ownership model is partly disabled by default. Specifically,
10
   this means that child modules know their parents (via the owner pointer), but
11
   parent modules do not know about their child modules anymore. This is a
12
   compromise to avoid locking of the child module list of each module.
13
   
14
   As a result, methods like findSubmodule do not work anymore.
15
   
16
   To support debugging during sequential execution, the ownership management
17
   can be enabled using the ENABLE_OWNERSHIP compile time flag in the configure.user
18
   file.  
19

  
20

  
21
 * No dynamic modules, gates, connections
22
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
   Support for the dynamic creation of modules, gates and connections is not
24
   yet implemented. 
Makefile
1
#
2
# Toplevel makefile for OMNeT++ libraries and programs
3
#
4
#=====================================================================
5

  
6
#=====================================================================
7
#
8
# Main targets
9
#
10
#=====================================================================
11

  
12
ifeq ("$(MODE)","")
13
all: allmodes
14
else
15
all: components
16
endif
17

  
18
allmodes:
19
	$(MAKE) MODE=release
20
	$(MAKE) MODE=debug
21

  
22
components: base
23

  
24
#=====================================================================
25
#
26
# Includes and basic checks
27
#
28
#=====================================================================
29

  
30
include Makefile.inc
31

  
32
# Make sure that output locations are set
33
ifeq ("$(strip $(OMNETPP_BIN_DIR))","")
34
$(error OMNETPP_BIN_DIR must be correctly set)
35
endif
36
ifeq ("$(strip $(OMNETPP_OUT_DIR))","")
37
$(error OMNETPP_OUT_DIR must be correctly set)
38
endif
39
ifeq ("$(strip $(OMNETPP_LIB_DIR))","")
40
$(error OMNETPP_LIB_DIR must be correctly set)
41
endif
42
#=====================================================================
43
#
44
# OMNeT++ components
45
#
46
#=====================================================================
47

  
48
BASE=common layout eventlog scave nedxml sim envir cmdenv tkenv utils
49

  
50
SAMPLES=
51
JNILIBS=org.omnetpp.ned.model org.omnetpp.ide.nativelibs
52

  
53
#
54
# Group targets.
55
#
56
base: $(BASE)
57
	cd $(OMNETPP_SRC_DIR)/envir && $(MAKE) opp_run_executable
58

  
59
ui: check-ui-vars common layout eventlog scave nedxml $(JNILIBS)
60

  
61
# dependencies (because of ver.h, opp_msgc, etc)
62
clean depend: makefiles
63
common layout eventlog scave nedxml sim envir cmdenv tkenv makefiles: utils
64
layout eventlog scave nedxml sim envir cmdenv tkenv : common
65
envir : sim
66
cmdenv tkenv : envir
67
tkenv : layout
68
sim : nedxml common
69
$(BASE) : check-env
70
queueinglibext : queueinglib
71

  
72
.PHONY: check-env cleanall depend makefiles clean apis docu tests all allmodes \
73
        components base ui common layout eventlog scave nedxml sim \
74
        envir cmdenv tkenv utils
75

  
76
#
77
# Core libraries and programs
78
#
79
$(BASE):
80
	@echo ===== Compiling $@ ====
81
	cd $(OMNETPP_SRC_DIR)/$@ && $(MAKE)
82

  
83
#
84
# Native libs for the UI
85
#
86
$(JNILIBS): nedxml
87
	@echo ===== Compiling $@ ====
88
	cd $(OMNETPP_UI_DIR)/$@ && $(MAKE) clean
89
	cd $(OMNETPP_UI_DIR)/$@ && $(MAKE)
90

  
91

  
92
#
93
# Documentation
94
#
95
apis:
96
	cd $(OMNETPP_DOC_DIR)/src && $(MAKE) apis
97

  
98
docu:
99
	cd $(OMNETPP_DOC_DIR)/src && $(MAKE)
100

  
101
#
102
# Test
103
#
104
tests: base
105
	cd $(OMNETPP_TEST_DIR) && $(MAKE)
106

  
107
#=====================================================================
108
#
109
# Utilities
110
#
111
#=====================================================================
112

  
113
check-ui-vars:
114
	@if [ "$(BUILDING_UILIBS)" != "yes" ]; then echo 'ERROR: "make ui" must be invoked with BUILDING_UILIBS=yes!' && exit 1; fi
115

  
116
check-env:
117
	@echo "***** Configuration: MODE=$(MODE), TOOLCHAIN_NAME=$(TOOLCHAIN_NAME), LIB_SUFFIX=$(LIB_SUFFIX) ****"
118
	@echo ===== Checking environment =====
119
	mkdir -p $(OMNETPP_BIN_DIR)
120
	@probefile=__probe__; \
121
	if (echo '#!/bin/sh' >$(OMNETPP_BIN_DIR)/$$probefile && \
122
	    chmod +x $(OMNETPP_BIN_DIR)/$$probefile) 2>/dev/null; then \
123
	  if $$probefile >/dev/null 2>/dev/null; then :; else \
124
	    echo 'ERROR: $(OMNETPP_BIN_DIR) is not in the path! You can add it by entering:'; \
125
	    echo '   export PATH=$(OMNETPP_BIN_DIR):$$PATH'; \
126
	    exit 1; \
127
	  fi; \
128
	else \
129
	  echo 'ERROR: Cannot write to $(OMNETPP_BIN_DIR)! Please make sure it exists, and has write permission.'; \
130
	  exit 1; \
131
	fi; \
132
	rm -f $(OMNETPP_BIN_DIR)/$$probefile; \
133

  
134
clean: makefiles
135
	-rm -f $(OMNETPP_LIB_DIR)/*.*
136
	-rm -rf $(OMNETPP_OUT_DIR)/$(CONFIGNAME)
137
	-rm -rf $(OMNETPP_LIB_DIR)/$(CONFIGNAME)
138
	for i in $(BASE); do \
139
	    (cd $(OMNETPP_SRC_DIR)/$$i && $(MAKE) clean); \
140
	done
141

  
142
cleanall: makefiles
143
	-rm -rf $(OMNETPP_OUT_DIR)
144
	-rm -rf $(OMNETPP_LIB_DIR)/*
145
	for i in $(BASE); do \
146
	    (cd $(OMNETPP_SRC_DIR)/$$i && $(MAKE) clean); \
147
	done
148

  
149
# bin should be removed last because opp_configfilepath (in bin directory) is needed to clean
150
	-rm -rf $(OMNETPP_BIN_DIR)/*
151

  
152

  
153
depend:
154
	for i in $(BASE); do \
155
	    (cd $(OMNETPP_SRC_DIR)/$$i && $(MAKE) depend); \
156
	done
157

  
158
makefiles:
159

  
160
# copy the documentation to the UI doc folder too.
161
# patch some files to have correct URLs and add generic eclipse stylsheet when needed
162
copy-ui-docu:
163
	txt2html $(OMNETPP_DOC_DIR)/WhatsNew --outfile $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/WhatsNew.html
164
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/api
165
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/manual
166
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/userguide
167
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/migration
168
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/tictoc-tutorial
169
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-overview
170
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-customization-guide
171
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-developersguide
172
	cp -r $(OMNETPP_DOC_DIR)/ide-changelog $(OMNETPP_UI_DIR)/org.omnetpp.doc/content
173
	cp -r $(OMNETPP_DOC_DIR)/api $(OMNETPP_UI_DIR)/org.omnetpp.doc/content
174
	cp -r $(OMNETPP_DOC_DIR)/src/manual/eclipse $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/manual
175
	cp -r $(OMNETPP_DOC_DIR)/src/userguide/eclipse $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/userguide
176
	cp -r $(OMNETPP_DOC_DIR)/src/migrationguide/eclipse $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/migration
177
	cp -r $(OMNETPP_DOC_DIR)/tictoc-tutorial $(OMNETPP_UI_DIR)/org.omnetpp.doc/content
178
	cp -r $(OMNETPP_DOC_DIR)/ide-overview $(OMNETPP_UI_DIR)/org.omnetpp.doc/content
179
	cp -r $(OMNETPP_DOC_DIR)/src/ide-customization-guide/eclipse $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-customization-guide
180
	cp -r $(OMNETPP_DOC_DIR)/src/ide-developersguide/eclipse $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-developersguide
181
	echo "<html><body><pre>" >$(OMNETPP_UI_DIR)/org.omnetpp.doc/content/License.html
182
	cat $(OMNETPP_DOC_DIR)/License >>$(OMNETPP_UI_DIR)/org.omnetpp.doc/content/License.html
183
	echo "</pre></body></html>" >>$(OMNETPP_UI_DIR)/org.omnetpp.doc/content/License.html
184
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/userguide/plugin.xml
185
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/migration/plugin.xml
186
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-customization-guide/plugin.xml
187
	rm -rf $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-developersguide/plugin.xml
188
	perl -i -pe 's!<head>!<head><link rel="STYLESHEET" href="book.css"  type="text/css"/>!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/WhatsNew.html
189
	perl -i -pe 's!<head>!<head><link rel="STYLESHEET" href="../book.css"  type="text/css"/>!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-overview/*.html
190
	perl -i -pe 's!<head>!<head><link rel="STYLESHEET" href="../book.css"  type="text/css"/>!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-changelog/*.html
191
	perl -i -pe 's!href="!href="content/manual/!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/manual/toc.xml
192
	perl -i -pe 's!href="!href="content/userguide/!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/userguide/toc.xml
193
	perl -i -pe 's!<head>!<head><link rel="STYLESHEET" href="../book.css"  type="text/css"/>!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/userguide/*.html
194
	perl -i -pe 's!href="!href="content/migration/!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/migration/toc.xml
195
	perl -i -pe 's!<head>!<head><link rel="STYLESHEET" href="../book.css"  type="text/css"/>!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/migration/*.html
196
	perl -i -pe 's!href="!href="content/ide-customization-guide/!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-customization-guide/toc.xml
197
	perl -i -pe 's!<head>!<head><link rel="STYLESHEET" href="../book.css"  type="text/css"/>!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-customization-guide/*.html
198
	perl -i -pe 's!href="!href="content/ide-developersguide/!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-developersguide/toc.xml
199
	perl -i -pe 's!<head>!<head><link rel="STYLESHEET" href="../book.css"  type="text/css"/>!gi' $(OMNETPP_UI_DIR)/org.omnetpp.doc/content/ide-developersguide/*.html
200

  
201
ifeq ($(findstring linux,$(PLATFORM)),linux)
202

  
203
generate-desktop-file:
204
	@echo "[Desktop Entry]\nEncoding=UTF-8\nType=Application\nExec=$(OMNETPP_BIN_DIR)/omnetpp\nIcon=$(OMNETPP_ROOT)/ide/icon.png\nName=$(OMNETPP_PRODUCT) $(OMNETPP_VERSION) IDE\nCategories=Development;IDE;Debugger\n" >opensim-ide.desktop
205

  
206
install-menu-item: generate-desktop-file
207
	@xdg-desktop-menu uninstall opensim-ide.desktop
208
	@xdg-desktop-menu install opensim-ide.desktop
209
	@rm opensim-ide.desktop
210

  
211
install-desktop-icon: generate-desktop-file
212
	@xdg-desktop-icon uninstall opensim-ide.desktop
213
	@xdg-desktop-icon install opensim-ide.desktop
214
	@rm opensim-ide.desktop
215

  
216
else ifeq ($(findstring macosx,$(PLATFORM)),macosx)
217

  
218
install-menu-item:
219
ifeq ($(OMNETPP_PRODUCT),OMNEST)
220
	-ln -s -f $(OMNETPP_ROOT)/ide/omnest.app /Applications/'$(OMNETPP_PRODUCT) $(OMNETPP_VERSION) IDE'
221
else
222
	-ln -s -f $(OMNETPP_ROOT)/ide/omnetpp.app /Applications/'$(OMNETPP_PRODUCT) $(OMNETPP_VERSION) IDE'
223
endif
224

  
225
install-desktop-icon:
226
ifeq ($(OMNETPP_PRODUCT),OMNEST)
227
	-ln -s -f $(OMNETPP_ROOT)/ide/omnest.app ~/Desktop/'$(OMNETPP_PRODUCT) $(OMNETPP_VERSION) IDE'
228
else
229
	-ln -s -f $(OMNETPP_ROOT)/ide/omnetpp.app ~/Desktop/'$(OMNETPP_PRODUCT) $(OMNETPP_VERSION) IDE'
230
endif
231

  
232
else ifeq ($(findstring win32,$(PLATFORM)),win32)
233

  
234
endif
Makefile.inc.in
1
#
2
# Do not edit this file -- it gets generated from Makefile.inc.in.
3
# Your changes will be lost the next time ./configure is run.
4
#
5
OMNETPP_PRODUCT = @OMNETPP_PRODUCT@
6
OMNETPP_RELEASE = @OMNETPP_RELEASE@
7
OMNETPP_VERSION = @OMNETPP_VERSION@
8
OMNETPP_BUILDID = @OMNETPP_BUILDID@
9
OMNETPP_EDITION = @OMNETPP_EDITION@
10

  
11
#
12
# Directories
13
#
14
OMNETPP_ROOT = @OMNETPP_ROOT@
15
OMNETPP_BIN_DIR = @OMNETPP_BIN_DIR@
16
OMNETPP_INCL_DIR = @OMNETPP_INCL_DIR@
17
OMNETPP_LIB_DIR = @OMNETPP_LIB_DIR@
18
OMNETPP_OUT_DIR = @OMNETPP_OUT_DIR@
19
OMNETPP_IMAGE_PATH = @OMNETPP_IMAGE_PATH@
20

  
21
OMNETPP_SRC_DIR = @OMNETPP_SRC_DIR@
22
OMNETPP_UI_DIR = @OMNETPP_UI_DIR@
23
OMNETPP_UTILS_DIR = @OMNETPP_UTILS_DIR@
24
OMNETPP_DOC_DIR = @OMNETPP_DOC_DIR@
25
OMNETPP_TEST_DIR = @OMNETPP_TEST_DIR@
26

  
27
#
28
# Make "debug" the default mode
29
#
30
ifndef MODE
31
MODE = debug
32
endif
33

  
34
#
35
# Configname determines where (in which subdirectory of out/)
36
# makemake-generated makefiles create object files and other
37
# build artifacts.
38
#
39
ifndef CONFIGNAME
40
CONFIGNAME = $(TOOLCHAIN_NAME)-$(MODE)
41
endif
42

  
43
#
44
# Various tools and options
45
#
46
ifeq ($(MODE),debug)
47
CFLAGS=$(CFLAGS_DEBUG)
48
D=d
49
else
50
CFLAGS=$(CFLAGS_RELEASE)
51
D=
52
endif
53

  
54
PERL = @PERL@
55
YACC = @YACC@
56
LEX = @LEX@
57
CC = @CC@
58
CXX = @CXX@
59
TOOLCHAIN_NAME = @TOOLCHAIN_NAME@
60
CPPFLAGS = @CPPFLAGS@
61
CFLAGS_DEBUG = @CFLAGS_DEBUG@
62
CFLAGS_RELEASE = @CFLAGS_RELEASE@
63
LDFLAGS = @LDFLAGS@
64
WHOLE_ARCHIVE_ON = @WHOLE_ARCHIVE_ON@
65
WHOLE_ARCHIVE_OFF = @WHOLE_ARCHIVE_OFF@
66
MYPWD = @MYPWD@
67
MSGC = @MSGC@
68
NEDTOOL = @NEDTOOL@
69
AS = @AS@
70
AR = @AR@
71
RANLIB = @RANLIB@
72
SHLIB_LD = @SHLIB_LD@
73
DLLTOOL = @DLLTOOL@
74
STRIP = @STRIP@
75
WISH = @WISH@
76
MAKEDEPEND = @MAKEDEPEND@
77
LN = @LN@
78
MKPATH = @MKPATH@
79
SHLIB_POSTPROCESS = @SHLIB_POSTPROCESS@
80

  
81
A_LIB_SUFFIX = @A_LIB_SUFFIX@
82
SO_LIB_SUFFIX = @SO_LIB_SUFFIX@
83
DLL_LIB_SUFFIX = @DLL_LIB_SUFFIX@
84
JNI_LIB_SUFFIX = @JNI_LIB_SUFFIX@
85
EXE_SUFFIX = @EXE_SUFFIX@
86
LIB_PREFIX = @LIB_PREFIX@
87

  
88
ifeq ("$(SHARED_LIBS)", "")
89
SHARED_LIBS = @SHARED_LIBS@
90
endif
91
SHARED_LIB_SUFFIX = @SHARED_LIB_SUFFIX@
92

  
93
NO_TCL = @NO_TCL@
94
HAVE_DLOPEN = @HAVE_DLOPEN@
95
TK_CFLAGS = @TK_CFLAGS@
96
TK_LIBS = @TK_LIBS@
97
HAVE_BLT = @HAVE_BLT@
98
BLT_LIBS = @BLT_LIBS@
99
ZLIB_CFLAGS = @ZLIB_CFLAGS@
100
ZLIB_LIBS = @ZLIB_LIBS@
101
HAVE_MPI = @HAVE_MPI@
102
MPI_CFLAGS = @MPI_CFLAGS@
103
MPI_LIBS = @MPI_LIBS@
104
HAVE_PCAP = @HAVE_PCAP@
105
PCAP_CFLAGS = @PCAP_CFLAGS@
106
PCAP_LIBS = @PCAP_LIBS@
107
HAVE_PTHREAD = @HAVE_PTHREAD@
108
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
109
PTHREAD_LIBS = @PTHREAD_LIBS@
110

  
111
XMLPARSER = @XMLPARSER@
112
XML_CFLAGS = @XML_CFLAGS@
113
XML_LIBS = @XML_LIBS@
114

  
115
AKAROA_CFLAGS = @AKAROA_CFLAGS@
116
AKAROA_LIBS = @AKAROA_LIBS@
117

  
118
TKENV_IF_POSSIBLE = @TKENV_IF_POSSIBLE@
119
JNILIBS_IF_POSSIBLE = @JNILIBS_IF_POSSIBLE@
120

  
121
EMBED_TCL_CODE = @EMBED_TCL_CODE@
122
OMNETPP_TKENV_DIR = @OMNETPP_TKENV_DIR@
123

  
124
WITH_NETBUILDER = @WITH_NETBUILDER@
125
WITH_PARSIM = @WITH_PARSIM@
126

  
127
JAVA_CFLAGS = @JAVA_CFLAGS@
128
JAVA_LIBS = @JAVA_LIBS@
129
SWIG = @SWIG@
130
PLATFORM = @PLATFORM@
131

  
132
#
133
# Definitions for makemake-generated makefiles
134
#
135
ALL_ENV_LIBS = @ALL_ENV_LIBS@
136
CMDENV_LIBS = -u _cmdenv_lib -loppcmdenv$D -loppenvir$D
137
TKENV_LIBS = -u _tkenv_lib -lopptkenv$D -loppenvir$D -lopplayout$D
138
KERNEL_LIBS = -loppsim$D
139

  
140
ifeq ($(SHARED_LIBS),yes)
141
  LIB_SUFFIX =  $(SHARED_LIB_SUFFIX)
142
else
143
  LIB_SUFFIX = $(A_LIB_SUFFIX)
144
  # extra libs we are indirectly depend on. they are needed if we are building statically
145
  KERNEL_LIBS += $(XML_LIBS) -loppnedxml$D -loppcommon$D
146
  TKENV_LIBS += $(TK_LIBS) $(BLT_LIBS) $(ZLIB_LIBS)
147

  
148
  ifeq ($(WITH_PARSIM),yes)
149
    ifeq ($(HAVE_MPI),yes)
150
      KERNEL_LIBS += $(MPI_LIBS)
151
    endif
152
  endif
153

  
154
  # add the Carbon framework if we are building statically on Mac OS X, because Tcl/Tk needs it
155
  #FIXME why not in ./configure?
156
  ifeq ($(PLATFORM),macosx)
157
    TKENV_LIBS += -framework Carbon
158
  endif
159
endif
160

  
161
SYS_LIBS = @SYS_LIBS@
162

  
PORTING
1
 Porting an OMNeT++ model to Horizon
2
 =================================== 
3

  
4
 Porting a given model to run on top of Horizon is relatively straightforward.
5

  
6
  * New base class for modules
7
    In order to enable parallel execution in Horizon, modules need to inherit 
8
    from cAsyncModule instead of cSimpleModule. Simply replace the base class
9
    in all modules of the model. Additionally, remove the Module_Class_Members()
10
    macro if it is used in the module. This macro is not compatible with Horizon
11
    and also not needed. 
12
    
13
  * No findObject
14
    In Horizon, the ownership handling of OMNeT++ is partly disabled to allow for
15
    an efficient parallel execution: Child modules still know their parent, but the
16
    parents do not know their children. Hence, it is not possible to find a
17
    child object this way.
18
    cQueue provides a set of replacement methods that allow to search for an
19
    object in the queue:
20
     - findObjectByName(const char* name)
21
     - removeByName(const char* name)
22
     - containsByName(const char* name)
23
     
24
  * Random number generation
25
    Since the global random number generator of OMNeT++ is not thread-safe,
26
    every cAsyncModule contains a local random number generator. To use this,
27
    simply prefix every call to a random number generation method with the local
28
    object numGen:
29
     - uniform(a,b)  ==>  numGen->uniform(a,b)
30
    Seeding of these local random number generators is done by means of a global
31
    seed generator RNG. During the sequential initialization phase of the model,
32
    every model requests a seed for its local RNGs from the central seed generator. 
33

  
34

  
35
 Performance optimization
36
 ========================
37
 
38
 The migration process described above only allows to run a model on top of 
39
 Horizon, but it does not consider parallel performance. This section tries to
40
 give some hints on how to achieve a good parallel performance.
41
 
42
   * Specify event durations
43
     Horizon can only process events in parallel if 
44
       i) they are discrete and start at the same point in simulated time or
45
      ii) if they are expanded events, i.e., they span a period of simulated time,
46
          and those periods overlap.
47
     To define a durations for an expanded event, a specific method inside of the
48
     module needs to be implemented:
49
     
50
      - simtime_t getProcessingDelay(cMessage* msg)
51
     
52
     This method receives a message and returns the associated duration of this
53
     event. If it is not implemented, the default duration for an event is 0.
54
     
55
     NOTE: When defining an expanded event a few issues need to be considered:
56
     
57
      - Expanded events may only create new events which start AFTER the current
58
        event finished. I.e., if an event spans from 1.0s to 1.5s
59
        in the simulation, ALL events it sends and schedules may ONLY start at or
60
        after 1.5s in the simulation.
61
        One can access the duration of the current expanded event by calling
62
        getCurrentProcessingDelay() and add this to the send/scheduleAt call:
63
        send(msg, "gate")  ==>  sendDelayed(msg, getCurrentProcessingDelay(), "gate")
64
        
65
      - Defining expanded events changes the timing of the model. This might
66
        potentially mess up the order of events. 
67
     
68
   * Splitting functionality
69
     For data consistency reasons, only one event is active inside of each module.
70
     In order to achieve as much parallelism as possible, parallel computations
71
     that do not depend on each other should be conducted in separate instances
72
     of modules.
73
     Example: pathloss calculation. Multiple such calculations can run in parallel
74
     because the only depend on the position of the sender and receiver. If there
75
     is only one instance of the "PathlossModule", all calculations must be done
76
     sequentially. Hence, it is better to create multiple instances (for example
77
     one for each receiver module) which then calculate the pathloss in parallel
78
     to the other modules.
79
 
80

  
README
1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2
PLEASE NOTE: THIS SOFTWARE PACKAGE INCLUDES HORIZON, NOT OMNeT++!
3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4

  
5
If you intended to download an official OMNeT++ release, this is not what you
6
are looking for. Please go to www.omnetpp.org and download an official release
7
of OMNeT++ from there. 
8

  
9

  
10
Horizon
11
~~~~~~~
12

  
13
Horizon is a parallel simulation framework build upon OMNeT++. It extends the
14
API and core of OMNeT++ to allow for parallel event execution. See our papers
15
for more information.
16

  
17

  
18
Changes
19
~~~~~~~
20

  
21
This package includes the bare simulation framework that allows you to compile
22
and run simulations using Horizon. To avoid confusion between OMNeT++ and
23
Horizon, we removed most of the supplementary features of the official OMNeT++
24
release which are not specific to Horizon. Specifically, we removed the following
25
components / directories:
26

  
27
 - contrib
28
 - doc (except for Horizon specific documentation and files needed by the build system)
29
 - ide
30
 - migrate
31
 - test
32
 - samples
33

  
34

  
35
Porting & Limitations
36
~~~~~~~~~~~~~~~~~~~~~
37

  
38
See PORTING for a brief discussion of how to port existing models to Horizon.
39
Additionally, consult LIMITATIONS to learn about restrictions of the programming
40
model and API imposed by Horizon.
41

  
42

  
43
Horizon-specific runtime options
44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45

  
46
 - use-thread-pool : bool
47
   Enables or disables parallel event execution. 
48
   
49
 - thread-pool-size : integer
50
   Specifies the number of worker threads. Keep in mind that the event scheduler
51
   runs as an additional thread: If the computing machine has 12 cores, the maximum
52
   number of worker threads should be 11. Horizon automatically limits the number
53
   of threads accordingly.
54
   
55
 - thread-pool-class : {"cLockedThreadPool", "cSpinningThreadPool"}
56
   Specifies the thread pool implementation. Best performance is achieved using
57
   the cSpinningThreadPool which utilizes busy waiting for thread synchronization.
58
   For debugging and profiling use the cLockedThreadPool which uses ordinary
59
   pthread synchronization primitives.
60
   
61
 - use-main-thread : bool
62
   cSpinningThreadPool ONLY: If the main thread (event scheduler) determines all
63
   workers busy it may execute a given event itself. Use with care as long running
64
   events can block the central scheduler so that the workers quickly run out
65
   of work.
66
   
67
 - seed-generator-seed : integer
68
   Specifies the seed used by the central seed-generator random number generator.
69
   During initialization, the local RNGs of each module request seeds from this
70
   generator.
71
 
72
 - parallelize-zero-duration-events : bool
73
   Shall non-expanded (discrete) events be executed in parallel?
74
 
75
 - cpu-id-offset : integer
76
   Can be used to alter the assignment of threads to CPUs. Typically, the first
77
   thread (event scheduler) is pinned to CPU0, the second to CPU1, and so on.
78
   This option specifies an offset for the CPU-ID: thread1 -> CPU0 + offset
79
   which is usefull if two intances of the simulator run on one machine at the
80
   same time.
81

  
82

  
83
Samples
84
~~~~~~~
85

  
86
Some simple example models that make use of Horizon are available on our
87
project website https://code.comsys.rwth-aachen.de/redmine/projects/horizon-public.
88

  
89

  
90
Installation
91
~~~~~~~~~~~~
92

  
93
In contrast to OMNeT++, Horizon only runs on Linux/UNIX based operating systems.  
94
Please see the INSTALL file for dependencies and instructions on how to build Horizon.
95

  
96

  
97
Acknowledgements
98
~~~~~~~~~~~~~~~~
99

  
100
We'd like to thank Andras Varga and the OMNeT++ Team for providing a great
101
simulation tool to the community and for allowing us to re-use and publish the
102
code of OMNeT++ on our project website.
Version
1
omnetpp-4.1
configure
1
#! /bin/sh
2
# Guess values for system-dependent variables and create Makefiles.
3
# Generated by GNU Autoconf 2.67.
4
#
5
#
6
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8
# Foundation, Inc.
9
#
10
#
11
# This configure script is free software; the Free Software Foundation
12
# gives unlimited permission to copy, distribute and modify it.
13
## -------------------- ##
14
## M4sh Initialization. ##
15
## -------------------- ##
16

  
17
# Be more Bourne compatible
18
DUALCASE=1; export DUALCASE # for MKS sh
19
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20
  emulate sh
21
  NULLCMD=:
22
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23
  # is contrary to our usage.  Disable this feature.
24
  alias -g '${1+"$@"}'='"$@"'
25
  setopt NO_GLOB_SUBST
26
else
27
  case `(set -o) 2>/dev/null` in #(
28
  *posix*) :
29
    set -o posix ;; #(
30
  *) :
31
     ;;
32
esac
33
fi
34

  
35

  
36
as_nl='
37
'
38
export as_nl
39
# Printing a long string crashes Solaris 7 /usr/bin/printf.
40
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43
# Prefer a ksh shell builtin over an external printf program on Solaris,
44
# but without wasting forks for bash or zsh.
45
if test -z "$BASH_VERSION$ZSH_VERSION" \
46
    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47
  as_echo='print -r --'
48
  as_echo_n='print -rn --'
49
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50
  as_echo='printf %s\n'
51
  as_echo_n='printf %s'
52
else
53
  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54
    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55
    as_echo_n='/usr/ucb/echo -n'
56
  else
57
    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58
    as_echo_n_body='eval
59
      arg=$1;
60
      case $arg in #(
61
      *"$as_nl"*)
62
	expr "X$arg" : "X\\(.*\\)$as_nl";
63
	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64
      esac;
65
      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66
    '
67
    export as_echo_n_body
68
    as_echo_n='sh -c $as_echo_n_body as_echo'
69
  fi
70
  export as_echo_body
71
  as_echo='sh -c $as_echo_body as_echo'
72
fi
73

  
74
# The user is always right.
75
if test "${PATH_SEPARATOR+set}" != set; then
76
  PATH_SEPARATOR=:
77
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79
      PATH_SEPARATOR=';'
80
  }
81
fi
82

  
83

  
84
# IFS
85
# We need space, tab and new line, in precisely that order.  Quoting is
86
# there to prevent editors from complaining about space-tab.
87
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88
# splitting by setting IFS to empty value.)
89
IFS=" ""	$as_nl"
90

  
91
# Find who we are.  Look in the path if we contain no directory separator.
92
case $0 in #((
93
  *[\\/]* ) as_myself=$0 ;;
94
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95
for as_dir in $PATH
96
do
97
  IFS=$as_save_IFS
98
  test -z "$as_dir" && as_dir=.
99
    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100
  done
101
IFS=$as_save_IFS
102

  
103
     ;;
104
esac
105
# We did not find ourselves, most probably we were run as `sh COMMAND'
106
# in which case we are not to be found in the path.
107
if test "x$as_myself" = x; then
108
  as_myself=$0
109
fi
110
if test ! -f "$as_myself"; then
111
  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112
  exit 1
113
fi
114

  
115
# Unset variables that we do not need and which cause bugs (e.g. in
116
# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
117
# suppresses any "Segmentation fault" message there.  '((' could
118
# trigger a bug in pdksh 5.2.14.
119
for as_var in BASH_ENV ENV MAIL MAILPATH
120
do eval test x\${$as_var+set} = xset \
121
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122
done
123
PS1='$ '
124
PS2='> '
125
PS4='+ '
126

  
127
# NLS nuisances.
128
LC_ALL=C
129
export LC_ALL
130
LANGUAGE=C
131
export LANGUAGE
132

  
133
# CDPATH.
134
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135

  
136
if test "x$CONFIG_SHELL" = x; then
137
  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138
  emulate sh
139
  NULLCMD=:
140
  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141
  # is contrary to our usage.  Disable this feature.
142
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
143
  setopt NO_GLOB_SUBST
144
else
145
  case \`(set -o) 2>/dev/null\` in #(
146
  *posix*) :
147
    set -o posix ;; #(
148
  *) :
149
     ;;
150
esac
151
fi
152
"
153
  as_required="as_fn_return () { (exit \$1); }
154
as_fn_success () { as_fn_return 0; }
155
as_fn_failure () { as_fn_return 1; }
156
as_fn_ret_success () { return 0; }
157
as_fn_ret_failure () { return 1; }
158

  
159
exitcode=0
160
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164
if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165

  
166
else
167
  exitcode=1; echo positional parameters were not saved.
168
fi
169
test x\$exitcode = x0 || exit 1"
170
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
174
  if (eval "$as_required") 2>/dev/null; then :
175
  as_have_required=yes
176
else
177
  as_have_required=no
178
fi
179
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
180

  
181
else
182
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
183
as_found=false
184
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
185
do
186
  IFS=$as_save_IFS
187
  test -z "$as_dir" && as_dir=.
188
  as_found=:
189
  case $as_dir in #(
190
	 /*)
191
	   for as_base in sh bash ksh sh5; do
192
	     # Try only shells that exist, to save several forks.
193
	     as_shell=$as_dir/$as_base
194
	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
195
		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
196
  CONFIG_SHELL=$as_shell as_have_required=yes
197
		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
198
  break 2
199
fi
200
fi
201
	   done;;
202
       esac
203
  as_found=false
204
done
205
$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
206
	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
207
  CONFIG_SHELL=$SHELL as_have_required=yes
208
fi; }
209
IFS=$as_save_IFS
210

  
211

  
212
      if test "x$CONFIG_SHELL" != x; then :
213
  # We cannot yet assume a decent shell, so we have to provide a
214
	# neutralization value for shells without unset; and this also
215
	# works around shells that cannot unset nonexistent variables.
216
	BASH_ENV=/dev/null
217
	ENV=/dev/null
218
	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
219
	export CONFIG_SHELL
220
	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
221
fi
222

  
223
    if test x$as_have_required = xno; then :
224
  $as_echo "$0: This script requires a shell more modern than all"
225
  $as_echo "$0: the shells that I found on your system."
226
  if test x${ZSH_VERSION+set} = xset ; then
227
    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
228
    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
229
  else
230
    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
231
$0: including any error possibly output before this
232
$0: message. Then install a modern shell, or manually run
233
$0: the script under such a shell if you do have one."
234
  fi
235
  exit 1
236
fi
237
fi
238
fi
239
SHELL=${CONFIG_SHELL-/bin/sh}
240
export SHELL
241
# Unset more variables known to interfere with behavior of common tools.
242
CLICOLOR_FORCE= GREP_OPTIONS=
243
unset CLICOLOR_FORCE GREP_OPTIONS
244

  
245
## --------------------- ##
246
## M4sh Shell Functions. ##
247
## --------------------- ##
248
# as_fn_unset VAR
249
# ---------------
250
# Portably unset VAR.
251
as_fn_unset ()
252
{
253
  { eval $1=; unset $1;}
254
}
255
as_unset=as_fn_unset
256

  
257
# as_fn_set_status STATUS
258
# -----------------------
259
# Set $? to STATUS, without forking.
260
as_fn_set_status ()
261
{
262
  return $1
263
} # as_fn_set_status
264

  
265
# as_fn_exit STATUS
266
# -----------------
267
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
268
as_fn_exit ()
269
{
270
  set +e
271
  as_fn_set_status $1
272
  exit $1
273
} # as_fn_exit
274

  
275
# as_fn_mkdir_p
276
# -------------
277
# Create "$as_dir" as a directory, including parents if necessary.
278
as_fn_mkdir_p ()
279
{
280

  
281
  case $as_dir in #(
282
  -*) as_dir=./$as_dir;;
283
  esac
284
  test -d "$as_dir" || eval $as_mkdir_p || {
285
    as_dirs=
286
    while :; do
287
      case $as_dir in #(
288
      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
289
      *) as_qdir=$as_dir;;
290
      esac
291
      as_dirs="'$as_qdir' $as_dirs"
292
      as_dir=`$as_dirname -- "$as_dir" ||
293
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
294
	 X"$as_dir" : 'X\(//\)[^/]' \| \
295
	 X"$as_dir" : 'X\(//\)$' \| \
296
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
297
$as_echo X"$as_dir" |
298
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
299
	    s//\1/
300
	    q
301
	  }
302
	  /^X\(\/\/\)[^/].*/{
303
	    s//\1/
304
	    q
305
	  }
306
	  /^X\(\/\/\)$/{
307
	    s//\1/
308
	    q
309
	  }
310
	  /^X\(\/\).*/{
311
	    s//\1/
312
	    q
313
	  }
314
	  s/.*/./; q'`
315
      test -d "$as_dir" && break
316
    done
317
    test -z "$as_dirs" || eval "mkdir $as_dirs"
318
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
319

  
320

  
321
} # as_fn_mkdir_p
322
# as_fn_append VAR VALUE
323
# ----------------------
324
# Append the text in VALUE to the end of the definition contained in VAR. Take
325
# advantage of any shell optimizations that allow amortized linear growth over
326
# repeated appends, instead of the typical quadratic growth present in naive
327
# implementations.
328
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
329
  eval 'as_fn_append ()
330
  {
331
    eval $1+=\$2
332
  }'
333
else
334
  as_fn_append ()
335
  {
336
    eval $1=\$$1\$2
337
  }
338
fi # as_fn_append
339

  
340
# as_fn_arith ARG...
341
# ------------------
342
# Perform arithmetic evaluation on the ARGs, and store the result in the
343
# global $as_val. Take advantage of shells that can avoid forks. The arguments
344
# must be portable across $(()) and expr.
345
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
346
  eval 'as_fn_arith ()
347
  {
348
    as_val=$(( $* ))
349
  }'
350
else
351
  as_fn_arith ()
352
  {
353
    as_val=`expr "$@" || test $? -eq 1`
354
  }
355
fi # as_fn_arith
356

  
357

  
358
# as_fn_error STATUS ERROR [LINENO LOG_FD]
359
# ----------------------------------------
360
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
361
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
362
# script with STATUS, using 1 if that was 0.
363
as_fn_error ()
364
{
365
  as_status=$1; test $as_status -eq 0 && as_status=1
366
  if test "$4"; then
367
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
368
    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
369
  fi
370
  $as_echo "$as_me: error: $2" >&2
371
  as_fn_exit $as_status
372
} # as_fn_error
373

  
374
if expr a : '\(a\)' >/dev/null 2>&1 &&
375
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
376
  as_expr=expr
377
else
378
  as_expr=false
379
fi
380

  
381
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
382
  as_basename=basename
383
else
384
  as_basename=false
385
fi
386

  
387
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
388
  as_dirname=dirname
389
else
390
  as_dirname=false
391
fi
392

  
393
as_me=`$as_basename -- "$0" ||
394
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
395
	 X"$0" : 'X\(//\)$' \| \
396
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
397
$as_echo X/"$0" |
398
    sed '/^.*\/\([^/][^/]*\)\/*$/{
399
	    s//\1/
400
	    q
401
	  }
402
	  /^X\/\(\/\/\)$/{
403
	    s//\1/
404
	    q
405
	  }
406
	  /^X\/\(\/\).*/{
407
	    s//\1/
408
	    q
409
	  }
410
	  s/.*/./; q'`
411

  
412
# Avoid depending upon Character Ranges.
413
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
414
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
415
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
416
as_cr_digits='0123456789'
417
as_cr_alnum=$as_cr_Letters$as_cr_digits
418

  
419

  
420
  as_lineno_1=$LINENO as_lineno_1a=$LINENO
421
  as_lineno_2=$LINENO as_lineno_2a=$LINENO
422
  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
423
  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
424
  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
425
  sed -n '
426
    p
427
    /[$]LINENO/=
428
  ' <$as_myself |
429
    sed '
430
      s/[$]LINENO.*/&-/
431
      t lineno
432
      b
433
      :lineno
434
      N
435
      :loop
436
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
437
      t loop
438
      s/-\n.*//
439
    ' >$as_me.lineno &&
440
  chmod +x "$as_me.lineno" ||
441
    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
442

  
443
  # Don't try to exec as it changes $[0], causing all sort of problems
444
  # (the dirname of $[0] is not the place where we might find the
445
  # original and so on.  Autoconf is especially sensitive to this).
446
  . "./$as_me.lineno"
447
  # Exit status is that of the last command.
448
  exit
449
}
450

  
451
ECHO_C= ECHO_N= ECHO_T=
452
case `echo -n x` in #(((((
453
-n*)
454
  case `echo 'xy\c'` in
455
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
456
  xy)  ECHO_C='\c';;
457
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
458
       ECHO_T='	';;
459
  esac;;
460
*)
461
  ECHO_N='-n';;
462
esac
463

  
464
rm -f conf$$ conf$$.exe conf$$.file
465
if test -d conf$$.dir; then
466
  rm -f conf$$.dir/conf$$.file
467
else
468
  rm -f conf$$.dir
469
  mkdir conf$$.dir 2>/dev/null
470
fi
471
if (echo >conf$$.file) 2>/dev/null; then
472
  if ln -s conf$$.file conf$$ 2>/dev/null; then
473
    as_ln_s='ln -s'
474
    # ... but there are two gotchas:
475
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
476
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
477
    # In both cases, we have to default to `cp -p'.
478
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
479
      as_ln_s='cp -p'
480
  elif ln conf$$.file conf$$ 2>/dev/null; then
481
    as_ln_s=ln
482
  else
483
    as_ln_s='cp -p'
484
  fi
485
else
486
  as_ln_s='cp -p'
487
fi
488
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
489
rmdir conf$$.dir 2>/dev/null
490

  
491
if mkdir -p . 2>/dev/null; then
492
  as_mkdir_p='mkdir -p "$as_dir"'
493
else
494
  test -d ./-p && rmdir ./-p
495
  as_mkdir_p=false
496
fi
497

  
498
if test -x / >/dev/null 2>&1; then
499
  as_test_x='test -x'
500
else
501
  if ls -dL / >/dev/null 2>&1; then
502
    as_ls_L_option=L
503
  else
504
    as_ls_L_option=
505
  fi
506
  as_test_x='
507
    eval sh -c '\''
508
      if test -d "$1"; then
509
	test -d "$1/.";
510
      else
511
	case $1 in #(
512
	-*)set "./$1";;
513
	esac;
514
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
515
	???[sx]*):;;*)false;;esac;fi
516
    '\'' sh
517
  '
518
fi
519
as_executable_p=$as_test_x
520

  
521
# Sed expression to map a string onto a valid CPP name.
522
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
523

  
524
# Sed expression to map a string onto a valid variable name.
525
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
526

  
527

  
528
test -n "$DJDIR" || exec 7<&0 </dev/null
529
exec 6>&1
530

  
531
# Name of the host.
532
# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
533
# so uname gets run too.
534
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
535

  
536
#
537
# Initializations.
538
#
539
ac_default_prefix=/usr/local
540
ac_clean_files=
541
ac_config_libobj_dir=.
542
LIBOBJS=
543
cross_compiling=no
544
subdirs=
545
MFLAGS=
546
MAKEFLAGS=
547

  
548
# Identity of this package.
549
PACKAGE_NAME=
550
PACKAGE_TARNAME=
551
PACKAGE_VERSION=
552
PACKAGE_STRING=
553
PACKAGE_BUGREPORT=
554
PACKAGE_URL=
555

  
556
ac_unique_file="include/omnetpp.h"
557
ac_subst_vars='LTLIBOBJS
558
LIBOBJS
559
PLATFORM
560
JAVA_LIBS
561
JAVA_CFLAGS
562
WITH_PARSIM
563
WITH_NETBUILDER
564
OMNETPP_TKENV_DIR
565
EMBED_TCL_CODE
566
ALL_ENV_LIBS
567
JNILIBS_IF_POSSIBLE
568
TKENV_IF_POSSIBLE
569
AKAROA_LIBS
570
AKAROA_CFLAGS
571
XML_LIBS
572
XML_CFLAGS
573
XMLPARSER
574
PTHREAD_LIBS
575
PTHREAD_CFLAGS
576
HAVE_PTHREAD
577
SYS_LIBS
578
PCAP_LIBS
579
PCAP_CFLAGS
580
HAVE_PCAP
581
MPI_LIBS
582
MPI_CFLAGS
583
HAVE_MPI
584
ZLIB_LIBS
585
ZLIB_CFLAGS
586
BLT_LIBS
587
HAVE_BLT
588
TK_LIBS
589
TK_CFLAGS
590
HAVE_DLOPEN
591
NO_TCL
592
LIB_PREFIX
593
EXE_SUFFIX
594
DLL_LIB_SUFFIX
595
SO_LIB_SUFFIX
596
JNI_LIB_SUFFIX
597
SHARED_LIB_SUFFIX
598
A_LIB_SUFFIX
599
SHARED_LIBS
600
SHLIB_POSTPROCESS
601
MKPATH
602
LN
603
MAKEDEPEND
604
STRIP
605
DLLTOOL
606
SHLIB_LD
607
AR
608
AS
609
NEDTOOL
610
MSGC
611
MYPWD
612
TOOLCHAIN_NAME
613
WHOLE_ARCHIVE_OFF
614
WHOLE_ARCHIVE_ON
615
CFLAGS_RELEASE
616
CFLAGS_DEBUG
617
OMNETPP_TEST_DIR
618
OMNETPP_DOC_DIR
619
OMNETPP_UTILS_DIR
620
OMNETPP_UI_DIR
621
OMNETPP_SRC_DIR
622
OMNETPP_IMAGE_PATH
623
OMNETPP_LIB_DIR
624
OMNETPP_OUT_DIR
625
OMNETPP_INCL_DIR
626
OMNETPP_BIN_DIR
627
OMNETPP_ROOT
628
OMNETPP_EDITION
629
OMNETPP_BUILDID
630
OMNETPP_VERSION
631
OMNETPP_RELEASE
632
OMNETPP_PRODUCT
633
MPICXX
634
MPICPP
635
JRE
636
WISH
637
CXXCPP
638
XMKMF
639
SWIG
640
PERL
641
MAKE
642
LEXLIB
643
LEX_OUTPUT_ROOT
644
LEX
645
YFLAGS
646
YACC
647
RANLIB
648
tmp_CXX
649
ac_ct_CXX
650
CXXFLAGS
651
CXX
652
OBJEXT
653
EXEEXT
654
ac_ct_CC
655
CPPFLAGS
656
LDFLAGS
657
CFLAGS
658
CC
659
host_os
660
host_vendor
661
host_cpu
662
host
663
build_os
664
build_vendor
665
build_cpu
666
build
667
target_alias
668
host_alias
669
build_alias
670
LIBS
671
ECHO_T
672
ECHO_N
673
ECHO_C
674
DEFS
675
mandir
676
localedir
677
libdir
678
psdir
679
pdfdir
680
dvidir
681
htmldir
682
infodir
683
docdir
684
oldincludedir
685
includedir
686
localstatedir
687
sharedstatedir
688
sysconfdir
689
datadir
690
datarootdir
691
libexecdir
692
sbindir
693
bindir
694
program_transform_name
695
prefix
696
exec_prefix
697
PACKAGE_URL
698
PACKAGE_BUGREPORT
699
PACKAGE_STRING
700
PACKAGE_VERSION
701
PACKAGE_TARNAME
702
PACKAGE_NAME
703
PATH_SEPARATOR
704
SHELL'
705
ac_subst_files=''
706
ac_user_opts='
707
enable_option_checking
708
with_x
709
'
710
      ac_precious_vars='build_alias
711
host_alias
712
target_alias
713
CC
714
CFLAGS
715
LDFLAGS
716
LIBS
717
CPPFLAGS
718
CXX
719
CXXFLAGS
720
CCC
721
YACC
722
YFLAGS
723
PERL
724
SWIG
725
XMKMF
726
CXXCPP'
727

  
728

  
729
# Initialize some variables set by options.
730
ac_init_help=
731
ac_init_version=false
732
ac_unrecognized_opts=
733
ac_unrecognized_sep=
734
# The variables have the same names as the options, with
735
# dashes changed to underlines.
736
cache_file=/dev/null
737
exec_prefix=NONE
738
no_create=
739
no_recursion=
740
prefix=NONE
741
program_prefix=NONE
742
program_suffix=NONE
743
program_transform_name=s,x,x,
744
silent=
745
site=
746
srcdir=
747
verbose=
748
x_includes=NONE
749
x_libraries=NONE
750

  
751
# Installation directory options.
752
# These are left unexpanded so users can "make install exec_prefix=/foo"
753
# and all the variables that are supposed to be based on exec_prefix
754
# by default will actually change.
755
# Use braces instead of parens because sh, perl, etc. also accept them.
756
# (The list follows the same order as the GNU Coding Standards.)
757
bindir='${exec_prefix}/bin'
758
sbindir='${exec_prefix}/sbin'
759
libexecdir='${exec_prefix}/libexec'
760
datarootdir='${prefix}/share'
761
datadir='${datarootdir}'
762
sysconfdir='${prefix}/etc'
763
sharedstatedir='${prefix}/com'
764
localstatedir='${prefix}/var'
765
includedir='${prefix}/include'
766
oldincludedir='/usr/include'
767
docdir='${datarootdir}/doc/${PACKAGE}'
768
infodir='${datarootdir}/info'
769
htmldir='${docdir}'
770
dvidir='${docdir}'
771
pdfdir='${docdir}'
772
psdir='${docdir}'
773
libdir='${exec_prefix}/lib'
774
localedir='${datarootdir}/locale'
775
mandir='${datarootdir}/man'
776

  
777
ac_prev=
778
ac_dashdash=
779
for ac_option
780
do
781
  # If the previous option needs an argument, assign it.
782
  if test -n "$ac_prev"; then
783
    eval $ac_prev=\$ac_option
784
    ac_prev=
785
    continue
786
  fi
787

  
788
  case $ac_option in
789
  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
790
  *=)   ac_optarg= ;;
791
  *)    ac_optarg=yes ;;
792
  esac
793

  
794
  # Accept the important Cygnus configure options, so we can diagnose typos.
795

  
796
  case $ac_dashdash$ac_option in
797
  --)
798
    ac_dashdash=yes ;;
799

  
800
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
801
    ac_prev=bindir ;;
802
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
803
    bindir=$ac_optarg ;;
804

  
805
  -build | --build | --buil | --bui | --bu)
806
    ac_prev=build_alias ;;
807
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
808
    build_alias=$ac_optarg ;;
809

  
810
  -cache-file | --cache-file | --cache-fil | --cache-fi \
811
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
812
    ac_prev=cache_file ;;
813
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
814
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
815
    cache_file=$ac_optarg ;;
816

  
817
  --config-cache | -C)
818
    cache_file=config.cache ;;
819

  
820
  -datadir | --datadir | --datadi | --datad)
821
    ac_prev=datadir ;;
822
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
823
    datadir=$ac_optarg ;;
824

  
825
  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
826
  | --dataroo | --dataro | --datar)
827
    ac_prev=datarootdir ;;
828
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
829
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
830
    datarootdir=$ac_optarg ;;
831

  
832
  -disable-* | --disable-*)
833
    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
834
    # Reject names that are not valid shell variable names.
835
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
836
      as_fn_error $? "invalid feature name: $ac_useropt"
837
    ac_useropt_orig=$ac_useropt
838
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
839
    case $ac_user_opts in
840
      *"
841
"enable_$ac_useropt"
842
"*) ;;
843
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
844
	 ac_unrecognized_sep=', ';;
845
    esac
846
    eval enable_$ac_useropt=no ;;
847

  
848
  -docdir | --docdir | --docdi | --doc | --do)
849
    ac_prev=docdir ;;
850
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
851
    docdir=$ac_optarg ;;
852

  
853
  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
854
    ac_prev=dvidir ;;
855
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
856
    dvidir=$ac_optarg ;;
857

  
858
  -enable-* | --enable-*)
859
    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
860
    # Reject names that are not valid shell variable names.
861
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
862
      as_fn_error $? "invalid feature name: $ac_useropt"
863
    ac_useropt_orig=$ac_useropt
864
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
865
    case $ac_user_opts in
866
      *"
867
"enable_$ac_useropt"
868
"*) ;;
869
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
870
	 ac_unrecognized_sep=', ';;
871
    esac
872
    eval enable_$ac_useropt=\$ac_optarg ;;
873

  
874
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
875
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
876
  | --exec | --exe | --ex)
877
    ac_prev=exec_prefix ;;
878
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
879
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
880
  | --exec=* | --exe=* | --ex=*)
881
    exec_prefix=$ac_optarg ;;
882

  
883
  -gas | --gas | --ga | --g)
884
    # Obsolete; use --with-gas.
885
    with_gas=yes ;;
886

  
887
  -help | --help | --hel | --he | -h)
888
    ac_init_help=long ;;
889
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
890
    ac_init_help=recursive ;;
891
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
892
    ac_init_help=short ;;
893

  
894
  -host | --host | --hos | --ho)
895
    ac_prev=host_alias ;;
896
  -host=* | --host=* | --hos=* | --ho=*)
897
    host_alias=$ac_optarg ;;
898

  
899
  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
900
    ac_prev=htmldir ;;
901
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
902
  | --ht=*)
903
    htmldir=$ac_optarg ;;
904

  
905
  -includedir | --includedir | --includedi | --included | --include \
906
  | --includ | --inclu | --incl | --inc)
907
    ac_prev=includedir ;;
908
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
909
  | --includ=* | --inclu=* | --incl=* | --inc=*)
910
    includedir=$ac_optarg ;;
911

  
912
  -infodir | --infodir | --infodi | --infod | --info | --inf)
913
    ac_prev=infodir ;;
914
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
915
    infodir=$ac_optarg ;;
916

  
917
  -libdir | --libdir | --libdi | --libd)
918
    ac_prev=libdir ;;
919
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
920
    libdir=$ac_optarg ;;
921

  
922
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
923
  | --libexe | --libex | --libe)
924
    ac_prev=libexecdir ;;
925
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
926
  | --libexe=* | --libex=* | --libe=*)
927
    libexecdir=$ac_optarg ;;
928

  
929
  -localedir | --localedir | --localedi | --localed | --locale)
930
    ac_prev=localedir ;;
931
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
932
    localedir=$ac_optarg ;;
933

  
934
  -localstatedir | --localstatedir | --localstatedi | --localstated \
935
  | --localstate | --localstat | --localsta | --localst | --locals)
936
    ac_prev=localstatedir ;;
937
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
938
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
939
    localstatedir=$ac_optarg ;;
940

  
941
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
942
    ac_prev=mandir ;;
943
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
944
    mandir=$ac_optarg ;;
945

  
946
  -nfp | --nfp | --nf)
947
    # Obsolete; use --without-fp.
948
    with_fp=no ;;
949

  
950
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
951
  | --no-cr | --no-c | -n)
952
    no_create=yes ;;
953

  
954
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
956
    no_recursion=yes ;;
957

  
958
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
959
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
960
  | --oldin | --oldi | --old | --ol | --o)
961
    ac_prev=oldincludedir ;;
962
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
963
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
964
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
965
    oldincludedir=$ac_optarg ;;
966

  
967
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
968
    ac_prev=prefix ;;
969
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
970
    prefix=$ac_optarg ;;
971

  
972
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
973
  | --program-pre | --program-pr | --program-p)
974
    ac_prev=program_prefix ;;
975
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
976
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
977
    program_prefix=$ac_optarg ;;
978

  
979
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
980
  | --program-suf | --program-su | --program-s)
981
    ac_prev=program_suffix ;;
982
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
983
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
984
    program_suffix=$ac_optarg ;;
985

  
986
  -program-transform-name | --program-transform-name \
987
  | --program-transform-nam | --program-transform-na \
988
  | --program-transform-n | --program-transform- \
989
  | --program-transform | --program-transfor \
990
  | --program-transfo | --program-transf \
991
  | --program-trans | --program-tran \
992
  | --progr-tra | --program-tr | --program-t)
993
    ac_prev=program_transform_name ;;
994
  -program-transform-name=* | --program-transform-name=* \
995
  | --program-transform-nam=* | --program-transform-na=* \
996
  | --program-transform-n=* | --program-transform-=* \
997
  | --program-transform=* | --program-transfor=* \
998
  | --program-transfo=* | --program-transf=* \
999
  | --program-trans=* | --program-tran=* \
1000
  | --progr-tra=* | --program-tr=* | --program-t=*)
1001
    program_transform_name=$ac_optarg ;;
1002

  
1003
  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1004
    ac_prev=pdfdir ;;
1005
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1006
    pdfdir=$ac_optarg ;;
1007

  
1008
  -psdir | --psdir | --psdi | --psd | --ps)
1009
    ac_prev=psdir ;;
1010
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1011
    psdir=$ac_optarg ;;
1012

  
1013
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1014
  | -silent | --silent | --silen | --sile | --sil)
1015
    silent=yes ;;
1016

  
1017
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1018
    ac_prev=sbindir ;;
1019
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1020
  | --sbi=* | --sb=*)
1021
    sbindir=$ac_optarg ;;
1022

  
1023
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1024
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1025
  | --sharedst | --shareds | --shared | --share | --shar \
1026
  | --sha | --sh)
1027
    ac_prev=sharedstatedir ;;
1028
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1029
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1030
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1031
  | --sha=* | --sh=*)
1032
    sharedstatedir=$ac_optarg ;;
1033

  
1034
  -site | --site | --sit)
1035
    ac_prev=site ;;
1036
  -site=* | --site=* | --sit=*)
1037
    site=$ac_optarg ;;
1038

  
1039
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1040
    ac_prev=srcdir ;;
1041
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1042
    srcdir=$ac_optarg ;;
1043

  
1044
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1045
  | --syscon | --sysco | --sysc | --sys | --sy)
1046
    ac_prev=sysconfdir ;;
1047
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1048
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1049
    sysconfdir=$ac_optarg ;;
1050

  
1051
  -target | --target | --targe | --targ | --tar | --ta | --t)
1052
    ac_prev=target_alias ;;
1053
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1054
    target_alias=$ac_optarg ;;
1055

  
1056
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1057
    verbose=yes ;;
1058

  
1059
  -version | --version | --versio | --versi | --vers | -V)
1060
    ac_init_version=: ;;
1061

  
1062
  -with-* | --with-*)
1063
    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1064
    # Reject names that are not valid shell variable names.
1065
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1066
      as_fn_error $? "invalid package name: $ac_useropt"
1067
    ac_useropt_orig=$ac_useropt
1068
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1069
    case $ac_user_opts in
1070
      *"
1071
"with_$ac_useropt"
1072
"*) ;;
1073
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1074
	 ac_unrecognized_sep=', ';;
1075
    esac
1076
    eval with_$ac_useropt=\$ac_optarg ;;
1077

  
1078
  -without-* | --without-*)
1079
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1080
    # Reject names that are not valid shell variable names.
1081
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1082
      as_fn_error $? "invalid package name: $ac_useropt"
1083
    ac_useropt_orig=$ac_useropt
1084
    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1085
    case $ac_user_opts in
1086
      *"
1087
"with_$ac_useropt"
1088
"*) ;;
1089
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1090
	 ac_unrecognized_sep=', ';;
1091
    esac
1092
    eval with_$ac_useropt=no ;;
1093

  
1094
  --x)
1095
    # Obsolete; use --with-x.
1096
    with_x=yes ;;
1097

  
1098
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1099
  | --x-incl | --x-inc | --x-in | --x-i)
1100
    ac_prev=x_includes ;;
1101
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1102
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1103
    x_includes=$ac_optarg ;;
1104

  
1105
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1106
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1107
    ac_prev=x_libraries ;;
1108
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1109
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1110
    x_libraries=$ac_optarg ;;
1111

  
1112
  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1113
Try \`$0 --help' for more information"
1114
    ;;
1115

  
1116
  *=*)
1117
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1118
    # Reject names that are not valid shell variable names.
1119
    case $ac_envvar in #(
1120
      '' | [0-9]* | *[!_$as_cr_alnum]* )
1121
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1122
    esac
1123
    eval $ac_envvar=\$ac_optarg
1124
    export $ac_envvar ;;
1125

  
1126
  *)
1127
    # FIXME: should be removed in autoconf 3.0.
1128
    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1129
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1130
      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1131
    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1132
    ;;
1133

  
1134
  esac
1135
done
1136

  
1137
if test -n "$ac_prev"; then
1138
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1139
  as_fn_error $? "missing argument to $ac_option"
1140
fi
1141

  
1142
if test -n "$ac_unrecognized_opts"; then
1143
  case $enable_option_checking in
1144
    no) ;;
1145
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1146
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1147
  esac
1148
fi
1149

  
1150
# Check all directory arguments for consistency.
1151
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1152
		datadir sysconfdir sharedstatedir localstatedir includedir \
1153
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1154
		libdir localedir mandir
1155
do
1156
  eval ac_val=\$$ac_var
1157
  # Remove trailing slashes.
1158
  case $ac_val in
1159
    */ )
1160
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1161
      eval $ac_var=\$ac_val;;
1162
  esac
1163
  # Be sure to have absolute directory names.
1164
  case $ac_val in
1165
    [\\/$]* | ?:[\\/]* )  continue;;
1166
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1167
  esac
1168
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1169
done
1170

  
1171
# There might be people who depend on the old broken behavior: `$host'
1172
# used to hold the argument of --host etc.
1173
# FIXME: To remove some day.
1174
build=$build_alias
1175
host=$host_alias
1176
target=$target_alias
1177

  
1178
# FIXME: To remove some day.
1179
if test "x$host_alias" != x; then
1180
  if test "x$build_alias" = x; then
1181
    cross_compiling=maybe
1182
    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1183
    If a cross compiler is detected then cross compile mode will be used" >&2
1184
  elif test "x$build_alias" != "x$host_alias"; then
1185
    cross_compiling=yes
1186
  fi
1187
fi
1188

  
1189
ac_tool_prefix=
1190
test -n "$host_alias" && ac_tool_prefix=$host_alias-
1191

  
1192
test "$silent" = yes && exec 6>/dev/null
1193

  
1194

  
1195
ac_pwd=`pwd` && test -n "$ac_pwd" &&
1196
ac_ls_di=`ls -di .` &&
1197
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1198
  as_fn_error $? "working directory cannot be determined"
1199
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1200
  as_fn_error $? "pwd does not report name of working directory"
1201

  
1202

  
1203
# Find the source files, if location was not specified.
1204
if test -z "$srcdir"; then
1205
  ac_srcdir_defaulted=yes
1206
  # Try the directory containing this script, then the parent directory.
1207
  ac_confdir=`$as_dirname -- "$as_myself" ||
1208
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1209
	 X"$as_myself" : 'X\(//\)[^/]' \| \
1210
	 X"$as_myself" : 'X\(//\)$' \| \
1211
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1212
$as_echo X"$as_myself" |
1213
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1214
	    s//\1/
1215
	    q
1216
	  }
1217
	  /^X\(\/\/\)[^/].*/{
1218
	    s//\1/
1219
	    q
1220
	  }
1221
	  /^X\(\/\/\)$/{
1222
	    s//\1/
1223
	    q
1224
	  }
1225
	  /^X\(\/\).*/{
1226
	    s//\1/
1227
	    q
1228
	  }
1229
	  s/.*/./; q'`
1230
  srcdir=$ac_confdir
1231
  if test ! -r "$srcdir/$ac_unique_file"; then
1232
    srcdir=..
1233
  fi
1234
else
1235
  ac_srcdir_defaulted=no
1236
fi
1237
if test ! -r "$srcdir/$ac_unique_file"; then
1238
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1239
  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1240
fi
1241
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1242
ac_abs_confdir=`(
1243
	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1244
	pwd)`
1245
# When building in place, set srcdir=.
1246
if test "$ac_abs_confdir" = "$ac_pwd"; then
1247
  srcdir=.
1248
fi
1249
# Remove unnecessary trailing slashes from srcdir.
1250
# Double slashes in file names in object file debugging info
1251
# mess up M-x gdb in Emacs.
1252
case $srcdir in
1253
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1254
esac
1255
for ac_var in $ac_precious_vars; do
1256
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1257
  eval ac_env_${ac_var}_value=\$${ac_var}
1258
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1259
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1260
done
1261

  
1262
#
1263
# Report the --help message.
1264
#
1265
if test "$ac_init_help" = "long"; then
1266
  # Omit some internal or obsolete options to make the list less imposing.
1267
  # This message is too long to be a string in the A/UX 3.1 sh.
1268
  cat <<_ACEOF
1269
\`configure' configures this package to adapt to many kinds of systems.
1270

  
1271
Usage: $0 [OPTION]... [VAR=VALUE]...
1272

  
1273
To assign environment variables (e.g., CC, CFLAGS...), specify them as
1274
VAR=VALUE.  See below for descriptions of some of the useful variables.
1275

  
1276
Defaults for the options are specified in brackets.
1277

  
1278
Configuration:
1279
  -h, --help              display this help and exit
1280
      --help=short        display options specific to this package
1281
      --help=recursive    display the short help of all the included packages
1282
  -V, --version           display version information and exit
1283
  -q, --quiet, --silent   do not print \`checking ...' messages
1284
      --cache-file=FILE   cache test results in FILE [disabled]
1285
  -C, --config-cache      alias for \`--cache-file=config.cache'
1286
  -n, --no-create         do not create output files
1287
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1288

  
1289
Installation directories:
1290
  --prefix=PREFIX         install architecture-independent files in PREFIX
1291
                          [$ac_default_prefix]
1292
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1293
                          [PREFIX]
1294

  
1295
By default, \`make install' will install all the files in
1296
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1297
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1298
for instance \`--prefix=\$HOME'.
1299

  
1300
For better control, use the options below.
1301

  
1302
Fine tuning of the installation directories:
1303
  --bindir=DIR            user executables [EPREFIX/bin]
1304
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1305
  --libexecdir=DIR        program executables [EPREFIX/libexec]
1306
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1307
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1308
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1309
  --libdir=DIR            object code libraries [EPREFIX/lib]
1310
  --includedir=DIR        C header files [PREFIX/include]
1311
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1312
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1313
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1314
  --infodir=DIR           info documentation [DATAROOTDIR/info]
1315
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1316
  --mandir=DIR            man documentation [DATAROOTDIR/man]
1317
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1318
  --htmldir=DIR           html documentation [DOCDIR]
1319
  --dvidir=DIR            dvi documentation [DOCDIR]
1320
  --pdfdir=DIR            pdf documentation [DOCDIR]
1321
  --psdir=DIR             ps documentation [DOCDIR]
1322
_ACEOF
1323

  
1324
  cat <<\_ACEOF
1325

  
1326
X features:
1327
  --x-includes=DIR    X include files are in DIR
1328
  --x-libraries=DIR   X library files are in DIR
1329

  
1330
System types:
1331
  --build=BUILD     configure for building on BUILD [guessed]
1332
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1333
_ACEOF
1334
fi
1335

  
1336
if test -n "$ac_init_help"; then
1337

  
1338
  cat <<\_ACEOF
1339

  
1340
Optional Packages:
1341
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1342
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1343
  --with-x                use the X Window System
1344

  
1345
Some influential environment variables:
1346
  CC          C compiler command
1347
  CFLAGS      C compiler flags
1348
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1349
              nonstandard directory <lib dir>
1350
  LIBS        libraries to pass to the linker, e.g. -l<library>
1351
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1352
              you have headers in a nonstandard directory <include dir>
1353
  CXX         C++ compiler command
1354
  CXXFLAGS    C++ compiler flags
1355
  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
1356
              the first program found out of: `bison -y', `byacc', `yacc'.
1357
  YFLAGS      The list of arguments that will be passed by default to $YACC.
1358
              This script will default YFLAGS to the empty string to avoid a
1359
              default value of `-d' given by some make applications.
1360
  PERL        The Perl interpreter
1361
  SWIG        The Swig interface generator
1362
  XMKMF       Path to xmkmf, Makefile generator for X Window System
1363
  CXXCPP      C++ preprocessor
1364

  
1365
Use these variables to override the choices made by `configure' or to help
1366
it to find libraries and programs with nonstandard names/locations.
1367

  
1368
Report bugs to the package provider.
1369
_ACEOF
1370
ac_status=$?
1371
fi
1372

  
1373
if test "$ac_init_help" = "recursive"; then
1374
  # If there are subdirs, report their specific --help.
1375
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1376
    test -d "$ac_dir" ||
1377
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1378
      continue
1379
    ac_builddir=.
1380

  
1381
case "$ac_dir" in
1382
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1383
*)
1384
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1385
  # A ".." for each directory in $ac_dir_suffix.
1386
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1387
  case $ac_top_builddir_sub in
1388
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1389
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1390
  esac ;;
1391
esac
1392
ac_abs_top_builddir=$ac_pwd
1393
ac_abs_builddir=$ac_pwd$ac_dir_suffix
1394
# for backward compatibility:
1395
ac_top_builddir=$ac_top_build_prefix
1396

  
1397
case $srcdir in
1398
  .)  # We are building in place.
1399
    ac_srcdir=.
1400
    ac_top_srcdir=$ac_top_builddir_sub
1401
    ac_abs_top_srcdir=$ac_pwd ;;
1402
  [\\/]* | ?:[\\/]* )  # Absolute name.
1403
    ac_srcdir=$srcdir$ac_dir_suffix;
1404
    ac_top_srcdir=$srcdir
1405
    ac_abs_top_srcdir=$srcdir ;;
1406
  *) # Relative name.
1407
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1408
    ac_top_srcdir=$ac_top_build_prefix$srcdir
1409
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1410
esac
1411
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1412

  
1413
    cd "$ac_dir" || { ac_status=$?; continue; }
1414
    # Check for guested configure.
1415
    if test -f "$ac_srcdir/configure.gnu"; then
1416
      echo &&
1417
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1418
    elif test -f "$ac_srcdir/configure"; then
1419
      echo &&
1420
      $SHELL "$ac_srcdir/configure" --help=recursive
1421
    else
1422
      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1423
    fi || ac_status=$?
1424
    cd "$ac_pwd" || { ac_status=$?; break; }
1425
  done
1426
fi
1427

  
1428
test -n "$ac_init_help" && exit $ac_status
1429
if $ac_init_version; then
1430
  cat <<\_ACEOF
1431
configure
1432
generated by GNU Autoconf 2.67
1433

  
1434
Copyright (C) 2010 Free Software Foundation, Inc.
1435
This configure script is free software; the Free Software Foundation
1436
gives unlimited permission to copy, distribute and modify it.
1437
_ACEOF
1438
  exit
1439
fi
1440

  
1441
## ------------------------ ##
1442
## Autoconf initialization. ##
1443
## ------------------------ ##
1444

  
1445
# ac_fn_c_try_compile LINENO
1446
# --------------------------
1447
# Try to compile conftest.$ac_ext, and return whether this succeeded.
1448
ac_fn_c_try_compile ()
1449
{
1450
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1451
  rm -f conftest.$ac_objext
1452
  if { { ac_try="$ac_compile"
1453
case "(($ac_try" in
1454
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1455
  *) ac_try_echo=$ac_try;;
1456
esac
1457
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1458
$as_echo "$ac_try_echo"; } >&5
1459
  (eval "$ac_compile") 2>conftest.err
1460
  ac_status=$?
1461
  if test -s conftest.err; then
1462
    grep -v '^ *+' conftest.err >conftest.er1
1463
    cat conftest.er1 >&5
1464
    mv -f conftest.er1 conftest.err
1465
  fi
1466
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1467
  test $ac_status = 0; } && {
1468
	 test -z "$ac_c_werror_flag" ||
1469
	 test ! -s conftest.err
1470
       } && test -s conftest.$ac_objext; then :
1471
  ac_retval=0
1472
else
1473
  $as_echo "$as_me: failed program was:" >&5
1474
sed 's/^/| /' conftest.$ac_ext >&5
1475

  
1476
	ac_retval=1
1477
fi
1478
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1479
  as_fn_set_status $ac_retval
1480

  
1481
} # ac_fn_c_try_compile
1482

  
1483
# ac_fn_cxx_try_compile LINENO
1484
# ----------------------------
1485
# Try to compile conftest.$ac_ext, and return whether this succeeded.
1486
ac_fn_cxx_try_compile ()
1487
{
1488
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1489
  rm -f conftest.$ac_objext
1490
  if { { ac_try="$ac_compile"
1491
case "(($ac_try" in
1492
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1493
  *) ac_try_echo=$ac_try;;
1494
esac
1495
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1496
$as_echo "$ac_try_echo"; } >&5
1497
  (eval "$ac_compile") 2>conftest.err
1498
  ac_status=$?
1499
  if test -s conftest.err; then
1500
    grep -v '^ *+' conftest.err >conftest.er1
1501
    cat conftest.er1 >&5
1502
    mv -f conftest.er1 conftest.err
1503
  fi
1504
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1505
  test $ac_status = 0; } && {
1506
	 test -z "$ac_cxx_werror_flag" ||
1507
	 test ! -s conftest.err
1508
       } && test -s conftest.$ac_objext; then :
1509
  ac_retval=0
1510
else
1511
  $as_echo "$as_me: failed program was:" >&5
1512
sed 's/^/| /' conftest.$ac_ext >&5
1513

  
1514
	ac_retval=1
1515
fi
1516
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1517
  as_fn_set_status $ac_retval
1518

  
1519
} # ac_fn_cxx_try_compile
1520

  
1521
# ac_fn_cxx_try_link LINENO
1522
# -------------------------
1523
# Try to link conftest.$ac_ext, and return whether this succeeded.
1524
ac_fn_cxx_try_link ()
1525
{
1526
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1527
  rm -f conftest.$ac_objext conftest$ac_exeext
1528
  if { { ac_try="$ac_link"
1529
case "(($ac_try" in
1530
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1531
  *) ac_try_echo=$ac_try;;
1532
esac
1533
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1534
$as_echo "$ac_try_echo"; } >&5
1535
  (eval "$ac_link") 2>conftest.err
1536
  ac_status=$?
1537
  if test -s conftest.err; then
1538
    grep -v '^ *+' conftest.err >conftest.er1
1539
    cat conftest.er1 >&5
1540
    mv -f conftest.er1 conftest.err
1541
  fi
1542
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1543
  test $ac_status = 0; } && {
1544
	 test -z "$ac_cxx_werror_flag" ||
1545
	 test ! -s conftest.err
1546
       } && test -s conftest$ac_exeext && {
1547
	 test "$cross_compiling" = yes ||
1548
	 $as_test_x conftest$ac_exeext
1549
       }; then :
1550
  ac_retval=0
1551
else
1552
  $as_echo "$as_me: failed program was:" >&5
1553
sed 's/^/| /' conftest.$ac_ext >&5
1554

  
1555
	ac_retval=1
1556
fi
1557
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1558
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1559
  # interfere with the next link command; also delete a directory that is
1560
  # left behind by Apple's compiler.  We do this before executing the actions.
1561
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1562
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1563
  as_fn_set_status $ac_retval
1564

  
1565
} # ac_fn_cxx_try_link
1566

  
1567
# ac_fn_cxx_try_cpp LINENO
1568
# ------------------------
1569
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1570
ac_fn_cxx_try_cpp ()
1571
{
1572
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1573
  if { { ac_try="$ac_cpp conftest.$ac_ext"
1574
case "(($ac_try" in
1575
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1576
  *) ac_try_echo=$ac_try;;
1577
esac
1578
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1579
$as_echo "$ac_try_echo"; } >&5
1580
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1581
  ac_status=$?
1582
  if test -s conftest.err; then
1583
    grep -v '^ *+' conftest.err >conftest.er1
1584
    cat conftest.er1 >&5
1585
    mv -f conftest.er1 conftest.err
1586
  fi
1587
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1588
  test $ac_status = 0; } > conftest.i && {
1589
	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
1590
	 test ! -s conftest.err
1591
       }; then :
1592
  ac_retval=0
1593
else
1594
  $as_echo "$as_me: failed program was:" >&5
1595
sed 's/^/| /' conftest.$ac_ext >&5
1596

  
1597
    ac_retval=1
1598
fi
1599
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1600
  as_fn_set_status $ac_retval
1601

  
1602
} # ac_fn_cxx_try_cpp
1603

  
1604
# ac_fn_cxx_try_run LINENO
1605
# ------------------------
1606
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1607
# that executables *can* be run.
1608
ac_fn_cxx_try_run ()
1609
{
1610
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1611
  if { { ac_try="$ac_link"
1612
case "(($ac_try" in
1613
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1614
  *) ac_try_echo=$ac_try;;
1615
esac
1616
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1617
$as_echo "$ac_try_echo"; } >&5
1618
  (eval "$ac_link") 2>&5
1619
  ac_status=$?
1620
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1621
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1622
  { { case "(($ac_try" in
1623
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624
  *) ac_try_echo=$ac_try;;
1625
esac
1626
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627
$as_echo "$ac_try_echo"; } >&5
1628
  (eval "$ac_try") 2>&5
1629
  ac_status=$?
1630
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1631
  test $ac_status = 0; }; }; then :
1632
  ac_retval=0
1633
else
1634
  $as_echo "$as_me: program exited with status $ac_status" >&5
1635
       $as_echo "$as_me: failed program was:" >&5
1636
sed 's/^/| /' conftest.$ac_ext >&5
1637

  
1638
       ac_retval=$ac_status
1639
fi
1640
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1641
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1642
  as_fn_set_status $ac_retval
1643

  
1644
} # ac_fn_cxx_try_run
1645
cat >config.log <<_ACEOF
1646
This file contains any messages produced by compilers while
1647
running configure, to aid debugging if configure makes a mistake.
1648

  
1649
It was created by $as_me, which was
1650
generated by GNU Autoconf 2.67.  Invocation command line was
1651

  
1652
  $ $0 $@
1653

  
1654
_ACEOF
1655
exec 5>>config.log
1656
{
1657
cat <<_ASUNAME
1658
## --------- ##
1659
## Platform. ##
1660
## --------- ##
1661

  
1662
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1663
uname -m = `(uname -m) 2>/dev/null || echo unknown`
1664
uname -r = `(uname -r) 2>/dev/null || echo unknown`
1665
uname -s = `(uname -s) 2>/dev/null || echo unknown`
1666
uname -v = `(uname -v) 2>/dev/null || echo unknown`
1667

  
1668
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1669
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1670

  
1671
/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1672
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1673
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1674
/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1675
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1676
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1677
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1678

  
1679
_ASUNAME
1680

  
1681
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1682
for as_dir in $PATH
1683
do
1684
  IFS=$as_save_IFS
1685
  test -z "$as_dir" && as_dir=.
1686
    $as_echo "PATH: $as_dir"
1687
  done
1688
IFS=$as_save_IFS
1689

  
1690
} >&5
1691

  
1692
cat >&5 <<_ACEOF
1693

  
1694

  
1695
## ----------- ##
1696
## Core tests. ##
1697
## ----------- ##
1698

  
1699
_ACEOF
1700

  
1701

  
1702
# Keep a trace of the command line.
1703
# Strip out --no-create and --no-recursion so they do not pile up.
1704
# Strip out --silent because we don't want to record it for future runs.
1705
# Also quote any args containing shell meta-characters.
1706
# Make two passes to allow for proper duplicate-argument suppression.
1707
ac_configure_args=
1708
ac_configure_args0=
1709
ac_configure_args1=
1710
ac_must_keep_next=false
1711
for ac_pass in 1 2
1712
do
1713
  for ac_arg
1714
  do
1715
    case $ac_arg in
1716
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1717
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1718
    | -silent | --silent | --silen | --sile | --sil)
1719
      continue ;;
1720
    *\'*)
1721
      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1722
    esac
1723
    case $ac_pass in
1724
    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1725
    2)
1726
      as_fn_append ac_configure_args1 " '$ac_arg'"
1727
      if test $ac_must_keep_next = true; then
1728
	ac_must_keep_next=false # Got value, back to normal.
1729
      else
1730
	case $ac_arg in
1731
	  *=* | --config-cache | -C | -disable-* | --disable-* \
1732
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1733
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1734
	  | -with-* | --with-* | -without-* | --without-* | --x)
1735
	    case "$ac_configure_args0 " in
1736
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1737
	    esac
1738
	    ;;
1739
	  -* ) ac_must_keep_next=true ;;
1740
	esac
1741
      fi
1742
      as_fn_append ac_configure_args " '$ac_arg'"
1743
      ;;
1744
    esac
1745
  done
1746
done
1747
{ ac_configure_args0=; unset ac_configure_args0;}
1748
{ ac_configure_args1=; unset ac_configure_args1;}
1749

  
1750
# When interrupted or exit'd, cleanup temporary files, and complete
1751
# config.log.  We remove comments because anyway the quotes in there
1752
# would cause problems or look ugly.
1753
# WARNING: Use '\'' to represent an apostrophe within the trap.
1754
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1755
trap 'exit_status=$?
1756
  # Save into config.log some information that might help in debugging.
1757
  {
1758
    echo
1759

  
1760
    $as_echo "## ---------------- ##
1761
## Cache variables. ##
1762
## ---------------- ##"
1763
    echo
1764
    # The following way of writing the cache mishandles newlines in values,
1765
(
1766
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1767
    eval ac_val=\$$ac_var
1768
    case $ac_val in #(
1769
    *${as_nl}*)
1770
      case $ac_var in #(
1771
      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1772
$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1773
      esac
1774
      case $ac_var in #(
1775
      _ | IFS | as_nl) ;; #(
1776
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1777
      *) { eval $ac_var=; unset $ac_var;} ;;
1778
      esac ;;
1779
    esac
1780
  done
1781
  (set) 2>&1 |
1782
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1783
    *${as_nl}ac_space=\ *)
1784
      sed -n \
1785
	"s/'\''/'\''\\\\'\'''\''/g;
1786
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1787
      ;; #(
1788
    *)
1789
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1790
      ;;
1791
    esac |
1792
    sort
1793
)
1794
    echo
1795

  
1796
    $as_echo "## ----------------- ##
1797
## Output variables. ##
1798
## ----------------- ##"
1799
    echo
1800
    for ac_var in $ac_subst_vars
1801
    do
1802
      eval ac_val=\$$ac_var
1803
      case $ac_val in
1804
      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1805
      esac
1806
      $as_echo "$ac_var='\''$ac_val'\''"
1807
    done | sort
1808
    echo
1809

  
1810
    if test -n "$ac_subst_files"; then
1811
      $as_echo "## ------------------- ##
1812
## File substitutions. ##
1813
## ------------------- ##"
1814
      echo
1815
      for ac_var in $ac_subst_files
1816
      do
1817
	eval ac_val=\$$ac_var
1818
	case $ac_val in
1819
	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1820
	esac
1821
	$as_echo "$ac_var='\''$ac_val'\''"
1822
      done | sort
1823
      echo
1824
    fi
1825

  
1826
    if test -s confdefs.h; then
1827
      $as_echo "## ----------- ##
1828
## confdefs.h. ##
1829
## ----------- ##"
1830
      echo
1831
      cat confdefs.h
1832
      echo
1833
    fi
1834
    test "$ac_signal" != 0 &&
1835
      $as_echo "$as_me: caught signal $ac_signal"
1836
    $as_echo "$as_me: exit $exit_status"
1837
  } >&5
1838
  rm -f core *.core core.conftest.* &&
1839
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1840
    exit $exit_status
1841
' 0
1842
for ac_signal in 1 2 13 15; do
1843
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1844
done
1845
ac_signal=0
1846

  
1847
# confdefs.h avoids OS command line length limits that DEFS can exceed.
1848
rm -f -r conftest* confdefs.h
1849

  
1850
$as_echo "/* confdefs.h */" > confdefs.h
1851

  
1852
# Predefined preprocessor variables.
1853

  
1854
cat >>confdefs.h <<_ACEOF
1855
#define PACKAGE_NAME "$PACKAGE_NAME"
1856
_ACEOF
1857

  
1858
cat >>confdefs.h <<_ACEOF
1859
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1860
_ACEOF
1861

  
1862
cat >>confdefs.h <<_ACEOF
1863
#define PACKAGE_VERSION "$PACKAGE_VERSION"
1864
_ACEOF
1865

  
1866
cat >>confdefs.h <<_ACEOF
1867
#define PACKAGE_STRING "$PACKAGE_STRING"
1868
_ACEOF
1869

  
1870
cat >>confdefs.h <<_ACEOF
1871
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1872
_ACEOF
1873

  
1874
cat >>confdefs.h <<_ACEOF
1875
#define PACKAGE_URL "$PACKAGE_URL"
1876
_ACEOF
1877

  
1878

  
1879
# Let the site file select an alternate cache file if it wants to.
1880
# Prefer an explicitly selected file to automatically selected ones.
1881
ac_site_file1=NONE
1882
ac_site_file2=NONE
1883
if test -n "$CONFIG_SITE"; then
1884
  # We do not want a PATH search for config.site.
1885
  case $CONFIG_SITE in #((
1886
    -*)  ac_site_file1=./$CONFIG_SITE;;
1887
    */*) ac_site_file1=$CONFIG_SITE;;
1888
    *)   ac_site_file1=./$CONFIG_SITE;;
1889
  esac
1890
elif test "x$prefix" != xNONE; then
1891
  ac_site_file1=$prefix/share/config.site
1892
  ac_site_file2=$prefix/etc/config.site
1893
else
1894
  ac_site_file1=$ac_default_prefix/share/config.site
1895
  ac_site_file2=$ac_default_prefix/etc/config.site
1896
fi
1897
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1898
do
1899
  test "x$ac_site_file" = xNONE && continue
1900
  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1901
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1902
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
1903
    sed 's/^/| /' "$ac_site_file" >&5
1904
    . "$ac_site_file" \
1905
      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1906
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1907
as_fn_error $? "failed to load site script $ac_site_file
1908
See \`config.log' for more details" "$LINENO" 5 ; }
1909
  fi
1910
done
1911

  
1912
if test -r "$cache_file"; then
1913
  # Some versions of bash will fail to source /dev/null (special files
1914
  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
1915
  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1916
    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
1917
$as_echo "$as_me: loading cache $cache_file" >&6;}
1918
    case $cache_file in
1919
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1920
      *)                      . "./$cache_file";;
1921
    esac
1922
  fi
1923
else
1924
  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
1925
$as_echo "$as_me: creating cache $cache_file" >&6;}
1926
  >$cache_file
1927
fi
1928

  
1929
# Check that the precious variables saved in the cache have kept the same
1930
# value.
1931
ac_cache_corrupted=false
1932
for ac_var in $ac_precious_vars; do
1933
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1934
  eval ac_new_set=\$ac_env_${ac_var}_set
1935
  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1936
  eval ac_new_val=\$ac_env_${ac_var}_value
1937
  case $ac_old_set,$ac_new_set in
1938
    set,)
1939
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1940
$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1941
      ac_cache_corrupted=: ;;
1942
    ,set)
1943
      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
1944
$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1945
      ac_cache_corrupted=: ;;
1946
    ,);;
1947
    *)
1948
      if test "x$ac_old_val" != "x$ac_new_val"; then
1949
	# differences in whitespace do not lead to failure.
1950
	ac_old_val_w=`echo x $ac_old_val`
1951
	ac_new_val_w=`echo x $ac_new_val`
1952
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
1953
	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
1954
$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1955
	  ac_cache_corrupted=:
1956
	else
1957
	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1958
$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1959
	  eval $ac_var=\$ac_old_val
1960
	fi
1961
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
1962
$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
1963
	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
1964
$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
1965
      fi;;
1966
  esac
1967
  # Pass precious variables to config.status.
1968
  if test "$ac_new_set" = set; then
1969
    case $ac_new_val in
1970
    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1971
    *) ac_arg=$ac_var=$ac_new_val ;;
1972
    esac
1973
    case " $ac_configure_args " in
1974
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1975
      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
1976
    esac
1977
  fi
1978
done
1979
if $ac_cache_corrupted; then
1980
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1981
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1982
  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
1983
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1984
  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1985
fi
1986
## -------------------- ##
1987
## Main body of script. ##
1988
## -------------------- ##
1989

  
1990
ac_ext=c
1991
ac_cpp='$CPP $CPPFLAGS'
1992
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1993
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1994
ac_compiler_gnu=$ac_cv_c_compiler_gnu
1995

  
1996

  
1997

  
1998
ac_ext=cpp
1999
ac_cpp='$CXXCPP $CPPFLAGS'
2000
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2001
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2002
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2003

  
2004
ac_aux_dir=
2005
for ac_dir in src/utils "$srcdir"/src/utils; do
2006
  if test -f "$ac_dir/install-sh"; then
2007
    ac_aux_dir=$ac_dir
2008
    ac_install_sh="$ac_aux_dir/install-sh -c"
2009
    break
2010
  elif test -f "$ac_dir/install.sh"; then
2011
    ac_aux_dir=$ac_dir
2012
    ac_install_sh="$ac_aux_dir/install.sh -c"
2013
    break
2014
  elif test -f "$ac_dir/shtool"; then
2015
    ac_aux_dir=$ac_dir
2016
    ac_install_sh="$ac_aux_dir/shtool install -c"
2017
    break
2018
  fi
2019
done
2020
if test -z "$ac_aux_dir"; then
2021
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in src/utils \"$srcdir\"/src/utils" "$LINENO" 5
2022
fi
2023

  
2024
# These three variables are undocumented and unsupported,
2025
# and are intended to be withdrawn in a future Autoconf release.
2026
# They can cause serious problems if a builder's source tree is in a directory
2027
# whose full name contains unusual characters.
2028
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2029
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2030
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2031

  
2032

  
2033
# Make sure we can run config.sub.
2034
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2035
  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2036

  
2037
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2038
$as_echo_n "checking build system type... " >&6; }
2039
if test "${ac_cv_build+set}" = set; then :
2040
  $as_echo_n "(cached) " >&6
2041
else
2042
  ac_build_alias=$build_alias
2043
test "x$ac_build_alias" = x &&
2044
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2045
test "x$ac_build_alias" = x &&
2046
  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2047
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2048
  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2049

  
2050
fi
2051
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2052
$as_echo "$ac_cv_build" >&6; }
2053
case $ac_cv_build in
2054
*-*-*) ;;
2055
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
2056
esac
2057
build=$ac_cv_build
2058
ac_save_IFS=$IFS; IFS='-'
2059
set x $ac_cv_build
2060
shift
2061
build_cpu=$1
2062
build_vendor=$2
2063
shift; shift
2064
# Remember, the first character of IFS is used to create $*,
2065
# except with old shells:
2066
build_os=$*
2067
IFS=$ac_save_IFS
2068
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2069

  
2070

  
2071
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2072
$as_echo_n "checking host system type... " >&6; }
2073
if test "${ac_cv_host+set}" = set; then :
2074
  $as_echo_n "(cached) " >&6
2075
else
2076
  if test "x$host_alias" = x; then
2077
  ac_cv_host=$ac_cv_build
2078
else
2079
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2080
    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2081
fi
2082

  
2083
fi
2084
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2085
$as_echo "$ac_cv_host" >&6; }
2086
case $ac_cv_host in
2087
*-*-*) ;;
2088
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
2089
esac
2090
host=$ac_cv_host
2091
ac_save_IFS=$IFS; IFS='-'
2092
set x $ac_cv_host
2093
shift
2094
host_cpu=$1
2095
host_vendor=$2
2096
shift; shift
2097
# Remember, the first character of IFS is used to create $*,
2098
# except with old shells:
2099
host_os=$*
2100
IFS=$ac_save_IFS
2101
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2102

  
2103

  
2104

  
2105
#
2106
# OMNeT++/OMNEST version number
2107
#
2108
OMNETPP_PRODUCT="OMNeT++"
2109
OMNETPP_RELEASE=`cat Version`
2110
OMNETPP_VERSION=`cat Version | sed 's/^.*-//'`
2111
OMNETPP_BUILDID="100611-4b63c38"
2112
OMNETPP_EDITION="Academic Public License -- NOT FOR COMMERCIAL USE"
2113

  
2114
# We'll collect in this variable the components we've detected problems with
2115
OPP_PROBLEM_PACKAGES=
2116

  
2117
#
2118
# Location of various components. They are defined here so that they can be overridden in configure.user.
2119
#
2120

  
2121
# determine OMNETPP_ROOT; note that 'case' branches on *host* platform not the target platform
2122
case $host in
2123
*-*-cygwin*)
2124
    OMNETPP_ROOT=`cygpath -w $OMNETPP_ROOT | sed 's|\\\\|/|g'`
2125
    ;;
2126
*-*-mingw32*)
2127
    OMNETPP_ROOT=`pwd -W`
2128
    ;;
2129
*)
2130
    OMNETPP_ROOT=`pwd`
2131
    ;;
2132
esac
2133

  
2134
OMNETPP_SRC_DIR="$OMNETPP_ROOT/src"
2135
OMNETPP_UI_DIR="$OMNETPP_ROOT/ui"
2136
OMNETPP_UTILS_DIR="$OMNETPP_SRC_DIR/utils"
2137
OMNETPP_DOC_DIR="$OMNETPP_ROOT/doc"
2138
OMNETPP_TEST_DIR="$OMNETPP_ROOT/test"
2139
OMNETPP_IMAGE_PATH="./bitmaps;./images;$OMNETPP_ROOT/images"
2140

  
2141
OMNETPP_BIN_DIR="$OMNETPP_ROOT/bin"
2142
OMNETPP_INCL_DIR="$OMNETPP_ROOT/include"
2143
OMNETPP_OUT_DIR="$OMNETPP_ROOT/out"
2144
OMNETPP_LIB_DIR="$OMNETPP_ROOT/lib"
2145

  
2146
OMNETPP_TKENV_DIR="$OMNETPP_SRC_DIR/tkenv"
2147

  
2148
if test "$cygwin" = yes; then
2149
    MYPWD="$OMNETPP_SRC_DIR/utils/cygpwd"
2150
else
2151
    MYPWD="pwd"
2152
fi
2153

  
2154
#----------------------
2155
# Read user settings (and allow override the above settings)
2156
#----------------------
2157
{ $as_echo "$as_me:${as_lineno-$LINENO}: -----------------------------------------------" >&5
2158
$as_echo "$as_me: -----------------------------------------------" >&6;}
2159
{ $as_echo "$as_me:${as_lineno-$LINENO}: reading configure.user for your custom settings" >&5
2160
$as_echo "$as_me: reading configure.user for your custom settings" >&6;}
2161
{ $as_echo "$as_me:${as_lineno-$LINENO}: -----------------------------------------------" >&5
2162
$as_echo "$as_me: -----------------------------------------------" >&6;}
2163
. ./configure.user
2164

  
2165

  
2166
#
2167
# set default library suffixes. May be already defined
2168
# with system/arch specific values
2169
#
2170
A_LIB_SUFFIX=${A_LIB_SUFFIX:-".a"}
2171
SO_LIB_SUFFIX=${SO_LIB_SUFFIX:-".so"}
2172
DLL_LIB_SUFFIX=${DLL_LIB_SUFFIX:-".dll"}
2173
EXE_SUFFIX=
2174
SHARED_LIB_SUFFIX='$(SO_LIB_SUFFIX)'
2175
LIB_PREFIX="lib"
2176

  
2177
#
2178
#  Figure out target platform
2179
#
2180
if test "$TOOLCHAIN" = "mingw"; then
2181
    # cross compiling for mingw
2182
    mingw=yes
2183
    jni_platform=win32
2184
    PLATFORM=win32.x86
2185
    EXE_SUFFIX=".exe"
2186
    SHARED_LIB_SUFFIX='$(DLL_LIB_SUFFIX)'
2187
    LDFLAGS_ARCH="$LDFLAGS_ARCH -enable-auto-import -shared-libgcc"
2188
else
2189
    jni_platform=$host_os
2190
    case $host in
2191
    *-*-cygwin*)
2192
        cygwin=yes
2193
        jni_platform=win32
2194
        PLATFORM=win32.x86
2195
        EXE_SUFFIX=".exe"
2196
        SHARED_LIB_SUFFIX='$(DLL_LIB_SUFFIX)'
2197
        # on NT, set total stack size
2198
        LDFLAGS_ARCH="$LDFLAGS_ARCH -Xlinker --stack -Xlinker $CYGWIN_STACKSIZE"
2199
        ;;
2200
    *-*-mingw32*)
2201
        mingw=yes
2202
        jni_platform=win32
2203
        PLATFORM=win32.x86
2204
        EXE_SUFFIX=".exe"
2205
        SHARED_LIB_SUFFIX='$(DLL_LIB_SUFFIX)'
2206
        # add default include and lib paths to make it similar to gcc on Linux
2207
        CFLAGS_ARCH="$CFLAGS_ARCH -I/usr/include"
2208
        # on MinGW dll auto importing is used and must be linked with shared gcc and stdc++
2209
        # otherwise exceptions cant be thrown across dll boundaries
2210
        LDFLAGS_ARCH="$LDFLAGS_ARCH -enable-auto-import -shared-libgcc -L/usr/bin -L/usr/lib"
2211
        ;;
2212
    x86_64-*-linux*)
2213
        jni_platform=linux
2214
        PLATFORM=linux.x86_64
2215
        ;;
2216
    *-linux*)
2217
        jni_platform=linux
2218
        PLATFORM=linux.x86
2219
        ;;
2220
    *darwin*)
2221
        jni_platform=
2222
        PLATFORM=macosx
2223
        SO_LIB_SUFFIX=".dylib"
2224
        JNI_LIB_SUFFIX=".jnilib"
2225
        if test "$UNIVERSAL_BINARIES" = "yes"; then
2226
           CFLAGS_ARCH="$CFLAGS_ARCH -arch ppc -arch i386"
2227
           LDFLAGS_ARCH="$LDFLAGS_ARCH -arch ppc -arch i386"
2228
        fi
2229
        # CDT 6.x does not support 64 bit debugging so we force
2230
        # the compiler to build 32 bit executable because on OS X 10.6,
2231
        # gcc builds 64 bit executables by default. After upgrading to
2232
        # CDT 7.0 these lines can be removed.
2233
        CFLAGS_ARCH="$CFLAGS_ARCH -m32"
2234
        LDFLAGS_ARCH="$LDFLAGS_ARCH -m32"
2235
        ;;
2236
    *)
2237
        ;;
2238
    esac
2239
fi
2240

  
2241
JNI_LIB_SUFFIX=${JNI_LIB_SUFFIX:-$SHARED_LIB_SUFFIX}
2242

  
2243
# total stack size on NT defaults to 128MB (will be added to LDFLAGS later):
2244
CYGWIN_STACKSIZE=${CYGWIN_STACKSIZE:-134217728}
2245

  
2246
# Build shared library by default
2247
SHARED_LIBS=${SHARED_LIBS:-yes}
2248

  
2249
#----------------------
2250
# Default flags for values for other variables that come from configure.user.
2251
#----------------------
2252
#----------------------
2253
# pthread for Horizon
2254
#----------------------
2255

  
2256
PTHREAD_CFLAGS="-I /usr/include"
2257
PTHREAD_LIBS="-lpthread"
2258
#----------------------
2259
# Set variables to defaults if not already set.
2260
# Note: ${VAR:-defaultvalue} used below appears to be a POSIX syntax.
2261
#----------------------
2262
# on mingw special debug option is needed to debug with gdb.
2263
if test "$mingw" = "yes"; then
2264
  CFLAGS_DEBUG=${CFLAGS_DEBUG:- -gstabs+ -Wall}
2265
else
2266
  CFLAGS_DEBUG=${CFLAGS_DEBUG:- -g -Wall}
2267
fi
2268

  
2269
CFLAGS_RELEASE=${CFLAGS_RELEASE:- -O2 -DNDEBUG=1}
2270

  
2271
WHOLE_ARCHIVE_ON=
2272
WHOLE_ARCHIVE_OFF=
2273

  
2274
MSGC=${MSGC:-opp_msgc}
2275
NEDTOOL=${NEDTOOL:-nedtool}
2276
MAKEDEPEND=${MAKEDEPEND:-opp_makedep -Y --objdirtree}
2277
LN=${LN:-ln -sf}
2278
MKPATH=${MKPATH:-mkdir -p}
2279
SHLIB_POSTPROCESS=${SHLIB_POSTPROCESS:-opp_shlib_postprocess}
2280

  
2281
#----------------------
2282
# Check compiler
2283
#----------------------
2284

  
2285
if test "$TOOLCHAIN" = "mingw"; then
2286
    cc_candidates="i586-mingw32msvc-gcc"
2287
    cxx_candidates="i586-mingw32msvc-g++"
2288
else
2289
    # icc, icpc: Intel compiler (further ones: Sun Studio: cxx, IBM: xlC)
2290
    cc_candidates="icc gcc cc xlc"
2291
    cxx_candidates="icpc g++ c++ cxx xlC"
2292
fi
2293

  
2294
# the below macros should be present only ONCE in the whole file (otherwise bad things will happen)
2295
ac_ext=c
2296
ac_cpp='$CPP $CPPFLAGS'
2297
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2298
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2299
ac_compiler_gnu=$ac_cv_c_compiler_gnu
2300
if test -n "$ac_tool_prefix"; then
2301
  for ac_prog in $cc_candidates
2302
  do
2303
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2304
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2305
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2306
$as_echo_n "checking for $ac_word... " >&6; }
2307
if test "${ac_cv_prog_CC+set}" = set; then :
2308
  $as_echo_n "(cached) " >&6
2309
else
2310
  if test -n "$CC"; then
2311
  ac_cv_prog_CC="$CC" # Let the user override the test.
2312
else
2313
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2314
for as_dir in $PATH
2315
do
2316
  IFS=$as_save_IFS
2317
  test -z "$as_dir" && as_dir=.
2318
    for ac_exec_ext in '' $ac_executable_extensions; do
2319
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2320
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2321
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2322
    break 2
2323
  fi
2324
done
2325
  done
2326
IFS=$as_save_IFS
2327

  
2328
fi
2329
fi
2330
CC=$ac_cv_prog_CC
2331
if test -n "$CC"; then
2332
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2333
$as_echo "$CC" >&6; }
2334
else
2335
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2336
$as_echo "no" >&6; }
2337
fi
2338

  
2339

  
2340
    test -n "$CC" && break
2341
  done
2342
fi
2343
if test -z "$CC"; then
2344
  ac_ct_CC=$CC
2345
  for ac_prog in $cc_candidates
2346
do
2347
  # Extract the first word of "$ac_prog", so it can be a program name with args.
2348
set dummy $ac_prog; ac_word=$2
2349
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2350
$as_echo_n "checking for $ac_word... " >&6; }
2351
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2352
  $as_echo_n "(cached) " >&6
2353
else
2354
  if test -n "$ac_ct_CC"; then
2355
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2356
else
2357
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2358
for as_dir in $PATH
2359
do
2360
  IFS=$as_save_IFS
2361
  test -z "$as_dir" && as_dir=.
2362
    for ac_exec_ext in '' $ac_executable_extensions; do
2363
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2364
    ac_cv_prog_ac_ct_CC="$ac_prog"
2365
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2366
    break 2
2367
  fi
2368
done
2369
  done
2370
IFS=$as_save_IFS
2371

  
2372
fi
2373
fi
2374
ac_ct_CC=$ac_cv_prog_ac_ct_CC
2375
if test -n "$ac_ct_CC"; then
2376
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2377
$as_echo "$ac_ct_CC" >&6; }
2378
else
2379
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2380
$as_echo "no" >&6; }
2381
fi
2382

  
2383

  
2384
  test -n "$ac_ct_CC" && break
2385
done
2386

  
2387
  if test "x$ac_ct_CC" = x; then
2388
    CC=""
2389
  else
2390
    case $cross_compiling:$ac_tool_warned in
2391
yes:)
2392
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2393
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2394
ac_tool_warned=yes ;;
2395
esac
2396
    CC=$ac_ct_CC
2397
  fi
2398
fi
2399

  
2400

  
2401
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2402
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2403
as_fn_error $? "no acceptable C compiler found in \$PATH
2404
See \`config.log' for more details" "$LINENO" 5 ; }
2405

  
2406
# Provide some information about the compiler.
2407
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2408
set X $ac_compile
2409
ac_compiler=$2
2410
for ac_option in --version -v -V -qversion; do
2411
  { { ac_try="$ac_compiler $ac_option >&5"
2412
case "(($ac_try" in
2413
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2414
  *) ac_try_echo=$ac_try;;
2415
esac
2416
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2417
$as_echo "$ac_try_echo"; } >&5
2418
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2419
  ac_status=$?
2420
  if test -s conftest.err; then
2421
    sed '10a\
2422
... rest of stderr output deleted ...
2423
         10q' conftest.err >conftest.er1
2424
    cat conftest.er1 >&5
2425
  fi
2426
  rm -f conftest.er1 conftest.err
2427
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2428
  test $ac_status = 0; }
2429
done
2430

  
2431
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432
/* end confdefs.h.  */
2433

  
2434
int
2435
main ()
2436
{
2437

  
2438
  ;
2439
  return 0;
2440
}
2441
_ACEOF
2442
ac_clean_files_save=$ac_clean_files
2443
ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2444
# Try to create an executable without -o first, disregard a.out.
2445
# It will help us diagnose broken compilers, and finding out an intuition
2446
# of exeext.
2447
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2448
$as_echo_n "checking whether the C compiler works... " >&6; }
2449
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2450

  
2451
# The possible output files:
2452
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2453

  
2454
ac_rmfiles=
2455
for ac_file in $ac_files
2456
do
2457
  case $ac_file in
2458
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2459
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2460
  esac
2461
done
2462
rm -f $ac_rmfiles
2463

  
2464
if { { ac_try="$ac_link_default"
2465
case "(($ac_try" in
2466
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2467
  *) ac_try_echo=$ac_try;;
2468
esac
2469
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2470
$as_echo "$ac_try_echo"; } >&5
2471
  (eval "$ac_link_default") 2>&5
2472
  ac_status=$?
2473
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2474
  test $ac_status = 0; }; then :
2475
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2476
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2477
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2478
# so that the user can short-circuit this test for compilers unknown to
2479
# Autoconf.
2480
for ac_file in $ac_files ''
2481
do
2482
  test -f "$ac_file" || continue
2483
  case $ac_file in
2484
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2485
	;;
2486
    [ab].out )
2487
	# We found the default executable, but exeext='' is most
2488
	# certainly right.
2489
	break;;
2490
    *.* )
2491
	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2492
	then :; else
2493
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2494
	fi
2495
	# We set ac_cv_exeext here because the later test for it is not
2496
	# safe: cross compilers may not add the suffix if given an `-o'
2497
	# argument, so we may need to know it at that point already.
2498
	# Even if this section looks crufty: it has the advantage of
2499
	# actually working.
2500
	break;;
2501
    * )
2502
	break;;
2503
  esac
2504
done
2505
test "$ac_cv_exeext" = no && ac_cv_exeext=
2506

  
2507
else
2508
  ac_file=''
2509
fi
2510
if test -z "$ac_file"; then :
2511
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2512
$as_echo "no" >&6; }
2513
$as_echo "$as_me: failed program was:" >&5
2514
sed 's/^/| /' conftest.$ac_ext >&5
2515

  
2516
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2517
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2518
as_fn_error 77 "C compiler cannot create executables
2519
See \`config.log' for more details" "$LINENO" 5 ; }
2520
else
2521
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2522
$as_echo "yes" >&6; }
2523
fi
2524
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2525
$as_echo_n "checking for C compiler default output file name... " >&6; }
2526
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2527
$as_echo "$ac_file" >&6; }
2528
ac_exeext=$ac_cv_exeext
2529

  
2530
rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2531
ac_clean_files=$ac_clean_files_save
2532
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2533
$as_echo_n "checking for suffix of executables... " >&6; }
2534
if { { ac_try="$ac_link"
2535
case "(($ac_try" in
2536
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2537
  *) ac_try_echo=$ac_try;;
2538
esac
2539
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2540
$as_echo "$ac_try_echo"; } >&5
2541
  (eval "$ac_link") 2>&5
2542
  ac_status=$?
2543
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2544
  test $ac_status = 0; }; then :
2545
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2546
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2547
# work properly (i.e., refer to `conftest.exe'), while it won't with
2548
# `rm'.
2549
for ac_file in conftest.exe conftest conftest.*; do
2550
  test -f "$ac_file" || continue
2551
  case $ac_file in
2552
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2553
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2554
	  break;;
2555
    * ) break;;
2556
  esac
2557
done
2558
else
2559
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2560
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2561
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2562
See \`config.log' for more details" "$LINENO" 5 ; }
2563
fi
2564
rm -f conftest conftest$ac_cv_exeext
2565
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2566
$as_echo "$ac_cv_exeext" >&6; }
2567

  
2568
rm -f conftest.$ac_ext
2569
EXEEXT=$ac_cv_exeext
2570
ac_exeext=$EXEEXT
2571
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2572
/* end confdefs.h.  */
2573
#include <stdio.h>
2574
int
2575
main ()
2576
{
2577
FILE *f = fopen ("conftest.out", "w");
2578
 return ferror (f) || fclose (f) != 0;
2579

  
2580
  ;
2581
  return 0;
2582
}
2583
_ACEOF
2584
ac_clean_files="$ac_clean_files conftest.out"
2585
# Check that the compiler produces executables we can run.  If not, either
2586
# the compiler is broken, or we cross compile.
2587
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2588
$as_echo_n "checking whether we are cross compiling... " >&6; }
2589
if test "$cross_compiling" != yes; then
2590
  { { ac_try="$ac_link"
2591
case "(($ac_try" in
2592
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2593
  *) ac_try_echo=$ac_try;;
2594
esac
2595
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2596
$as_echo "$ac_try_echo"; } >&5
2597
  (eval "$ac_link") 2>&5
2598
  ac_status=$?
2599
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2600
  test $ac_status = 0; }
2601
  if { ac_try='./conftest$ac_cv_exeext'
2602
  { { case "(($ac_try" in
2603
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2604
  *) ac_try_echo=$ac_try;;
2605
esac
2606
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2607
$as_echo "$ac_try_echo"; } >&5
2608
  (eval "$ac_try") 2>&5
2609
  ac_status=$?
2610
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2611
  test $ac_status = 0; }; }; then
2612
    cross_compiling=no
2613
  else
2614
    if test "$cross_compiling" = maybe; then
2615
	cross_compiling=yes
2616
    else
2617
	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2618
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2619
as_fn_error $? "cannot run C compiled programs.
2620
If you meant to cross compile, use \`--host'.
2621
See \`config.log' for more details" "$LINENO" 5 ; }
2622
    fi
2623
  fi
2624
fi
2625
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2626
$as_echo "$cross_compiling" >&6; }
2627

  
2628
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2629
ac_clean_files=$ac_clean_files_save
2630
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2631
$as_echo_n "checking for suffix of object files... " >&6; }
2632
if test "${ac_cv_objext+set}" = set; then :
2633
  $as_echo_n "(cached) " >&6
2634
else
2635
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2636
/* end confdefs.h.  */
2637

  
2638
int
2639
main ()
2640
{
2641

  
2642
  ;
2643
  return 0;
2644
}
2645
_ACEOF
2646
rm -f conftest.o conftest.obj
2647
if { { ac_try="$ac_compile"
2648
case "(($ac_try" in
2649
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2650
  *) ac_try_echo=$ac_try;;
2651
esac
2652
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2653
$as_echo "$ac_try_echo"; } >&5
2654
  (eval "$ac_compile") 2>&5
2655
  ac_status=$?
2656
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2657
  test $ac_status = 0; }; then :
2658
  for ac_file in conftest.o conftest.obj conftest.*; do
2659
  test -f "$ac_file" || continue;
2660
  case $ac_file in
2661
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2662
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2663
       break;;
2664
  esac
2665
done
2666
else
2667
  $as_echo "$as_me: failed program was:" >&5
2668
sed 's/^/| /' conftest.$ac_ext >&5
2669

  
2670
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672
as_fn_error $? "cannot compute suffix of object files: cannot compile
2673
See \`config.log' for more details" "$LINENO" 5 ; }
2674
fi
2675
rm -f conftest.$ac_cv_objext conftest.$ac_ext
2676
fi
2677
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2678
$as_echo "$ac_cv_objext" >&6; }
2679
OBJEXT=$ac_cv_objext
2680
ac_objext=$OBJEXT
2681
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2682
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2683
if test "${ac_cv_c_compiler_gnu+set}" = set; then :
2684
  $as_echo_n "(cached) " >&6
2685
else
2686
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687
/* end confdefs.h.  */
2688

  
2689
int
2690
main ()
2691
{
2692
#ifndef __GNUC__
2693
       choke me
2694
#endif
2695

  
2696
  ;
2697
  return 0;
2698
}
2699
_ACEOF
2700
if ac_fn_c_try_compile "$LINENO"; then :
2701
  ac_compiler_gnu=yes
2702
else
2703
  ac_compiler_gnu=no
2704
fi
2705
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706
ac_cv_c_compiler_gnu=$ac_compiler_gnu
2707

  
2708
fi
2709
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2710
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
2711
if test $ac_compiler_gnu = yes; then
2712
  GCC=yes
2713
else
2714
  GCC=
2715
fi
2716
ac_test_CFLAGS=${CFLAGS+set}
2717
ac_save_CFLAGS=$CFLAGS
2718
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2719
$as_echo_n "checking whether $CC accepts -g... " >&6; }
2720
if test "${ac_cv_prog_cc_g+set}" = set; then :
2721
  $as_echo_n "(cached) " >&6
2722
else
2723
  ac_save_c_werror_flag=$ac_c_werror_flag
2724
   ac_c_werror_flag=yes
2725
   ac_cv_prog_cc_g=no
2726
   CFLAGS="-g"
2727
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728
/* end confdefs.h.  */
2729

  
2730
int
2731
main ()
2732
{
2733

  
2734
  ;
2735
  return 0;
2736
}
2737
_ACEOF
2738
if ac_fn_c_try_compile "$LINENO"; then :
2739
  ac_cv_prog_cc_g=yes
2740
else
2741
  CFLAGS=""
2742
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2743
/* end confdefs.h.  */
2744

  
2745
int
2746
main ()
2747
{
2748

  
2749
  ;
2750
  return 0;
2751
}
2752
_ACEOF
2753
if ac_fn_c_try_compile "$LINENO"; then :
2754

  
2755
else
2756
  ac_c_werror_flag=$ac_save_c_werror_flag
2757
	 CFLAGS="-g"
2758
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759
/* end confdefs.h.  */
2760

  
2761
int
2762
main ()
2763
{
2764

  
2765
  ;
2766
  return 0;
2767
}
2768
_ACEOF
2769
if ac_fn_c_try_compile "$LINENO"; then :
2770
  ac_cv_prog_cc_g=yes
2771
fi
2772
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2773
fi
2774
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2775
fi
2776
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2777
   ac_c_werror_flag=$ac_save_c_werror_flag
2778
fi
2779
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2780
$as_echo "$ac_cv_prog_cc_g" >&6; }
2781
if test "$ac_test_CFLAGS" = set; then
2782
  CFLAGS=$ac_save_CFLAGS
2783
elif test $ac_cv_prog_cc_g = yes; then
2784
  if test "$GCC" = yes; then
2785
    CFLAGS="-g -O2"
2786
  else
2787
    CFLAGS="-g"
2788
  fi
2789
else
2790
  if test "$GCC" = yes; then
2791
    CFLAGS="-O2"
2792
  else
2793
    CFLAGS=
2794
  fi
2795
fi
2796
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2797
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2798
if test "${ac_cv_prog_cc_c89+set}" = set; then :
2799
  $as_echo_n "(cached) " >&6
2800
else
2801
  ac_cv_prog_cc_c89=no
2802
ac_save_CC=$CC
2803
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804
/* end confdefs.h.  */
2805
#include <stdarg.h>
2806
#include <stdio.h>
2807
#include <sys/types.h>
2808
#include <sys/stat.h>
2809
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2810
struct buf { int x; };
2811
FILE * (*rcsopen) (struct buf *, struct stat *, int);
2812
static char *e (p, i)
2813
     char **p;
2814
     int i;
2815
{
2816
  return p[i];
2817
}
2818
static char *f (char * (*g) (char **, int), char **p, ...)
2819
{
2820
  char *s;
2821
  va_list v;
2822
  va_start (v,p);
2823
  s = g (p, va_arg (v,int));
2824
  va_end (v);
2825
  return s;
2826
}
2827

  
2828
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2829
   function prototypes and stuff, but not '\xHH' hex character constants.
2830
   These don't provoke an error unfortunately, instead are silently treated
2831
   as 'x'.  The following induces an error, until -std is added to get
2832
   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2833
   array size at least.  It's necessary to write '\x00'==0 to get something
2834
   that's true only with -std.  */
2835
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2836

  
2837
/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2838
   inside strings and character constants.  */
2839
#define FOO(x) 'x'
2840
int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
2841

  
2842
int test (int i, double x);
2843
struct s1 {int (*f) (int a);};
2844
struct s2 {int (*f) (double a);};
2845
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2846
int argc;
2847
char **argv;
2848
int
2849
main ()
2850
{
2851
return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2852
  ;
2853
  return 0;
2854
}
2855
_ACEOF
2856
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2857
	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2858
do
2859
  CC="$ac_save_CC $ac_arg"
2860
  if ac_fn_c_try_compile "$LINENO"; then :
2861
  ac_cv_prog_cc_c89=$ac_arg
2862
fi
2863
rm -f core conftest.err conftest.$ac_objext
2864
  test "x$ac_cv_prog_cc_c89" != "xno" && break
2865
done
2866
rm -f conftest.$ac_ext
2867
CC=$ac_save_CC
2868

  
2869
fi
2870
# AC_CACHE_VAL
2871
case "x$ac_cv_prog_cc_c89" in
2872
  x)
2873
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2874
$as_echo "none needed" >&6; } ;;
2875
  xno)
2876
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2877
$as_echo "unsupported" >&6; } ;;
2878
  *)
2879
    CC="$CC $ac_cv_prog_cc_c89"
2880
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2881
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2882
esac
2883
if test "x$ac_cv_prog_cc_c89" != xno; then :
2884

  
2885
fi
2886

  
2887
ac_ext=cpp
2888
ac_cpp='$CXXCPP $CPPFLAGS'
2889
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2890
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2891
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2892

  
2893
ac_ext=cpp
2894
ac_cpp='$CXXCPP $CPPFLAGS'
2895
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2896
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2897
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2898
if test -z "$CXX"; then
2899
  if test -n "$CCC"; then
2900
    CXX=$CCC
2901
  else
2902
    if test -n "$ac_tool_prefix"; then
2903
  for ac_prog in $cxx_candidates
2904
  do
2905
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2906
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2907
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2908
$as_echo_n "checking for $ac_word... " >&6; }
2909
if test "${ac_cv_prog_CXX+set}" = set; then :
2910
  $as_echo_n "(cached) " >&6
2911
else
2912
  if test -n "$CXX"; then
2913
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2914
else
2915
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2916
for as_dir in $PATH
2917
do
2918
  IFS=$as_save_IFS
2919
  test -z "$as_dir" && as_dir=.
2920
    for ac_exec_ext in '' $ac_executable_extensions; do
2921
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2922
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2923
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2924
    break 2
2925
  fi
2926
done
2927
  done
2928
IFS=$as_save_IFS
2929

  
2930
fi
2931
fi
2932
CXX=$ac_cv_prog_CXX
2933
if test -n "$CXX"; then
2934
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
2935
$as_echo "$CXX" >&6; }
2936
else
2937
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2938
$as_echo "no" >&6; }
2939
fi
2940

  
2941

  
2942
    test -n "$CXX" && break
2943
  done
2944
fi
2945
if test -z "$CXX"; then
2946
  ac_ct_CXX=$CXX
2947
  for ac_prog in $cxx_candidates
2948
do
2949
  # Extract the first word of "$ac_prog", so it can be a program name with args.
2950
set dummy $ac_prog; ac_word=$2
2951
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2952
$as_echo_n "checking for $ac_word... " >&6; }
2953
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
2954
  $as_echo_n "(cached) " >&6
2955
else
2956
  if test -n "$ac_ct_CXX"; then
2957
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2958
else
2959
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2960
for as_dir in $PATH
2961
do
2962
  IFS=$as_save_IFS
2963
  test -z "$as_dir" && as_dir=.
2964
    for ac_exec_ext in '' $ac_executable_extensions; do
2965
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2966
    ac_cv_prog_ac_ct_CXX="$ac_prog"
2967
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2968
    break 2
2969
  fi
2970
done
2971
  done
2972
IFS=$as_save_IFS
2973

  
2974
fi
2975
fi
2976
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2977
if test -n "$ac_ct_CXX"; then
2978
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
2979
$as_echo "$ac_ct_CXX" >&6; }
2980
else
2981
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2982
$as_echo "no" >&6; }
2983
fi
2984

  
2985

  
2986
  test -n "$ac_ct_CXX" && break
2987
done
2988

  
2989
  if test "x$ac_ct_CXX" = x; then
2990
    CXX="g++"
2991
  else
2992
    case $cross_compiling:$ac_tool_warned in
2993
yes:)
2994
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2995
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2996
ac_tool_warned=yes ;;
2997
esac
2998
    CXX=$ac_ct_CXX
2999
  fi
3000
fi
3001

  
3002
  fi
3003
fi
3004
# Provide some information about the compiler.
3005
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3006
set X $ac_compile
3007
ac_compiler=$2
3008
for ac_option in --version -v -V -qversion; do
3009
  { { ac_try="$ac_compiler $ac_option >&5"
3010
case "(($ac_try" in
3011
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3012
  *) ac_try_echo=$ac_try;;
3013
esac
3014
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3015
$as_echo "$ac_try_echo"; } >&5
3016
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3017
  ac_status=$?
3018
  if test -s conftest.err; then
3019
    sed '10a\
3020
... rest of stderr output deleted ...
3021
         10q' conftest.err >conftest.er1
3022
    cat conftest.er1 >&5
3023
  fi
3024
  rm -f conftest.er1 conftest.err
3025
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3026
  test $ac_status = 0; }
3027
done
3028

  
3029
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3030
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3031
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
3032
  $as_echo_n "(cached) " >&6
3033
else
3034
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3035
/* end confdefs.h.  */
3036

  
3037
int
3038
main ()
3039
{
3040
#ifndef __GNUC__
3041
       choke me
3042
#endif
3043

  
3044
  ;
3045
  return 0;
3046
}
3047
_ACEOF
3048
if ac_fn_cxx_try_compile "$LINENO"; then :
3049
  ac_compiler_gnu=yes
3050
else
3051
  ac_compiler_gnu=no
3052
fi
3053
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3054
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3055

  
3056
fi
3057
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3058
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3059
if test $ac_compiler_gnu = yes; then
3060
  GXX=yes
3061
else
3062
  GXX=
3063
fi
3064
ac_test_CXXFLAGS=${CXXFLAGS+set}
3065
ac_save_CXXFLAGS=$CXXFLAGS
3066
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3067
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3068
if test "${ac_cv_prog_cxx_g+set}" = set; then :
3069
  $as_echo_n "(cached) " >&6
3070
else
3071
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3072
   ac_cxx_werror_flag=yes
3073
   ac_cv_prog_cxx_g=no
3074
   CXXFLAGS="-g"
3075
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3076
/* end confdefs.h.  */
3077

  
3078
int
3079
main ()
3080
{
3081

  
3082
  ;
3083
  return 0;
3084
}
3085
_ACEOF
3086
if ac_fn_cxx_try_compile "$LINENO"; then :
3087
  ac_cv_prog_cxx_g=yes
3088
else
3089
  CXXFLAGS=""
3090
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3091
/* end confdefs.h.  */
3092

  
3093
int
3094
main ()
3095
{
3096

  
3097
  ;
3098
  return 0;
3099
}
3100
_ACEOF
3101
if ac_fn_cxx_try_compile "$LINENO"; then :
3102

  
3103
else
3104
  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3105
	 CXXFLAGS="-g"
3106
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3107
/* end confdefs.h.  */
3108

  
3109
int
3110
main ()
3111
{
3112

  
3113
  ;
3114
  return 0;
3115
}
3116
_ACEOF
3117
if ac_fn_cxx_try_compile "$LINENO"; then :
3118
  ac_cv_prog_cxx_g=yes
3119
fi
3120
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3121
fi
3122
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3123
fi
3124
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3125
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3126
fi
3127
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3128
$as_echo "$ac_cv_prog_cxx_g" >&6; }
3129
if test "$ac_test_CXXFLAGS" = set; then
3130
  CXXFLAGS=$ac_save_CXXFLAGS
3131
elif test $ac_cv_prog_cxx_g = yes; then
3132
  if test "$GXX" = yes; then
3133
    CXXFLAGS="-g -O2"
3134
  else
3135
    CXXFLAGS="-g"
3136
  fi
3137
else
3138
  if test "$GXX" = yes; then
3139
    CXXFLAGS="-O2"
3140
  else
3141
    CXXFLAGS=
3142
  fi
3143
fi
3144
ac_ext=cpp
3145
ac_cpp='$CXXCPP $CPPFLAGS'
3146
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3147
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3148
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3149

  
3150

  
3151
# Extract the first word of "$CXX", so it can be a program name with args.
3152
set dummy $CXX; ac_word=$2
3153
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3154
$as_echo_n "checking for $ac_word... " >&6; }
3155
if test "${ac_cv_prog_tmp_CXX+set}" = set; then :
3156
  $as_echo_n "(cached) " >&6
3157
else
3158
  if test -n "$tmp_CXX"; then
3159
  ac_cv_prog_tmp_CXX="$tmp_CXX" # Let the user override the test.
3160
else
3161
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3162
for as_dir in $PATH
3163
do
3164
  IFS=$as_save_IFS
3165
  test -z "$as_dir" && as_dir=.
3166
    for ac_exec_ext in '' $ac_executable_extensions; do
3167
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3168
    ac_cv_prog_tmp_CXX="$CXX"
3169
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3170
    break 2
3171
  fi
3172
done
3173
  done
3174
IFS=$as_save_IFS
3175

  
3176
  test -z "$ac_cv_prog_tmp_CXX" && ac_cv_prog_tmp_CXX="not found"
3177
fi
3178
fi
3179
tmp_CXX=$ac_cv_prog_tmp_CXX
3180
if test -n "$tmp_CXX"; then
3181
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tmp_CXX" >&5
3182
$as_echo "$tmp_CXX" >&6; }
3183
else
3184
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185
$as_echo "no" >&6; }
3186
fi
3187

  
3188

  
3189
if test "$tmp_CXX" = "not found"; then
3190
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES g++"
3191
   as_fn_error $? "No C++ compiler found -- one is required to build OMNeT++/OMNEST, and also for model development." "$LINENO" 5
3192
fi
3193

  
3194
if test "$TOOLCHAIN" = "mingw"; then
3195
    AS=${AS:-i586-mingw32msvc-as}
3196
    AR=${AR:-i586-mingw32msvc-ar cr}
3197
    SHLIB_LD=${SHLIB_LD:-$CXX -shared}
3198
    DLLTOOL=${DLLTOOL:-i586-mingw32msvc-dlltool}
3199
    STRIP=${STRIP:-i586-mingw32msvc-strip}
3200
    RANLIB=${RANLIB:-i586-mingw32msvc-ranlib}
3201
else
3202
    if test "$CXX" = "icpc"; then
3203
        # disable useless warnings and 'remarks' with the Intel compiler:
3204
        #
3205
        # warning #654: overloaded virtual function "NEDElement::setAttribute" is only partially overridden
3206
        # warning #177: label "yyerrlab1" was declared but never referenced
3207
        # remark #869: parameter "node" was never referenced
3208
        # remark #981: operands are evaluated in unspecified order
3209
        # remark #279: controlling expression is constant  (occurs in unfinished cppmsggenerator.cc code)
3210
        # remark #1572: floating-point equality and inequality comparisons are unreliable
3211
        # remark #424: extra ";" ignored
3212
        # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability..
3213
        # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability..
3214
        # remark #810: conversion from "unsigned int" to "char" may lose significant bits
3215
        # remark #810: conversion from "long" to "double" may lose significant bits
3216
        # remark #1418: external definition with no prior declaration
3217
        # remark #1419: external declaration in primary source file
3218
        # remark #383: value copied to temporary, reference to temporary used
3219
        #
3220
        #CFLAGS="$CFLAGS -wd654 -wd177 -wd869 -wd981 -wd279 -wd1572 -wd424 -wd1682 -wd1683 -wd810 -wd1418 -wd1419"
3221

  
3222
        # -w1 disables all remarks
3223
        CFLAGS_DEBUG="$CFLAGS_DEBUG -w1 -wd654 -wd177"
3224
        CFLAGS_RELEASE="$CFLAGS_RELEASE -w1 -wd654 -wd177"
3225
    fi
3226
    AS=${AS:-as}
3227
    AR=${AR:-ar cr}
3228
    if test "$PLATFORM" = "macosx"; then
3229
        SHLIB_LD=${SHLIB_LD:-$CXX -dynamiclib}
3230
    else
3231
        SHLIB_LD=${SHLIB_LD:-$CXX -shared}
3232
    fi
3233
    DLLTOOL=${DLLTOOL:-dlltool}
3234
    STRIP=${STRIP:-strip}
3235
    if test -n "$ac_tool_prefix"; then
3236
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3237
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3238
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3239
$as_echo_n "checking for $ac_word... " >&6; }
3240
if test "${ac_cv_prog_RANLIB+set}" = set; then :
3241
  $as_echo_n "(cached) " >&6
3242
else
3243
  if test -n "$RANLIB"; then
3244
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3245
else
3246
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247
for as_dir in $PATH
3248
do
3249
  IFS=$as_save_IFS
3250
  test -z "$as_dir" && as_dir=.
3251
    for ac_exec_ext in '' $ac_executable_extensions; do
3252
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3253
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3254
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3255
    break 2
3256
  fi
3257
done
3258
  done
3259
IFS=$as_save_IFS
3260

  
3261
fi
3262
fi
3263
RANLIB=$ac_cv_prog_RANLIB
3264
if test -n "$RANLIB"; then
3265
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
3266
$as_echo "$RANLIB" >&6; }
3267
else
3268
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3269
$as_echo "no" >&6; }
3270
fi
3271

  
3272

  
3273
fi
3274
if test -z "$ac_cv_prog_RANLIB"; then
3275
  ac_ct_RANLIB=$RANLIB
3276
  # Extract the first word of "ranlib", so it can be a program name with args.
3277
set dummy ranlib; ac_word=$2
3278
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3279
$as_echo_n "checking for $ac_word... " >&6; }
3280
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
3281
  $as_echo_n "(cached) " >&6
3282
else
3283
  if test -n "$ac_ct_RANLIB"; then
3284
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3285
else
3286
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3287
for as_dir in $PATH
3288
do
3289
  IFS=$as_save_IFS
3290
  test -z "$as_dir" && as_dir=.
3291
    for ac_exec_ext in '' $ac_executable_extensions; do
3292
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3293
    ac_cv_prog_ac_ct_RANLIB="ranlib"
3294
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3295
    break 2
3296
  fi
3297
done
3298
  done
3299
IFS=$as_save_IFS
3300

  
3301
fi
3302
fi
3303
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3304
if test -n "$ac_ct_RANLIB"; then
3305
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
3306
$as_echo "$ac_ct_RANLIB" >&6; }
3307
else
3308
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3309
$as_echo "no" >&6; }
3310
fi
3311

  
3312
  if test "x$ac_ct_RANLIB" = x; then
3313
    RANLIB=":"
3314
  else
3315
    case $cross_compiling:$ac_tool_warned in
3316
yes:)
3317
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3318
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3319
ac_tool_warned=yes ;;
3320
esac
3321
    RANLIB=$ac_ct_RANLIB
3322
  fi
3323
else
3324
  RANLIB="$ac_cv_prog_RANLIB"
3325
fi
3326

  
3327
fi
3328

  
3329

  
3330
# determine toolchain name, used in opp_makemake-generated Makefiles as part of the linker path
3331
if test "$TOOLCHAIN_NAME" = ""; then
3332
    if test "$mingw" = yes; then
3333
        TOOLCHAIN_NAME="gcc"
3334
    elif test "$cygwin" = yes; then
3335
        TOOLCHAIN_NAME="cygwin"
3336
    else
3337
        # toolchain name: compiler ($CC) without path
3338
        # note: doubling the brackets is needed, otherwise M4 swallows them!
3339
        TOOLCHAIN_NAME=`echo $CC | sed 's!^.*/!!g' | sed 's![ :]!_!'g`
3340
    fi
3341
fi
3342

  
3343
#----------------------
3344
# check and disable stack checking to avoid opplibs.so dependence on glibc 2.4
3345
#----------------------
3346

  
3347

  
3348
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fno-stack-protector" >&5
3349
$as_echo_n "checking whether $CXX supports -fno-stack-protector... " >&6; }
3350
    ac_save_CXX="$CXX"
3351
    CXX="$CXX -fno-stack-protector"
3352
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3353
/* end confdefs.h.  */
3354

  
3355
int
3356
main ()
3357
{
3358

  
3359
  ;
3360
  return 0;
3361
}
3362
_ACEOF
3363
if ac_fn_cxx_try_compile "$LINENO"; then :
3364

  
3365
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3366
$as_echo "yes" >&6; }
3367

  
3368
        CXX="$ac_save_CXX"
3369
        CFLAGS_RELEASE="$CFLAGS_RELEASE -fno-stack-protector"
3370

  
3371
else
3372

  
3373
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3374
$as_echo "no" >&6; }
3375
        CXX="$ac_save_CXX"
3376

  
3377

  
3378
fi
3379
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3380

  
3381

  
3382
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fno-stack-protector" >&5
3383
$as_echo_n "checking whether $CXX supports -fno-stack-protector... " >&6; }
3384
    ac_save_CXX="$CXX"
3385
    CXX="$CXX -fno-stack-protector"
3386
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3387
/* end confdefs.h.  */
3388

  
3389
int
3390
main ()
3391
{
3392

  
3393
  ;
3394
  return 0;
3395
}
3396
_ACEOF
3397
if ac_fn_cxx_try_compile "$LINENO"; then :
3398

  
3399
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3400
$as_echo "yes" >&6; }
3401

  
3402
        CXX="$ac_save_CXX"
3403
        CFLAGS_DEBUG="$CFLAGS_DEBUG -fno-stack-protector"
3404

  
3405
else
3406

  
3407
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3408
$as_echo "no" >&6; }
3409
        CXX="$ac_save_CXX"
3410

  
3411

  
3412
fi
3413
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3414

  
3415

  
3416
#----------------------
3417
# Test if "-fPIC" is needed for shared libs (there's a performance penalty if we use it unnecessarily)
3418
#----------------------
3419
# To test, we try to compile the following code into a shared library:
3420
#      int x;
3421
#      int getX() {return x;}
3422
#
3423

  
3424
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if shared libs need -fPIC" >&5
3425
$as_echo_n "checking if shared libs need -fPIC... " >&6; }
3426
echo 'int x;' >conftest.cc
3427
echo 'int getX() {return x;}' >>conftest.cc
3428
fpic="x"
3429
if echo $CFLAGS_DEBUG | grep -i -- "-fPIC" >/dev/null 2>/dev/null; then
3430
   if echo $CFLAGS_RELEASE | grep -i -- "-fPIC" >/dev/null 2>/dev/null; then
3431
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: skip (already in CFLAGS)" >&5
3432
$as_echo "skip (already in CFLAGS)" >&6; }
3433
        fpic=""
3434
   fi
3435
fi
3436
if test "$fpic" = "x" && \
3437
   $CXX -c conftest.cc >/dev/null 2>/dev/null && \
3438
   $SHLIB_LD -o conftest.so conftest.o >/dev/null 2>/dev/null; \
3439
then
3440
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3441
$as_echo "no" >&6; }
3442
   fpic=""
3443
fi
3444
if test "$fpic" = "x" && \
3445
   $CXX -fPIC -c conftest.cc >/dev/null 2>/dev/null && \
3446
   $SHLIB_LD -fPIC -o conftest.so conftest.o >/dev/null 2>/dev/null; \
3447
then
3448
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3449
$as_echo "yes" >&6; }
3450
   fpic="-fPIC"
3451
fi
3452
if test "$fpic" = "x" && \
3453
   $CXX -fpic -c conftest.cc >/dev/null 2>/dev/null && \
3454
   $SHLIB_LD -fpic -o conftest.so conftest.o >/dev/null 2>/dev/null; \
3455
then
3456
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -fpic" >&5
3457
$as_echo "-fpic" >&6; }
3458
   fpic="-fpic"
3459
fi
3460
if test "$fpic" = "x"; then
3461
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failure" >&5
3462
$as_echo "failure" >&6; }
3463
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: COULD NOT FIGURE OUT HOW TO BUILD SHARED LIBRARY -- reverting to static libs" >&5
3464
$as_echo "$as_me: WARNING: COULD NOT FIGURE OUT HOW TO BUILD SHARED LIBRARY -- reverting to static libs" >&2;}
3465
   SHARED_LIBS="no"
3466
else
3467
   CFLAGS_DEBUG="$CFLAGS_DEBUG $fpic"
3468
   CFLAGS_RELEASE="$CFLAGS_RELEASE $fpic"
3469
   SHLIB_LD="$SHLIB_LD $fpic"
3470
fi
3471
rm -f conftest.*
3472

  
3473

  
3474
#----------------------
3475
# Test if --export-dynamic or -E linker option is accepted and/or needed
3476
#----------------------
3477
# We want to be able to dynamically load extensions into simulation executables,
3478
# so we need to ensure that all symbols in the executable are visible to
3479
# dynamically loaded libraries. However, not all linkers need or support
3480
# --export-dynamic.
3481
# Strategy: we'll compile the following program into a shared library:
3482
#      void function_from_main();
3483
#      void some_func() {func_from_main();}
3484
# Then we *independently* compile with the following program:
3485
#      #include <dlfcn.h>
3486
#      void func_from_main() {}
3487
#      int main() {return dlopen("libconftest_a.so",RTLD_NOW)==0;}
3488
# And we expect to be able to run the program successfully.
3489
#
3490

  
3491
# first check if we need "-ldl" for dlopen() [Laura Marie Feeney suggests it's not needed for FreeBSD]
3492

  
3493
   save_CXXFLAGS=$CXXFLAGS
3494
   save_LIBS=$LIBS
3495

  
3496
   CXXFLAGS=""
3497
   LIBS=""
3498

  
3499
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen with CFLAGS=\"\" LIBS=\"\"" >&5
3500
$as_echo_n "checking for dlopen with CFLAGS=\"\" LIBS=\"\"... " >&6; }
3501

  
3502
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3503
/* end confdefs.h.  */
3504
#include <dlfcn.h>
3505
int
3506
main ()
3507
{
3508
dlopen("",0);
3509
  ;
3510
  return 0;
3511
}
3512
_ACEOF
3513
if ac_fn_cxx_try_link "$LINENO"; then :
3514
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3515
$as_echo "yes" >&6; }; ldl_not_needed=yes; ldl=""
3516
else
3517
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3518
$as_echo "no" >&6; }; ldl_not_needed=no; ldl="-ldl"
3519
fi
3520
rm -f core conftest.err conftest.$ac_objext \
3521
    conftest$ac_exeext conftest.$ac_ext
3522

  
3523
   CXXFLAGS=$save_CXXFLAGS
3524
   LIBS=$save_LIBS
3525

  
3526

  
3527
# then go ahead
3528
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --export-dynamic linker option is supported/needed" >&5
3529
$as_echo_n "checking if --export-dynamic linker option is supported/needed... " >&6; }
3530
echo 'void func_from_main();' >conftest_a.cc
3531
echo 'void some_func() {func_from_main();}' >>conftest_a.cc
3532
echo '#include <dlfcn.h>' >conftest_m.cc
3533
echo '#include <stdio.h>' >>conftest_m.cc
3534
echo 'void func_from_main() {}' >>conftest_m.cc
3535
echo 'int main() {if (dlopen("./libconftest_a.so",RTLD_NOW)!=0) return 0; printf("%s",dlerror()); return 1;}' >>conftest_m.cc
3536
if $CXX -c conftest_a.cc >/dev/null 2>/dev/null && \
3537
   $CXX -c conftest_m.cc >/dev/null 2>/dev/null && \
3538
   $SHLIB_LD -o libconftest_a.so conftest_a.o >/dev/null 2>/dev/null; \
3539
then
3540
   silly_ok="no"
3541
   # 1st try.
3542
   if $CXX -o conftest conftest_m.o $ldl >/dev/null 2>/dev/null; then
3543
      if ./conftest >/dev/null 2>/dev/null; then
3544
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
3545
$as_echo "not needed" >&6; }
3546
         silly_ok="yes"
3547
      fi
3548
   fi
3549
   # 2nd try.
3550
   if test $silly_ok = "no" && \
3551
      $CXX -o conftest -Wl,--export-dynamic conftest_m.o $ldl >/dev/null 2>/dev/null; \
3552
   then
3553
      if ./conftest >/dev/null 2>/dev/null; then
3554
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: both" >&5
3555
$as_echo "both" >&6; }
3556
         LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
3557
         silly_ok="yes"
3558
      fi
3559
   fi
3560
   # no solution found
3561
   if test $silly_ok = "no"; then
3562
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no solution found" >&5
3563
$as_echo "no solution found" >&6; }
3564
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No way was detected to export symbols from executables to shared" >&5
3565
$as_echo "$as_me: WARNING: No way was detected to export symbols from executables to shared" >&2;}
3566
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libraries. You probably will not be able to dynamically load" >&5
3567
$as_echo "$as_me: WARNING: libraries. You probably will not be able to dynamically load" >&2;}
3568
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: simple modules or other extensions written in C++ into simulation" >&5
3569
$as_echo "$as_me: WARNING: simple modules or other extensions written in C++ into simulation" >&2;}
3570
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: programs like INET." >&5
3571
$as_echo "$as_me: WARNING: programs like INET." >&2;}
3572
   fi
3573
else
3574
   # note: expected failure on MinGW, because there's no dlopen().
3575
   # fixing this would mean overturning and re-testing the whole configure script
3576
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
3577
$as_echo "test failed" >&6; }
3578
fi
3579
rm -f conftest_a.* conftest_m.* libconftest_a.so conftest
3580

  
3581
#----------------------
3582
# Test for "-z allextract" (Sun) or "--whole-archive" (GNU) linker option,
3583
#----------------------
3584
# Goal: to eliminate "silly linker problem", that is, to convince the linker
3585
# to include constructors of static C++ objects in statically linked libraries.
3586
# To test, we'll compile the following code into a static library:
3587
#      #include <stdio.h>
3588
#      class A { public: A() {printf("=WORKS=");} };
3589
#      static A a;
3590
# Then we link it with the following program:
3591
#      int main() {return 0;}
3592
# And check if the executable prints '=WORKS=' when run.
3593
#
3594
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags needed to link with static libs containing simple modules" >&5
3595
$as_echo_n "checking for flags needed to link with static libs containing simple modules... " >&6; }
3596
echo '#include <stdio.h>' >conftest_a.cc
3597
# NOTE: do not write "=WORKS=\n" because sh on OS X resolves it
3598
echo 'class A { public: A() {printf("=WORKS=");} };' >>conftest_a.cc
3599
echo 'static A a;' >> conftest_a.cc
3600
echo 'int main() {return 0;}' >> conftest_m.cc
3601
if $CXX -c conftest_a.cc >/dev/null 2>/dev/null && \
3602
   $CXX -c conftest_m.cc >/dev/null 2>/dev/null && \
3603
   $AR libconftest_a.a conftest_a.o >/dev/null 2>/dev/null && \
3604
   $RANLIB libconftest_a.a >/dev/null 2>/dev/null; \
3605
then
3606
   silly_ok="no"
3607
   # 1st try.
3608
   if $CXX -o conftest conftest_m.o libconftest_a.a >/dev/null 2>/dev/null; then
3609
      if ./conftest 2>/dev/null | grep '=WORKS=' >/dev/null; then
3610
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
3611
$as_echo "none" >&6; }
3612
         silly_ok="yes"
3613
      fi
3614
   fi
3615

  
3616
   # 2nd try.
3617
   silly1=-Wl,--whole-archive
3618
   silly2=-Wl,--no-whole-archive
3619
   if test $silly_ok = "no" && \
3620
      $CXX -o conftest conftest_m.o $silly1 libconftest_a.a $silly2 >/dev/null 2>/dev/null && \
3621
      ./conftest 2>/dev/null | grep '=WORKS=' >/dev/null; \
3622
   then
3623
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: --whole-archive" >&5
3624
$as_echo "--whole-archive" >&6; }
3625
      { $as_echo "$as_me:${as_lineno-$LINENO}: NOTE: Use the following syntax when linking with static libraries" >&5
3626
$as_echo "$as_me: NOTE: Use the following syntax when linking with static libraries" >&6;}
3627
      { $as_echo "$as_me:${as_lineno-$LINENO}: containing simple modules and other dynamically registered components:" >&5
3628
$as_echo "$as_me: containing simple modules and other dynamically registered components:" >&6;}
3629
      { $as_echo "$as_me:${as_lineno-$LINENO}:    $CXX ... $silly1 <libs> $silly2 ..." >&5
3630
$as_echo "$as_me:    $CXX ... $silly1 <libs> $silly2 ..." >&6;}
3631
      silly_ok="yes"
3632
      WHOLE_ARCHIVE_ON=$silly1
3633
      WHOLE_ARCHIVE_OFF=$silly2
3634
   fi
3635

  
3636
   # 3rd try.
3637
   silly1=-Wl,-z,allextract
3638
   silly2=-Wl,-z,defaultextract
3639
   if test $silly_ok = "no" && \
3640
      $CXX -o conftest conftest_m.o $silly1 libconftest_a.a $silly2 >/dev/null 2>/dev/null && \
3641
      ./conftest 2>/dev/null | grep '=WORKS=' >/dev/null; \
3642
   then
3643
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: -z,allextract" >&5
3644
$as_echo "-z,allextract" >&6; }
3645
      { $as_echo "$as_me:${as_lineno-$LINENO}: NOTE: Use the following syntax when linking with static libraries" >&5
3646
$as_echo "$as_me: NOTE: Use the following syntax when linking with static libraries" >&6;}
3647
      { $as_echo "$as_me:${as_lineno-$LINENO}: containing simple modules and other dynamically registered components:" >&5
3648
$as_echo "$as_me: containing simple modules and other dynamically registered components:" >&6;}
3649
      { $as_echo "$as_me:${as_lineno-$LINENO}:    $CXX ... $silly1 <libs> $silly2 ..." >&5
3650
$as_echo "$as_me:    $CXX ... $silly1 <libs> $silly2 ..." >&6;}
3651
      silly_ok="yes"
3652
      WHOLE_ARCHIVE_ON=$silly1
3653
      WHOLE_ARCHIVE_OFF=$silly2
3654
   fi
3655

  
3656
   # 4th try.
3657
   silly1=-Wl,-all_load
3658
   silly2=
3659
   if test $silly_ok = "no" && \
3660
      $CXX -o conftest conftest_m.o $silly1 libconftest_a.a $silly2 >/dev/null 2>/dev/null && \
3661
      ./conftest 2>/dev/null | grep '=WORKS=' >/dev/null; \
3662
   then
3663
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: -all_load" >&5
3664
$as_echo "-all_load" >&6; }
3665
      { $as_echo "$as_me:${as_lineno-$LINENO}: NOTE: Use the following syntax when linking with static libraries" >&5
3666
$as_echo "$as_me: NOTE: Use the following syntax when linking with static libraries" >&6;}
3667
      { $as_echo "$as_me:${as_lineno-$LINENO}: containing simple modules and other dynamically registered components:" >&5
3668
$as_echo "$as_me: containing simple modules and other dynamically registered components:" >&6;}
3669
      { $as_echo "$as_me:${as_lineno-$LINENO}:    $CXX ... $silly1 <libs> $silly2 ..." >&5
3670
$as_echo "$as_me:    $CXX ... $silly1 <libs> $silly2 ..." >&6;}
3671
      silly_ok="yes"
3672
      WHOLE_ARCHIVE_ON=$silly1
3673
      WHOLE_ARCHIVE_OFF=$silly2
3674
   fi
3675
   # no solution found
3676
   if test $silly_ok = "no"; then
3677
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no solution found" >&5
3678
$as_echo "no solution found" >&6; }
3679
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Avoid linking with static libraries containing simple modules" >&5
3680
$as_echo "$as_me: WARNING: Avoid linking with static libraries containing simple modules" >&2;}
3681
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: and other dynamically registered components. Those components" >&5
3682
$as_echo "$as_me: WARNING: and other dynamically registered components. Those components" >&2;}
3683
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: will not be found by the simulation program, because the linker" >&5
3684
$as_echo "$as_me: WARNING: will not be found by the simulation program, because the linker" >&2;}
3685
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: leaves them out from the executable." >&5
3686
$as_echo "$as_me: WARNING: leaves them out from the executable." >&2;}
3687
   fi
3688
else
3689
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
3690
$as_echo "test failed" >&6; }
3691
fi
3692
rm -f conftest_a.* conftest_m.* libconftest_a.a conftest
3693

  
3694

  
3695
#----------------------
3696
# Check Cygwin
3697
#----------------------
3698
if test "$WITH_PARSIM" = "yes" -a "$cygwin" = "yes"; then
3699
   as_fn_error $? "WITH_PARSIM=yes not supported with Cygwin -- please edit configure.user!" "$LINENO" 5
3700
fi
3701

  
3702
#----------------------
3703
# set arch specific flags
3704
#----------------------
3705
CFLAGS_DEBUG="$CFLAGS_DEBUG $CFLAGS_ARCH"
3706
CFLAGS_RELEASE="$CFLAGS_RELEASE $CFLAGS_ARCH"
3707
LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
3708

  
3709
#----------------------
3710
# Check for rpath
3711
#----------------------
3712
# add RUNTIME_PATH option if supported, so that setting LD_LIBRARY_PATH is no longer needed when using shared libs.
3713
# Also, we add "." to rpath so that opp_run -L option does not need full path of the library
3714
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker supports -rpath" >&5
3715
$as_echo_n "checking whether linker supports -rpath... " >&6; }
3716
LDFLAGS_SAVE="$LDFLAGS"
3717
LDFLAGS="$LDFLAGS -Wl,-rpath,\$(OMNETPP_LIB_DIR) -Wl,-rpath,."
3718
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3719
/* end confdefs.h.  */
3720

  
3721
int
3722
main ()
3723
{
3724

  
3725
  ;
3726
  return 0;
3727
}
3728
_ACEOF
3729
if ac_fn_cxx_try_link "$LINENO"; then :
3730
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3731
$as_echo "yes" >&6; }
3732
else
3733
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3734
$as_echo "no" >&6; }; RPATH_UNSUPPORTED="true"; LDFLAGS="$LDFLAGS_SAVE"
3735
fi
3736
rm -f core conftest.err conftest.$ac_objext \
3737
    conftest$ac_exeext conftest.$ac_ext
3738

  
3739
#----------------------
3740
# Checks for programs.
3741
#----------------------
3742

  
3743
for ac_prog in 'bison -y' byacc
3744
do
3745
  # Extract the first word of "$ac_prog", so it can be a program name with args.
3746
set dummy $ac_prog; ac_word=$2
3747
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3748
$as_echo_n "checking for $ac_word... " >&6; }
3749
if test "${ac_cv_prog_YACC+set}" = set; then :
3750
  $as_echo_n "(cached) " >&6
3751
else
3752
  if test -n "$YACC"; then
3753
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
3754
else
3755
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3756
for as_dir in $PATH
3757
do
3758
  IFS=$as_save_IFS
3759
  test -z "$as_dir" && as_dir=.
3760
    for ac_exec_ext in '' $ac_executable_extensions; do
3761
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3762
    ac_cv_prog_YACC="$ac_prog"
3763
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3764
    break 2
3765
  fi
3766
done
3767
  done
3768
IFS=$as_save_IFS
3769

  
3770
fi
3771
fi
3772
YACC=$ac_cv_prog_YACC
3773
if test -n "$YACC"; then
3774
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
3775
$as_echo "$YACC" >&6; }
3776
else
3777
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3778
$as_echo "no" >&6; }
3779
fi
3780

  
3781

  
3782
  test -n "$YACC" && break
3783
done
3784
test -n "$YACC" || YACC="yacc"
3785

  
3786
if test "$YACC" = "yacc"; then
3787
   as_fn_error $? "Bison not found, needed to build OMNeT++/OMNEST -- please install it!" "$LINENO" 5
3788
fi
3789
BISON_VER_LINE=`$YACC --version | grep "bison.* [234]\\."`
3790
if test -z "$BISON_VER_LINE"; then
3791
   as_fn_error $? "At least bison version 2.0 required -- type '$YACC --version' to see the version number" "$LINENO" 5
3792
fi
3793

  
3794
for ac_prog in flex lex
3795
do
3796
  # Extract the first word of "$ac_prog", so it can be a program name with args.
3797
set dummy $ac_prog; ac_word=$2
3798
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3799
$as_echo_n "checking for $ac_word... " >&6; }
3800
if test "${ac_cv_prog_LEX+set}" = set; then :
3801
  $as_echo_n "(cached) " >&6
3802
else
3803
  if test -n "$LEX"; then
3804
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
3805
else
3806
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807
for as_dir in $PATH
3808
do
3809
  IFS=$as_save_IFS
3810
  test -z "$as_dir" && as_dir=.
3811
    for ac_exec_ext in '' $ac_executable_extensions; do
3812
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3813
    ac_cv_prog_LEX="$ac_prog"
3814
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3815
    break 2
3816
  fi
3817
done
3818
  done
3819
IFS=$as_save_IFS
3820

  
3821
fi
3822
fi
3823
LEX=$ac_cv_prog_LEX
3824
if test -n "$LEX"; then
3825
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
3826
$as_echo "$LEX" >&6; }
3827
else
3828
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829
$as_echo "no" >&6; }
3830
fi
3831

  
3832

  
3833
  test -n "$LEX" && break
3834
done
3835
test -n "$LEX" || LEX=":"
3836

  
3837
if test "x$LEX" != "x:"; then
3838
  cat >conftest.l <<_ACEOF
3839
%%
3840
a { ECHO; }
3841
b { REJECT; }
3842
c { yymore (); }
3843
d { yyless (1); }
3844
e { yyless (input () != 0); }
3845
f { unput (yytext[0]); }
3846
. { BEGIN INITIAL; }
3847
%%
3848
#ifdef YYTEXT_POINTER
3849
extern char *yytext;
3850
#endif
3851
int
3852
main (void)
3853
{
3854
  return ! yylex () + ! yywrap ();
3855
}
3856
_ACEOF
3857
{ { ac_try="$LEX conftest.l"
3858
case "(($ac_try" in
3859
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3860
  *) ac_try_echo=$ac_try;;
3861
esac
3862
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3863
$as_echo "$ac_try_echo"; } >&5
3864
  (eval "$LEX conftest.l") 2>&5
3865
  ac_status=$?
3866
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3867
  test $ac_status = 0; }
3868
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
3869
$as_echo_n "checking lex output file root... " >&6; }
3870
if test "${ac_cv_prog_lex_root+set}" = set; then :
3871
  $as_echo_n "(cached) " >&6
3872
else
3873

  
3874
if test -f lex.yy.c; then
3875
  ac_cv_prog_lex_root=lex.yy
3876
elif test -f lexyy.c; then
3877
  ac_cv_prog_lex_root=lexyy
3878
else
3879
  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
3880
fi
3881
fi
3882
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
3883
$as_echo "$ac_cv_prog_lex_root" >&6; }
3884
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
3885

  
3886
if test -z "${LEXLIB+set}"; then
3887
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
3888
$as_echo_n "checking lex library... " >&6; }
3889
if test "${ac_cv_lib_lex+set}" = set; then :
3890
  $as_echo_n "(cached) " >&6
3891
else
3892

  
3893
    ac_save_LIBS=$LIBS
3894
    ac_cv_lib_lex='none needed'
3895
    for ac_lib in '' -lfl -ll; do
3896
      LIBS="$ac_lib $ac_save_LIBS"
3897
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3898
/* end confdefs.h.  */
3899
`cat $LEX_OUTPUT_ROOT.c`
3900
_ACEOF
3901
if ac_fn_cxx_try_link "$LINENO"; then :
3902
  ac_cv_lib_lex=$ac_lib
3903
fi
3904
rm -f core conftest.err conftest.$ac_objext \
3905
    conftest$ac_exeext conftest.$ac_ext
3906
      test "$ac_cv_lib_lex" != 'none needed' && break
3907
    done
3908
    LIBS=$ac_save_LIBS
3909

  
3910
fi
3911
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
3912
$as_echo "$ac_cv_lib_lex" >&6; }
3913
  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
3914
fi
3915

  
3916

  
3917
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
3918
$as_echo_n "checking whether yytext is a pointer... " >&6; }
3919
if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then :
3920
  $as_echo_n "(cached) " >&6
3921
else
3922
  # POSIX says lex can declare yytext either as a pointer or an array; the
3923
# default is implementation-dependent.  Figure out which it is, since
3924
# not all implementations provide the %pointer and %array declarations.
3925
ac_cv_prog_lex_yytext_pointer=no
3926
ac_save_LIBS=$LIBS
3927
LIBS="$LEXLIB $ac_save_LIBS"
3928
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3929
/* end confdefs.h.  */
3930
#define YYTEXT_POINTER 1
3931
`cat $LEX_OUTPUT_ROOT.c`
3932
_ACEOF
3933
if ac_fn_cxx_try_link "$LINENO"; then :
3934
  ac_cv_prog_lex_yytext_pointer=yes
3935
fi
3936
rm -f core conftest.err conftest.$ac_objext \
3937
    conftest$ac_exeext conftest.$ac_ext
3938
LIBS=$ac_save_LIBS
3939

  
3940
fi
3941
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
3942
$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
3943
if test $ac_cv_prog_lex_yytext_pointer = yes; then
3944

  
3945
$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
3946

  
3947
fi
3948
rm -f conftest.l $LEX_OUTPUT_ROOT.c
3949

  
3950
fi
3951
if test "$LEX" != "flex"; then
3952
   as_fn_error $? "Flex not found, needed to build OMNeT++/OMNEST -- please install it!" "$LINENO" 5
3953
fi
3954
FLEX_VER_LINE=`$LEX --version | grep "flex.* 2\\.[5-9]"`
3955
if test -z "$FLEX_VER_LINE"; then
3956
   as_fn_error $? "At least flex version 2.5 required -- type '$LEX --version' to see the version number" "$LINENO" 5
3957
fi
3958

  
3959
# make must be GNU make
3960
# Extract the first word of "make ", so it can be a program name with args.
3961
set dummy make ; ac_word=$2
3962
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3963
$as_echo_n "checking for $ac_word... " >&6; }
3964
if test "${ac_cv_prog_MAKE+set}" = set; then :
3965
  $as_echo_n "(cached) " >&6
3966
else
3967
  if test -n "$MAKE"; then
3968
  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
3969
else
3970
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3971
for as_dir in $PATH
3972
do
3973
  IFS=$as_save_IFS
3974
  test -z "$as_dir" && as_dir=.
3975
    for ac_exec_ext in '' $ac_executable_extensions; do
3976
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3977
    ac_cv_prog_MAKE="make"
3978
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3979
    break 2
3980
  fi
3981
done
3982
  done
3983
IFS=$as_save_IFS
3984

  
3985
  test -z "$ac_cv_prog_MAKE" && ac_cv_prog_MAKE="not found"
3986
fi
3987
fi
3988
MAKE=$ac_cv_prog_MAKE
3989
if test -n "$MAKE"; then
3990
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
3991
$as_echo "$MAKE" >&6; }
3992
else
3993
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3994
$as_echo "no" >&6; }
3995
fi
3996

  
3997

  
3998
if test "$MAKE" = "not found"; then
3999
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES make"
4000
   as_fn_error and also for model development. "make program not found -- it is required to build OMNeT++/OMNEST" "$LINENO" 5
4001
else
4002
   if "$MAKE" --version 2>/dev/null | grep -i GNU >/dev/null; then :; else
4003
       as_fn_error $? "GNU Make is required to build OMNeT++/OMNEST." "$LINENO" 5
4004
   fi
4005
fi
4006

  
4007
# perl is needed for opp_msgc
4008

  
4009
# Extract the first word of "perl", so it can be a program name with args.
4010
set dummy perl; ac_word=$2
4011
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4012
$as_echo_n "checking for $ac_word... " >&6; }
4013
if test "${ac_cv_prog_PERL+set}" = set; then :
4014
  $as_echo_n "(cached) " >&6
4015
else
4016
  if test -n "$PERL"; then
4017
  ac_cv_prog_PERL="$PERL" # Let the user override the test.
4018
else
4019
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4020
for as_dir in $PATH
4021
do
4022
  IFS=$as_save_IFS
4023
  test -z "$as_dir" && as_dir=.
4024
    for ac_exec_ext in '' $ac_executable_extensions; do
4025
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4026
    ac_cv_prog_PERL="perl"
4027
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4028
    break 2
4029
  fi
4030
done
4031
  done
4032
IFS=$as_save_IFS
4033

  
4034
  test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="not found"
4035
fi
4036
fi
4037
PERL=$ac_cv_prog_PERL
4038
if test -n "$PERL"; then
4039
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
4040
$as_echo "$PERL" >&6; }
4041
else
4042
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4043
$as_echo "no" >&6; }
4044
fi
4045

  
4046

  
4047
if test "$PERL" = "not found"; then
4048
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES  perl"
4049
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perl not found -- please install it! Perl is required by opp_msgc" >&5
4050
$as_echo "$as_me: WARNING: Perl not found -- please install it! Perl is required by opp_msgc" >&2;}
4051
fi
4052
if test ! -x /usr/bin/perl; then
4053
   this_perl=`which perl`
4054
   as_fn_error $? "Perl MUST be available as /usr/bin/perl. Creating a soft link should help: ln -s $this_perl /usr/bin/perl" "$LINENO" 5
4055
fi
4056

  
4057
# swig is used for building the ui support libs
4058

  
4059
# Extract the first word of "swig", so it can be a program name with args.
4060
set dummy swig; ac_word=$2
4061
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4062
$as_echo_n "checking for $ac_word... " >&6; }
4063
if test "${ac_cv_prog_SWIG+set}" = set; then :
4064
  $as_echo_n "(cached) " >&6
4065
else
4066
  if test -n "$SWIG"; then
4067
  ac_cv_prog_SWIG="$SWIG" # Let the user override the test.
4068
else
4069
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4070
for as_dir in $PATH
4071
do
4072
  IFS=$as_save_IFS
4073
  test -z "$as_dir" && as_dir=.
4074
    for ac_exec_ext in '' $ac_executable_extensions; do
4075
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4076
    ac_cv_prog_SWIG="swig"
4077
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4078
    break 2
4079
  fi
4080
done
4081
  done
4082
IFS=$as_save_IFS
4083

  
4084
  test -z "$ac_cv_prog_SWIG" && ac_cv_prog_SWIG="not found"
4085
fi
4086
fi
4087
SWIG=$ac_cv_prog_SWIG
4088
if test -n "$SWIG"; then
4089
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
4090
$as_echo "$SWIG" >&6; }
4091
else
4092
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4093
$as_echo "no" >&6; }
4094
fi
4095

  
4096

  
4097

  
4098

  
4099
#----------------------
4100
# Checks for standard libraries.
4101
#----------------------
4102

  
4103
SYS_LIBS=""
4104

  
4105
# time functions
4106

  
4107
   save_CXXFLAGS=$CXXFLAGS
4108
   save_LIBS=$LIBS
4109

  
4110
   CXXFLAGS=""
4111
   LIBS=""
4112

  
4113
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time with CFLAGS=\"\" LIBS=\"\"" >&5
4114
$as_echo_n "checking for time with CFLAGS=\"\" LIBS=\"\"... " >&6; }
4115

  
4116
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4117
/* end confdefs.h.  */
4118
#include <time.h>
4119
int
4120
main ()
4121
{
4122
clock_gettime(0,0);
4123
  ;
4124
  return 0;
4125
}
4126
_ACEOF
4127
if ac_fn_cxx_try_link "$LINENO"; then :
4128
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4129
$as_echo "yes" >&6; }; time_ok=yes;
4130
else
4131
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4132
$as_echo "no" >&6; }; time_ok=no;
4133
fi
4134
rm -f core conftest.err conftest.$ac_objext \
4135
    conftest$ac_exeext conftest.$ac_ext
4136

  
4137
   CXXFLAGS=$save_CXXFLAGS
4138
   LIBS=$save_LIBS
4139

  
4140
if test $time_ok = no; then
4141

  
4142
   save_CXXFLAGS=$CXXFLAGS
4143
   save_LIBS=$LIBS
4144

  
4145
   CXXFLAGS=""
4146
   LIBS="-lrt"
4147

  
4148
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time with CFLAGS=\"\" LIBS=\"-lrt\"" >&5
4149
$as_echo_n "checking for time with CFLAGS=\"\" LIBS=\"-lrt\"... " >&6; }
4150

  
4151
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4152
/* end confdefs.h.  */
4153
#include <time.h>
4154
int
4155
main ()
4156
{
4157
clock_gettime(0,0);
4158
  ;
4159
  return 0;
4160
}
4161
_ACEOF
4162
if ac_fn_cxx_try_link "$LINENO"; then :
4163
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4164
$as_echo "yes" >&6; }; time_ok=yes; SYS_LIBS="-lrt $SYS_LIBS"
4165
else
4166
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4167
$as_echo "no" >&6; }; time_ok=no;
4168
fi
4169
rm -f core conftest.err conftest.$ac_objext \
4170
    conftest$ac_exeext conftest.$ac_ext
4171

  
4172
   CXXFLAGS=$save_CXXFLAGS
4173
   LIBS=$save_LIBS
4174

  
4175
fi
4176
if test $time_ok = no; then
4177
   as_fn_error $? "Time library -lrt not found" "$LINENO" 5
4178
fi
4179

  
4180
# math functions
4181

  
4182
   save_CXXFLAGS=$CXXFLAGS
4183
   save_LIBS=$LIBS
4184

  
4185
   CXXFLAGS=""
4186
   LIBS=""
4187

  
4188
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for math with CFLAGS=\"\" LIBS=\"\"" >&5
4189
$as_echo_n "checking for math with CFLAGS=\"\" LIBS=\"\"... " >&6; }
4190

  
4191
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4192
/* end confdefs.h.  */
4193
#include <math.h>
4194
int
4195
main ()
4196
{
4197
floor(0);
4198
  ;
4199
  return 0;
4200
}
4201
_ACEOF
4202
if ac_fn_cxx_try_link "$LINENO"; then :
4203
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4204
$as_echo "yes" >&6; }; math_ok=yes;
4205
else
4206
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4207
$as_echo "no" >&6; }; math_ok=no;
4208
fi
4209
rm -f core conftest.err conftest.$ac_objext \
4210
    conftest$ac_exeext conftest.$ac_ext
4211

  
4212
   CXXFLAGS=$save_CXXFLAGS
4213
   LIBS=$save_LIBS
4214

  
4215
if test $math_ok = no; then
4216

  
4217
   save_CXXFLAGS=$CXXFLAGS
4218
   save_LIBS=$LIBS
4219

  
4220
   CXXFLAGS=""
4221
   LIBS="-lm"
4222

  
4223
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for math with CFLAGS=\"\" LIBS=\"-lm\"" >&5
4224
$as_echo_n "checking for math with CFLAGS=\"\" LIBS=\"-lm\"... " >&6; }
4225

  
4226
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227
/* end confdefs.h.  */
4228
#include <math.h>
4229
int
4230
main ()
4231
{
4232
floor(0);
4233
  ;
4234
  return 0;
4235
}
4236
_ACEOF
4237
if ac_fn_cxx_try_link "$LINENO"; then :
4238
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4239
$as_echo "yes" >&6; }; math_ok=yes; SYS_LIBS="-lm $SYS_LIBS"
4240
else
4241
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242
$as_echo "no" >&6; }; math_ok=no;
4243
fi
4244
rm -f core conftest.err conftest.$ac_objext \
4245
    conftest$ac_exeext conftest.$ac_ext
4246

  
4247
   CXXFLAGS=$save_CXXFLAGS
4248
   LIBS=$save_LIBS
4249

  
4250
fi
4251
if test $math_ok = no; then
4252
   as_fn_error $? "Standard C math library -lm not found" "$LINENO" 5
4253
fi
4254

  
4255
# -lstdc++
4256
# currently we have a modified version of mingw which has a shared stdc++ by default so the below
4257
# check is not needed
4258
#if test "$mingw" = "yes"; then
4259
#   # check for shared version (on mingw)
4260
#   OPP_CHECK_LIB(standard C++ lib, iostream, /**/, , -lstdc++_s, stdcpp_ok, SYS_LIBS="-lstdc++_s $SYS_LIBS")
4261
#else
4262

  
4263
   save_CXXFLAGS=$CXXFLAGS
4264
   save_LIBS=$LIBS
4265

  
4266
   CXXFLAGS=""
4267
   LIBS="-lstdc++"
4268

  
4269
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard C++ lib with CFLAGS=\"\" LIBS=\"-lstdc++\"" >&5
4270
$as_echo_n "checking for standard C++ lib with CFLAGS=\"\" LIBS=\"-lstdc++\"... " >&6; }
4271

  
4272
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273
/* end confdefs.h.  */
4274
#include <iostream>
4275
int
4276
main ()
4277
{
4278
/**/;
4279
  ;
4280
  return 0;
4281
}
4282
_ACEOF
4283
if ac_fn_cxx_try_link "$LINENO"; then :
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff