Statistics
| Branch: | Revision:

root / configure @ 7f251033

History | View | Annotate | Download (225 KB)

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 :
4284
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4285
$as_echo "yes" >&6; }; stdcpp_ok=yes; SYS_LIBS="-lstdc++ $SYS_LIBS"
4286
else
4287
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4288
$as_echo "no" >&6; }; stdcpp_ok=no;
4289
fi
4290
rm -f core conftest.err conftest.$ac_objext \
4291
    conftest$ac_exeext conftest.$ac_ext
4292

    
4293
   CXXFLAGS=$save_CXXFLAGS
4294
   LIBS=$save_LIBS
4295

    
4296
   if test $stdcpp_ok = no; then
4297

    
4298
   save_CXXFLAGS=$CXXFLAGS
4299
   save_LIBS=$LIBS
4300

    
4301
   CXXFLAGS=""
4302
   LIBS="-lcxx"
4303

    
4304
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard C++ lib with CFLAGS=\"\" LIBS=\"-lcxx\"" >&5
4305
$as_echo_n "checking for standard C++ lib with CFLAGS=\"\" LIBS=\"-lcxx\"... " >&6; }
4306

    
4307
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4308
/* end confdefs.h.  */
4309
#include <iostream>
4310
int
4311
main ()
4312
{
4313
/**/;
4314
  ;
4315
  return 0;
4316
}
4317
_ACEOF
4318
if ac_fn_cxx_try_link "$LINENO"; then :
4319
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4320
$as_echo "yes" >&6; }; stdcpp_ok=yes; SYS_LIBS="-lcxx $SYS_LIBS"
4321
else
4322
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4323
$as_echo "no" >&6; }; stdcpp_ok=no;
4324
fi
4325
rm -f core conftest.err conftest.$ac_objext \
4326
    conftest$ac_exeext conftest.$ac_ext
4327

    
4328
   CXXFLAGS=$save_CXXFLAGS
4329
   LIBS=$save_LIBS
4330

    
4331
   fi
4332
   if test $stdcpp_ok = no; then
4333

    
4334
   save_CXXFLAGS=$CXXFLAGS
4335
   save_LIBS=$LIBS
4336

    
4337
   CXXFLAGS=""
4338
   LIBS="-lcxa"
4339

    
4340
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard C++ lib with CFLAGS=\"\" LIBS=\"-lcxa\"" >&5
4341
$as_echo_n "checking for standard C++ lib with CFLAGS=\"\" LIBS=\"-lcxa\"... " >&6; }
4342

    
4343
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4344
/* end confdefs.h.  */
4345
#include <iostream>
4346
int
4347
main ()
4348
{
4349
/**/;
4350
  ;
4351
  return 0;
4352
}
4353
_ACEOF
4354
if ac_fn_cxx_try_link "$LINENO"; then :
4355
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4356
$as_echo "yes" >&6; }; stdcpp_ok=yes; SYS_LIBS="-lcxa $SYS_LIBS"
4357
else
4358
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4359
$as_echo "no" >&6; }; stdcpp_ok=no;
4360
fi
4361
rm -f core conftest.err conftest.$ac_objext \
4362
    conftest$ac_exeext conftest.$ac_ext
4363

    
4364
   CXXFLAGS=$save_CXXFLAGS
4365
   LIBS=$save_LIBS
4366

    
4367
   fi
4368
#fi
4369
if test $stdcpp_ok = no; then
4370
   as_fn_error $? "Standard C++ library -lstdc++_s or -lstdc++ or -lcxx or -lcxa not found" "$LINENO" 5
4371
fi
4372

    
4373
# dlopen()
4374

    
4375
   save_CXXFLAGS=$CXXFLAGS
4376
   save_LIBS=$LIBS
4377

    
4378
   CXXFLAGS=""
4379
   LIBS=""
4380

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

    
4384
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4385
/* end confdefs.h.  */
4386
#include <dlfcn.h>
4387
int
4388
main ()
4389
{
4390
dlopen("",0);
4391
  ;
4392
  return 0;
4393
}
4394
_ACEOF
4395
if ac_fn_cxx_try_link "$LINENO"; then :
4396
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4397
$as_echo "yes" >&6; }; dl_ok=yes;
4398
else
4399
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4400
$as_echo "no" >&6; }; dl_ok=no;
4401
fi
4402
rm -f core conftest.err conftest.$ac_objext \
4403
    conftest$ac_exeext conftest.$ac_ext
4404

    
4405
   CXXFLAGS=$save_CXXFLAGS
4406
   LIBS=$save_LIBS
4407

    
4408
if test $dl_ok = no; then
4409

    
4410
   save_CXXFLAGS=$CXXFLAGS
4411
   save_LIBS=$LIBS
4412

    
4413
   CXXFLAGS=""
4414
   LIBS="-ldl"
4415

    
4416
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen with CFLAGS=\"\" LIBS=\"-ldl\"" >&5
4417
$as_echo_n "checking for dlopen with CFLAGS=\"\" LIBS=\"-ldl\"... " >&6; }
4418

    
4419
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4420
/* end confdefs.h.  */
4421
#include <dlfcn.h>
4422
int
4423
main ()
4424
{
4425
dlopen("",0);
4426
  ;
4427
  return 0;
4428
}
4429
_ACEOF
4430
if ac_fn_cxx_try_link "$LINENO"; then :
4431
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4432
$as_echo "yes" >&6; }; dl_ok=yes; SYS_LIBS="-ldl $SYS_LIBS"
4433
else
4434
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4435
$as_echo "no" >&6; }; dl_ok=no;
4436
fi
4437
rm -f core conftest.err conftest.$ac_objext \
4438
    conftest$ac_exeext conftest.$ac_ext
4439

    
4440
   CXXFLAGS=$save_CXXFLAGS
4441
   LIBS=$save_LIBS
4442

    
4443
fi
4444
if test $dl_ok = yes; then
4445
   HAVE_DLOPEN=1
4446
else
4447
   HAVE_DLOPEN=0
4448
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no dlopen(): dynamic loading of libs not possible" >&5
4449
$as_echo "$as_me: WARNING: no dlopen(): dynamic loading of libs not possible" >&2;}
4450
fi
4451

    
4452
# winsock (for MinGW)
4453

    
4454
   save_CXXFLAGS=$CXXFLAGS
4455
   save_LIBS=$LIBS
4456

    
4457
   CXXFLAGS=""
4458
   LIBS="-lwsock32"
4459

    
4460
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock with CFLAGS=\"\" LIBS=\"-lwsock32\"" >&5
4461
$as_echo_n "checking for winsock with CFLAGS=\"\" LIBS=\"-lwsock32\"... " >&6; }
4462

    
4463
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4464
/* end confdefs.h.  */
4465
#include <winsock.h>
4466
int
4467
main ()
4468
{
4469
socket(0,0,0);
4470
  ;
4471
  return 0;
4472
}
4473
_ACEOF
4474
if ac_fn_cxx_try_link "$LINENO"; then :
4475
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4476
$as_echo "yes" >&6; }; wsock_ok=yes; SYS_LIBS="-lwsock32 $SYS_LIBS"
4477
else
4478
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479
$as_echo "no" >&6; }; wsock_ok=no;
4480
fi
4481
rm -f core conftest.err conftest.$ac_objext \
4482
    conftest$ac_exeext conftest.$ac_ext
4483

    
4484
   CXXFLAGS=$save_CXXFLAGS
4485
   LIBS=$save_LIBS
4486

    
4487

    
4488
# zlib
4489
if test "$ZLIB_LIBS" = ""; then
4490
    ZLIB_LIBS=-lz
4491
fi
4492

    
4493
   save_CXXFLAGS=$CXXFLAGS
4494
   save_LIBS=$LIBS
4495

    
4496
   CXXFLAGS="$CFLAGS_RELEASE $ZLIB_CFLAGS"
4497
   LIBS="$ZLIB_LIBS"
4498

    
4499
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib with CFLAGS=\"$CFLAGS_RELEASE $ZLIB_CFLAGS\" LIBS=\"$ZLIB_LIBS\"" >&5
4500
$as_echo_n "checking for zlib with CFLAGS=\"$CFLAGS_RELEASE $ZLIB_CFLAGS\" LIBS=\"$ZLIB_LIBS\"... " >&6; }
4501

    
4502
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4503
/* end confdefs.h.  */
4504
#include <zlib.h>
4505
int
4506
main ()
4507
{
4508
gzopen("","");
4509
  ;
4510
  return 0;
4511
}
4512
_ACEOF
4513
if ac_fn_cxx_try_link "$LINENO"; then :
4514
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4515
$as_echo "yes" >&6; }; zlib_ok=yes;
4516
else
4517
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4518
$as_echo "no" >&6; }; zlib_ok=no;
4519
fi
4520
rm -f core conftest.err conftest.$ac_objext \
4521
    conftest$ac_exeext conftest.$ac_ext
4522

    
4523
   CXXFLAGS=$save_CXXFLAGS
4524
   LIBS=$save_LIBS
4525

    
4526
# on mingw/msys try a different library name
4527
if test $zlib_ok = no -a "$mingw" = yes; then
4528
    ZLIB_LIBS="-lzlib1"
4529

    
4530
   save_CXXFLAGS=$CXXFLAGS
4531
   save_LIBS=$LIBS
4532

    
4533
   CXXFLAGS="$CFLAGS_RELEASE $ZLIB_CFLAGS"
4534
   LIBS="$ZLIB_LIBS"
4535

    
4536
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib with CFLAGS=\"$CFLAGS_RELEASE $ZLIB_CFLAGS\" LIBS=\"$ZLIB_LIBS\"" >&5
4537
$as_echo_n "checking for zlib with CFLAGS=\"$CFLAGS_RELEASE $ZLIB_CFLAGS\" LIBS=\"$ZLIB_LIBS\"... " >&6; }
4538

    
4539
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4540
/* end confdefs.h.  */
4541
#include <zlib.h>
4542
int
4543
main ()
4544
{
4545
gzopen("","");
4546
  ;
4547
  return 0;
4548
}
4549
_ACEOF
4550
if ac_fn_cxx_try_link "$LINENO"; then :
4551
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4552
$as_echo "yes" >&6; }; zlib_ok=yes;
4553
else
4554
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555
$as_echo "no" >&6; }; zlib_ok=no;
4556
fi
4557
rm -f core conftest.err conftest.$ac_objext \
4558
    conftest$ac_exeext conftest.$ac_ext
4559

    
4560
   CXXFLAGS=$save_CXXFLAGS
4561
   LIBS=$save_LIBS
4562

    
4563
fi
4564
if test $zlib_ok = no; then
4565
   as_fn_error $? "zlib or zlib header file not found, please install it" "$LINENO" 5
4566
fi
4567

    
4568

    
4569
#----------------------
4570
# Check for Tcl/Tk.
4571
#----------------------
4572
if test -n "$NO_TCL"; then
4573

    
4574
    # skip testing for TCL
4575
    TKENV_IF_POSSIBLE=missing-dependency
4576

    
4577
    # and build samples using Cmdenv (TBD)
4578
    ALL_ENV_LIBS='$(CMDENV_LIBS)'
4579

    
4580
else  #matching "fi" is after BLT testing
4581

    
4582
   if test -d /usr/include/tcl8.4; then
4583
        # this was reported to be the case on Debian 3.1 "sarge"
4584
        TK_CFLAGS84=${TK_CFLAGS:-"-I/usr/include/tcl8.4"}
4585
   fi
4586
   if test -d /usr/include/tcl8.5; then
4587
        TK_CFLAGS85=${TK_CFLAGS:-"-I/usr/include/tcl8.5"}
4588
   fi
4589
   if test -d /usr/include/tcl8.6; then
4590
        TK_CFLAGS86=${TK_CFLAGS:-"-I/usr/include/tcl8.6"}
4591
   fi
4592

    
4593
   if test -n "$TK_LIBS"; then
4594

    
4595
   save_CXXFLAGS=$CXXFLAGS
4596
   save_LIBS=$LIBS
4597

    
4598
   CXXFLAGS="$TK_CFLAGS"
4599
   LIBS="$TK_LIBS"
4600

    
4601
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk with CFLAGS=\"$TK_CFLAGS\" LIBS=\"$TK_LIBS\"" >&5
4602
$as_echo_n "checking for Tcl/Tk with CFLAGS=\"$TK_CFLAGS\" LIBS=\"$TK_LIBS\"... " >&6; }
4603

    
4604
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4605
/* end confdefs.h.  */
4606
#include <tk.h>
4607
int
4608
main ()
4609
{
4610
Tk_MainLoop();
4611
  ;
4612
  return 0;
4613
}
4614
_ACEOF
4615
if ac_fn_cxx_try_link "$LINENO"; then :
4616
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4617
$as_echo "yes" >&6; }; tcltk_ok=yes;
4618
else
4619
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620
$as_echo "no" >&6; }; tcltk_ok=no;
4621
fi
4622
rm -f core conftest.err conftest.$ac_objext \
4623
    conftest$ac_exeext conftest.$ac_ext
4624

    
4625
   CXXFLAGS=$save_CXXFLAGS
4626
   LIBS=$save_LIBS
4627

    
4628
    else
4629
        # try to use tcl/tk without X (e.g. on Mac OS X native aqua Tcl/Tk impl)
4630

    
4631
   save_CXXFLAGS=$CXXFLAGS
4632
   save_LIBS=$LIBS
4633

    
4634
   CXXFLAGS="$CFLAGS_RELEASE $TK_CFLAGS86"
4635
   LIBS="-ltk8.6 -ltcl8.6"
4636

    
4637
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS86\" LIBS=\"-ltk8.6 -ltcl8.6\"" >&5
4638
$as_echo_n "checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS86\" LIBS=\"-ltk8.6 -ltcl8.6\"... " >&6; }
4639

    
4640
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4641
/* end confdefs.h.  */
4642
#include <tk.h>
4643
int
4644
main ()
4645
{
4646
Tk_MainLoop();
4647
  ;
4648
  return 0;
4649
}
4650
_ACEOF
4651
if ac_fn_cxx_try_link "$LINENO"; then :
4652
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4653
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="-ltk8.6 -ltcl8.6" TK_CFLAGS=$TK_CFLAGS86
4654
else
4655
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656
$as_echo "no" >&6; }; tcltk_ok=no;
4657
fi
4658
rm -f core conftest.err conftest.$ac_objext \
4659
    conftest$ac_exeext conftest.$ac_ext
4660

    
4661
   CXXFLAGS=$save_CXXFLAGS
4662
   LIBS=$save_LIBS
4663

    
4664
        if test $tcltk_ok = no; then
4665

    
4666
   save_CXXFLAGS=$CXXFLAGS
4667
   save_LIBS=$LIBS
4668

    
4669
   CXXFLAGS="$CFLAGS_RELEASE $TK_CFLAGS85"
4670
   LIBS="-ltk8.5 -ltcl8.5"
4671

    
4672
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS85\" LIBS=\"-ltk8.5 -ltcl8.5\"" >&5
4673
$as_echo_n "checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS85\" LIBS=\"-ltk8.5 -ltcl8.5\"... " >&6; }
4674

    
4675
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4676
/* end confdefs.h.  */
4677
#include <tk.h>
4678
int
4679
main ()
4680
{
4681
Tk_MainLoop();
4682
  ;
4683
  return 0;
4684
}
4685
_ACEOF
4686
if ac_fn_cxx_try_link "$LINENO"; then :
4687
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4688
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="-ltk8.5 -ltcl8.5" TK_CFLAGS=$TK_CFLAGS85
4689
else
4690
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4691
$as_echo "no" >&6; }; tcltk_ok=no;
4692
fi
4693
rm -f core conftest.err conftest.$ac_objext \
4694
    conftest$ac_exeext conftest.$ac_ext
4695

    
4696
   CXXFLAGS=$save_CXXFLAGS
4697
   LIBS=$save_LIBS
4698

    
4699
        fi
4700
        if test $tcltk_ok = no; then
4701

    
4702
   save_CXXFLAGS=$CXXFLAGS
4703
   save_LIBS=$LIBS
4704

    
4705
   CXXFLAGS="$CFLAGS_RELEASE $TK_CFLAGS84"
4706
   LIBS="-ltk8.4 -ltcl8.4"
4707

    
4708
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS84\" LIBS=\"-ltk8.4 -ltcl8.4\"" >&5
4709
$as_echo_n "checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS84\" LIBS=\"-ltk8.4 -ltcl8.4\"... " >&6; }
4710

    
4711
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4712
/* end confdefs.h.  */
4713
#include <tk.h>
4714
int
4715
main ()
4716
{
4717
Tk_MainLoop();
4718
  ;
4719
  return 0;
4720
}
4721
_ACEOF
4722
if ac_fn_cxx_try_link "$LINENO"; then :
4723
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4724
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="-ltk8.4 -ltcl8.4" TK_CFLAGS=$TK_CFLAGS84
4725
else
4726
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4727
$as_echo "no" >&6; }; tcltk_ok=no;
4728
fi
4729
rm -f core conftest.err conftest.$ac_objext \
4730
    conftest$ac_exeext conftest.$ac_ext
4731

    
4732
   CXXFLAGS=$save_CXXFLAGS
4733
   LIBS=$save_LIBS
4734

    
4735
        fi
4736
        # look for X window libs and headers
4737
        if test $tcltk_ok = no; then
4738
            # try to find Tcl/Tk ourselves, but it usually needs to link with Xlib
4739
            ac_ext=cpp
4740
ac_cpp='$CXXCPP $CPPFLAGS'
4741
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4742
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4743
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4744
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
4745
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
4746
if test -z "$CXXCPP"; then
4747
  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
4748
  $as_echo_n "(cached) " >&6
4749
else
4750
      # Double quotes because CXXCPP needs to be expanded
4751
    for CXXCPP in "$CXX -E" "/lib/cpp"
4752
    do
4753
      ac_preproc_ok=false
4754
for ac_cxx_preproc_warn_flag in '' yes
4755
do
4756
  # Use a header file that comes with gcc, so configuring glibc
4757
  # with a fresh cross-compiler works.
4758
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4759
  # <limits.h> exists even on freestanding compilers.
4760
  # On the NeXT, cc -E runs the code through the compiler's parser,
4761
  # not just through cpp. "Syntax error" is here to catch this case.
4762
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4763
/* end confdefs.h.  */
4764
#ifdef __STDC__
4765
# include <limits.h>
4766
#else
4767
# include <assert.h>
4768
#endif
4769
		     Syntax error
4770
_ACEOF
4771
if ac_fn_cxx_try_cpp "$LINENO"; then :
4772

    
4773
else
4774
  # Broken: fails on valid input.
4775
continue
4776
fi
4777
rm -f conftest.err conftest.i conftest.$ac_ext
4778

    
4779
  # OK, works on sane cases.  Now check whether nonexistent headers
4780
  # can be detected and how.
4781
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782
/* end confdefs.h.  */
4783
#include <ac_nonexistent.h>
4784
_ACEOF
4785
if ac_fn_cxx_try_cpp "$LINENO"; then :
4786
  # Broken: success on invalid input.
4787
continue
4788
else
4789
  # Passes both tests.
4790
ac_preproc_ok=:
4791
break
4792
fi
4793
rm -f conftest.err conftest.i conftest.$ac_ext
4794

    
4795
done
4796
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4797
rm -f conftest.i conftest.err conftest.$ac_ext
4798
if $ac_preproc_ok; then :
4799
  break
4800
fi
4801

    
4802
    done
4803
    ac_cv_prog_CXXCPP=$CXXCPP
4804

    
4805
fi
4806
  CXXCPP=$ac_cv_prog_CXXCPP
4807
else
4808
  ac_cv_prog_CXXCPP=$CXXCPP
4809
fi
4810
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
4811
$as_echo "$CXXCPP" >&6; }
4812
ac_preproc_ok=false
4813
for ac_cxx_preproc_warn_flag in '' yes
4814
do
4815
  # Use a header file that comes with gcc, so configuring glibc
4816
  # with a fresh cross-compiler works.
4817
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4818
  # <limits.h> exists even on freestanding compilers.
4819
  # On the NeXT, cc -E runs the code through the compiler's parser,
4820
  # not just through cpp. "Syntax error" is here to catch this case.
4821
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4822
/* end confdefs.h.  */
4823
#ifdef __STDC__
4824
# include <limits.h>
4825
#else
4826
# include <assert.h>
4827
#endif
4828
		     Syntax error
4829
_ACEOF
4830
if ac_fn_cxx_try_cpp "$LINENO"; then :
4831

    
4832
else
4833
  # Broken: fails on valid input.
4834
continue
4835
fi
4836
rm -f conftest.err conftest.i conftest.$ac_ext
4837

    
4838
  # OK, works on sane cases.  Now check whether nonexistent headers
4839
  # can be detected and how.
4840
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4841
/* end confdefs.h.  */
4842
#include <ac_nonexistent.h>
4843
_ACEOF
4844
if ac_fn_cxx_try_cpp "$LINENO"; then :
4845
  # Broken: success on invalid input.
4846
continue
4847
else
4848
  # Passes both tests.
4849
ac_preproc_ok=:
4850
break
4851
fi
4852
rm -f conftest.err conftest.i conftest.$ac_ext
4853

    
4854
done
4855
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4856
rm -f conftest.i conftest.err conftest.$ac_ext
4857
if $ac_preproc_ok; then :
4858

    
4859
else
4860
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4861
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4862
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
4863
See \`config.log' for more details" "$LINENO" 5 ; }
4864
fi
4865

    
4866
ac_ext=cpp
4867
ac_cpp='$CXXCPP $CPPFLAGS'
4868
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4869
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4870
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4871

    
4872

    
4873
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
4874
$as_echo_n "checking for X... " >&6; }
4875

    
4876

    
4877
# Check whether --with-x was given.
4878
if test "${with_x+set}" = set; then :
4879
  withval=$with_x;
4880
fi
4881

    
4882
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4883
if test "x$with_x" = xno; then
4884
  # The user explicitly disabled X.
4885
  have_x=disabled
4886
else
4887
  case $x_includes,$x_libraries in #(
4888
    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
4889
    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
4890
  $as_echo_n "(cached) " >&6
4891
else
4892
  # One or both of the vars are not set, and there is no cached value.
4893
ac_x_includes=no ac_x_libraries=no
4894
rm -f -r conftest.dir
4895
if mkdir conftest.dir; then
4896
  cd conftest.dir
4897
  cat >Imakefile <<'_ACEOF'
4898
incroot:
4899
	@echo incroot='${INCROOT}'
4900
usrlibdir:
4901
	@echo usrlibdir='${USRLIBDIR}'
4902
libdir:
4903
	@echo libdir='${LIBDIR}'
4904
_ACEOF
4905
  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
4906
    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4907
    for ac_var in incroot usrlibdir libdir; do
4908
      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
4909
    done
4910
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4911
    for ac_extension in a so sl dylib la dll; do
4912
      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
4913
	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
4914
	ac_im_usrlibdir=$ac_im_libdir; break
4915
      fi
4916
    done
4917
    # Screen out bogus values from the imake configuration.  They are
4918
    # bogus both because they are the default anyway, and because
4919
    # using them would break gcc on systems where it needs fixed includes.
4920
    case $ac_im_incroot in
4921
	/usr/include) ac_x_includes= ;;
4922
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4923
    esac
4924
    case $ac_im_usrlibdir in
4925
	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
4926
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4927
    esac
4928
  fi
4929
  cd ..
4930
  rm -f -r conftest.dir
4931
fi
4932

    
4933
# Standard set of common directories for X headers.
4934
# Check X11 before X11Rn because it is often a symlink to the current release.
4935
ac_x_header_dirs='
4936
/usr/X11/include
4937
/usr/X11R7/include
4938
/usr/X11R6/include
4939
/usr/X11R5/include
4940
/usr/X11R4/include
4941

    
4942
/usr/include/X11
4943
/usr/include/X11R7
4944
/usr/include/X11R6
4945
/usr/include/X11R5
4946
/usr/include/X11R4
4947

    
4948
/usr/local/X11/include
4949
/usr/local/X11R7/include
4950
/usr/local/X11R6/include
4951
/usr/local/X11R5/include
4952
/usr/local/X11R4/include
4953

    
4954
/usr/local/include/X11
4955
/usr/local/include/X11R7
4956
/usr/local/include/X11R6
4957
/usr/local/include/X11R5
4958
/usr/local/include/X11R4
4959

    
4960
/usr/X386/include
4961
/usr/x386/include
4962
/usr/XFree86/include/X11
4963

    
4964
/usr/include
4965
/usr/local/include
4966
/usr/unsupported/include
4967
/usr/athena/include
4968
/usr/local/x11r5/include
4969
/usr/lpp/Xamples/include
4970

    
4971
/usr/openwin/include
4972
/usr/openwin/share/include'
4973

    
4974
if test "$ac_x_includes" = no; then
4975
  # Guess where to find include files, by looking for Xlib.h.
4976
  # First, try using that file with no special directory specified.
4977
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978
/* end confdefs.h.  */
4979
#include <X11/Xlib.h>
4980
_ACEOF
4981
if ac_fn_cxx_try_cpp "$LINENO"; then :
4982
  # We can compile using X headers with no special include directory.
4983
ac_x_includes=
4984
else
4985
  for ac_dir in $ac_x_header_dirs; do
4986
  if test -r "$ac_dir/X11/Xlib.h"; then
4987
    ac_x_includes=$ac_dir
4988
    break
4989
  fi
4990
done
4991
fi
4992
rm -f conftest.err conftest.i conftest.$ac_ext
4993
fi # $ac_x_includes = no
4994

    
4995
if test "$ac_x_libraries" = no; then
4996
  # Check for the libraries.
4997
  # See if we find them without any special options.
4998
  # Don't add to $LIBS permanently.
4999
  ac_save_LIBS=$LIBS
5000
  LIBS="-lX11 $LIBS"
5001
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5002
/* end confdefs.h.  */
5003
#include <X11/Xlib.h>
5004
int
5005
main ()
5006
{
5007
XrmInitialize ()
5008
  ;
5009
  return 0;
5010
}
5011
_ACEOF
5012
if ac_fn_cxx_try_link "$LINENO"; then :
5013
  LIBS=$ac_save_LIBS
5014
# We can link X programs with no special library path.
5015
ac_x_libraries=
5016
else
5017
  LIBS=$ac_save_LIBS
5018
for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
5019
do
5020
  # Don't even attempt the hair of trying to link an X program!
5021
  for ac_extension in a so sl dylib la dll; do
5022
    if test -r "$ac_dir/libX11.$ac_extension"; then
5023
      ac_x_libraries=$ac_dir
5024
      break 2
5025
    fi
5026
  done
5027
done
5028
fi
5029
rm -f core conftest.err conftest.$ac_objext \
5030
    conftest$ac_exeext conftest.$ac_ext
5031
fi # $ac_x_libraries = no
5032

    
5033
case $ac_x_includes,$ac_x_libraries in #(
5034
  no,* | *,no | *\'*)
5035
    # Didn't find X, or a directory has "'" in its name.
5036
    ac_cv_have_x="have_x=no";; #(
5037
  *)
5038
    # Record where we found X for the cache.
5039
    ac_cv_have_x="have_x=yes\
5040
	ac_x_includes='$ac_x_includes'\
5041
	ac_x_libraries='$ac_x_libraries'"
5042
esac
5043
fi
5044
;; #(
5045
    *) have_x=yes;;
5046
  esac
5047
  eval "$ac_cv_have_x"
5048
fi # $with_x != no
5049

    
5050
if test "$have_x" != yes; then
5051
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
5052
$as_echo "$have_x" >&6; }
5053
  no_x=yes
5054
else
5055
  # If each of the values was on the command line, it overrides each guess.
5056
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5057
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5058
  # Update the cache value to reflect the command line values.
5059
  ac_cv_have_x="have_x=yes\
5060
	ac_x_includes='$x_includes'\
5061
	ac_x_libraries='$x_libraries'"
5062
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
5063
$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
5064
fi
5065

    
5066
            if test "$no_x" = "yes"; then
5067
                opp_x11inc=
5068
                opp_x11lib=
5069
            else
5070
               if test -n "$x_includes"; then
5071
                   opp_x11inc="-I$x_includes"
5072
               fi
5073
               if test -n "$x_libraries"; then
5074
                   opp_x11lib="-L$x_libraries -lX11"
5075
               fi
5076
            fi
5077
        fi
5078
        if test $tcltk_ok = no; then
5079

    
5080
   save_CXXFLAGS=$CXXFLAGS
5081
   save_LIBS=$LIBS
5082

    
5083
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86"
5084
   LIBS="$opp_x11lib -ltk86 -ltcl86"
5085

    
5086
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -ltk86 -ltcl86\"" >&5
5087
$as_echo_n "checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -ltk86 -ltcl86\"... " >&6; }
5088

    
5089
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5090
/* end confdefs.h.  */
5091
#include <tk.h>
5092
int
5093
main ()
5094
{
5095
Tk_MainLoop();
5096
  ;
5097
  return 0;
5098
}
5099
_ACEOF
5100
if ac_fn_cxx_try_link "$LINENO"; then :
5101
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5102
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk86 -ltcl86" TK_CFLAGS=$TK_CFLAGS86
5103
else
5104
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5105
$as_echo "no" >&6; }; tcltk_ok=no;
5106
fi
5107
rm -f core conftest.err conftest.$ac_objext \
5108
    conftest$ac_exeext conftest.$ac_ext
5109

    
5110
   CXXFLAGS=$save_CXXFLAGS
5111
   LIBS=$save_LIBS
5112

    
5113
        fi
5114
        if test $tcltk_ok = no; then
5115

    
5116
   save_CXXFLAGS=$CXXFLAGS
5117
   save_LIBS=$LIBS
5118

    
5119
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86"
5120
   LIBS="$opp_x11lib -ltk8.6 -ltcl8.6"
5121

    
5122
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -ltk8.6 -ltcl8.6\"" >&5
5123
$as_echo_n "checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -ltk8.6 -ltcl8.6\"... " >&6; }
5124

    
5125
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5126
/* end confdefs.h.  */
5127
#include <tk.h>
5128
int
5129
main ()
5130
{
5131
Tk_MainLoop();
5132
  ;
5133
  return 0;
5134
}
5135
_ACEOF
5136
if ac_fn_cxx_try_link "$LINENO"; then :
5137
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5138
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk8.6 -ltcl8.6" TK_CFLAGS=$TK_CFLAGS86
5139
else
5140
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141
$as_echo "no" >&6; }; tcltk_ok=no;
5142
fi
5143
rm -f core conftest.err conftest.$ac_objext \
5144
    conftest$ac_exeext conftest.$ac_ext
5145

    
5146
   CXXFLAGS=$save_CXXFLAGS
5147
   LIBS=$save_LIBS
5148

    
5149
        fi
5150
        if test $tcltk_ok = no -a "$cygwin" = yes; then
5151

    
5152
   save_CXXFLAGS=$CXXFLAGS
5153
   save_LIBS=$LIBS
5154

    
5155
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86"
5156
   LIBS="$opp_x11lib -lcygtk86 -lcygtcl86"
5157

    
5158
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -lcygtk86 -lcygtcl86\"" >&5
5159
$as_echo_n "checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -lcygtk86 -lcygtcl86\"... " >&6; }
5160

    
5161
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5162
/* end confdefs.h.  */
5163
#include <tk.h>
5164
int
5165
main ()
5166
{
5167
Tk_MainLoop();
5168
  ;
5169
  return 0;
5170
}
5171
_ACEOF
5172
if ac_fn_cxx_try_link "$LINENO"; then :
5173
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5174
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -lcygtk86 -lcygtcl86" TK_CFLAGS=$TK_CFLAGS86
5175
else
5176
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177
$as_echo "no" >&6; }; tcltk_ok=no;
5178
fi
5179
rm -f core conftest.err conftest.$ac_objext \
5180
    conftest$ac_exeext conftest.$ac_ext
5181

    
5182
   CXXFLAGS=$save_CXXFLAGS
5183
   LIBS=$save_LIBS
5184

    
5185
        fi
5186
        # check for 8.5
5187
        if test $tcltk_ok = no; then
5188

    
5189
   save_CXXFLAGS=$CXXFLAGS
5190
   save_LIBS=$LIBS
5191

    
5192
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85"
5193
   LIBS="$opp_x11lib -ltk85 -ltcl85"
5194

    
5195
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -ltk85 -ltcl85\"" >&5
5196
$as_echo_n "checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -ltk85 -ltcl85\"... " >&6; }
5197

    
5198
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199
/* end confdefs.h.  */
5200
#include <tk.h>
5201
int
5202
main ()
5203
{
5204
Tk_MainLoop();
5205
  ;
5206
  return 0;
5207
}
5208
_ACEOF
5209
if ac_fn_cxx_try_link "$LINENO"; then :
5210
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5211
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk85 -ltcl85" TK_CFLAGS=$TK_CFLAGS85
5212
else
5213
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5214
$as_echo "no" >&6; }; tcltk_ok=no;
5215
fi
5216
rm -f core conftest.err conftest.$ac_objext \
5217
    conftest$ac_exeext conftest.$ac_ext
5218

    
5219
   CXXFLAGS=$save_CXXFLAGS
5220
   LIBS=$save_LIBS
5221

    
5222
        fi
5223
        if test $tcltk_ok = no; then
5224

    
5225
   save_CXXFLAGS=$CXXFLAGS
5226
   save_LIBS=$LIBS
5227

    
5228
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85"
5229
   LIBS="$opp_x11lib -ltk8.5 -ltcl8.5"
5230

    
5231
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -ltk8.5 -ltcl8.5\"" >&5
5232
$as_echo_n "checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -ltk8.5 -ltcl8.5\"... " >&6; }
5233

    
5234
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235
/* end confdefs.h.  */
5236
#include <tk.h>
5237
int
5238
main ()
5239
{
5240
Tk_MainLoop();
5241
  ;
5242
  return 0;
5243
}
5244
_ACEOF
5245
if ac_fn_cxx_try_link "$LINENO"; then :
5246
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5247
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk8.5 -ltcl8.5" TK_CFLAGS=$TK_CFLAGS85
5248
else
5249
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5250
$as_echo "no" >&6; }; tcltk_ok=no;
5251
fi
5252
rm -f core conftest.err conftest.$ac_objext \
5253
    conftest$ac_exeext conftest.$ac_ext
5254

    
5255
   CXXFLAGS=$save_CXXFLAGS
5256
   LIBS=$save_LIBS
5257

    
5258
        fi
5259
        if test $tcltk_ok = no -a "$cygwin" = yes; then
5260

    
5261
   save_CXXFLAGS=$CXXFLAGS
5262
   save_LIBS=$LIBS
5263

    
5264
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85"
5265
   LIBS="$opp_x11lib -lcygtk85 -lcygtcl85"
5266

    
5267
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -lcygtk85 -lcygtcl85\"" >&5
5268
$as_echo_n "checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -lcygtk85 -lcygtcl85\"... " >&6; }
5269

    
5270
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5271
/* end confdefs.h.  */
5272
#include <tk.h>
5273
int
5274
main ()
5275
{
5276
Tk_MainLoop();
5277
  ;
5278
  return 0;
5279
}
5280
_ACEOF
5281
if ac_fn_cxx_try_link "$LINENO"; then :
5282
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5283
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -lcygtk85 -lcygtcl85" TK_CFLAGS=$TK_CFLAGS85
5284
else
5285
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5286
$as_echo "no" >&6; }; tcltk_ok=no;
5287
fi
5288
rm -f core conftest.err conftest.$ac_objext \
5289
    conftest$ac_exeext conftest.$ac_ext
5290

    
5291
   CXXFLAGS=$save_CXXFLAGS
5292
   LIBS=$save_LIBS
5293

    
5294
        fi
5295
        # check for 8.4
5296
        if test $tcltk_ok = no; then
5297

    
5298
   save_CXXFLAGS=$CXXFLAGS
5299
   save_LIBS=$LIBS
5300

    
5301
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84"
5302
   LIBS="$opp_x11lib -ltk84 -ltcl84"
5303

    
5304
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -ltk84 -ltcl84\"" >&5
5305
$as_echo_n "checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -ltk84 -ltcl84\"... " >&6; }
5306

    
5307
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5308
/* end confdefs.h.  */
5309
#include <tk.h>
5310
int
5311
main ()
5312
{
5313
Tk_MainLoop();
5314
  ;
5315
  return 0;
5316
}
5317
_ACEOF
5318
if ac_fn_cxx_try_link "$LINENO"; then :
5319
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5320
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk84 -ltcl84" TK_CFLAGS=$TK_CFLAGS84
5321
else
5322
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323
$as_echo "no" >&6; }; tcltk_ok=no;
5324
fi
5325
rm -f core conftest.err conftest.$ac_objext \
5326
    conftest$ac_exeext conftest.$ac_ext
5327

    
5328
   CXXFLAGS=$save_CXXFLAGS
5329
   LIBS=$save_LIBS
5330

    
5331
        fi
5332
        if test $tcltk_ok = no; then
5333

    
5334
   save_CXXFLAGS=$CXXFLAGS
5335
   save_LIBS=$LIBS
5336

    
5337
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84"
5338
   LIBS="$opp_x11lib -ltk8.4 -ltcl8.4"
5339

    
5340
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -ltk8.4 -ltcl8.4\"" >&5
5341
$as_echo_n "checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -ltk8.4 -ltcl8.4\"... " >&6; }
5342

    
5343
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5344
/* end confdefs.h.  */
5345
#include <tk.h>
5346
int
5347
main ()
5348
{
5349
Tk_MainLoop();
5350
  ;
5351
  return 0;
5352
}
5353
_ACEOF
5354
if ac_fn_cxx_try_link "$LINENO"; then :
5355
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5356
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk8.4 -ltcl8.4" TK_CFLAGS=$TK_CFLAGS84
5357
else
5358
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359
$as_echo "no" >&6; }; tcltk_ok=no;
5360
fi
5361
rm -f core conftest.err conftest.$ac_objext \
5362
    conftest$ac_exeext conftest.$ac_ext
5363

    
5364
   CXXFLAGS=$save_CXXFLAGS
5365
   LIBS=$save_LIBS
5366

    
5367
        fi
5368
        if test $tcltk_ok = no -a "$cygwin" = yes; then
5369

    
5370
   save_CXXFLAGS=$CXXFLAGS
5371
   save_LIBS=$LIBS
5372

    
5373
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84"
5374
   LIBS="$opp_x11lib -lcygtk84 -lcygtcl84"
5375

    
5376
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -lcygtk84 -lcygtcl84\"" >&5
5377
$as_echo_n "checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -lcygtk84 -lcygtcl84\"... " >&6; }
5378

    
5379
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5380
/* end confdefs.h.  */
5381
#include <tk.h>
5382
int
5383
main ()
5384
{
5385
Tk_MainLoop();
5386
  ;
5387
  return 0;
5388
}
5389
_ACEOF
5390
if ac_fn_cxx_try_link "$LINENO"; then :
5391
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5392
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -lcygtk84 -lcygtcl84" TK_CFLAGS=$TK_CFLAGS84
5393
else
5394
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5395
$as_echo "no" >&6; }; tcltk_ok=no;
5396
fi
5397
rm -f core conftest.err conftest.$ac_objext \
5398
    conftest$ac_exeext conftest.$ac_ext
5399

    
5400
   CXXFLAGS=$save_CXXFLAGS
5401
   LIBS=$save_LIBS
5402

    
5403
        fi
5404
    fi
5405

    
5406
    if test $tcltk_ok = no; then
5407
        # try to give a hint in the error message about the problem
5408
        if test "$no_x" = "yes"; then
5409
            if test "$cygwin" = yes; then
5410
                as_fn_error $? "Cannot build Tcl/Tk apps, probably due to missing X11 headers -- try installing the XFree86 packages or get the X headers from www.omnetpp.org." "$LINENO" 5
5411
            else
5412
                as_fn_error $? "Cannot build Tcl/Tk apps, probably due to misconfigured or missing X11 headers or libs. Check config.log for more info!" "$LINENO" 5
5413
            fi
5414
        else
5415
            as_fn_error $? "Tcl/Tk not found, needed for all GUI parts. Version 8.4.0+ and devel package required. Check config.log for more info!" "$LINENO" 5
5416
        fi
5417
    fi
5418

    
5419
    # Check for wish.
5420
    for ac_prog in $WISH wish wish86 wish8.6 wish85 wish8.5 wish84 wish8.4 cygwish cygwish86 cygwish85 cygwish84
5421
do
5422
  # Extract the first word of "$ac_prog", so it can be a program name with args.
5423
set dummy $ac_prog; ac_word=$2
5424
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425
$as_echo_n "checking for $ac_word... " >&6; }
5426
if test "${ac_cv_prog_WISH+set}" = set; then :
5427
  $as_echo_n "(cached) " >&6
5428
else
5429
  if test -n "$WISH"; then
5430
  ac_cv_prog_WISH="$WISH" # Let the user override the test.
5431
else
5432
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433
for as_dir in $PATH
5434
do
5435
  IFS=$as_save_IFS
5436
  test -z "$as_dir" && as_dir=.
5437
    for ac_exec_ext in '' $ac_executable_extensions; do
5438
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439
    ac_cv_prog_WISH="$ac_prog"
5440
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441
    break 2
5442
  fi
5443
done
5444
  done
5445
IFS=$as_save_IFS
5446

    
5447
fi
5448
fi
5449
WISH=$ac_cv_prog_WISH
5450
if test -n "$WISH"; then
5451
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WISH" >&5
5452
$as_echo "$WISH" >&6; }
5453
else
5454
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5455
$as_echo "no" >&6; }
5456
fi
5457

    
5458

    
5459
  test -n "$WISH" && break
5460
done
5461
test -n "$WISH" || WISH="nope"
5462

    
5463
    if test "$WISH" = nope; then
5464
       as_fn_error $? "Cannot find wish, part of Tcl/Tk -- maybe it is not in the PATH or has some exotic name (tested names were: wish wish86 wish8.6 wish85 wish8.5 wish84 wish8.4 cygwish cygwish86 cygwish85 cygwish84)" "$LINENO" 5
5465
    fi
5466
    if echo 'puts OK; exit' | $WISH | grep OK >/dev/null; then :; else
5467
        as_fn_error $? "Cannot run wish (wish command \"puts OK; exit\" failed): maybe you are not running X or DISPLAY environment variable not set?" "$LINENO" 5
5468
    fi
5469
    if echo 'catch {package require Tk 8.4; puts OK}; exit' | $WISH | grep OK >/dev/null; then :; else
5470
        as_fn_error $? "wish command \"package require Tk 8.4\" failed: probably old Tcl/Tk version, version 8.4.0+ required" "$LINENO" 5
5471
    fi
5472

    
5473
    # note: square brackets necessary otherwise M4 messes up the Tcl command
5474
    tcl_library=`echo 'puts [info library]; exit' | $WISH`
5475

    
5476

    
5477
    #----------------------
5478
    # Check for BLT. NOTE: since plove and scalars are out, blt-devel is no longer needed
5479
    #----------------------
5480
    if echo 'catch {package require BLT 2.4; puts OK}; exit' | $WISH | grep OK >/dev/null; then
5481
        HAVE_BLT=yes
5482
    else
5483
        HAVE_BLT=no
5484
        # Native Tcl/Tk (aqua) on Mac OS does not support BLT so we do not annoy the users
5485
        if test "$PLATFORM" != "macosx"; then
5486
            OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES  BLT (optional)"
5487
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Tcl cannot load BLT (wish command \"package require BLT 2.4\" failed), BLT not installed?" >&5
5488
$as_echo "$as_me: WARNING: Tcl cannot load BLT (wish command \"package require BLT 2.4\" failed), BLT not installed?" >&2;}
5489
        fi
5490
    fi
5491

    
5492
    # if we got through until here, enable building of the following progs:
5493
    TKENV_IF_POSSIBLE=tkenv
5494

    
5495
    # and build samples using Tkenv
5496
    ALL_ENV_LIBS='$(TKENV_LIBS) $(CMDENV_LIBS)'
5497

    
5498
fi # end of Tcl tests ($NO_TCL=="" branch)
5499

    
5500
#----------------------
5501
# Check for pthread
5502
#----------------------
5503

    
5504
   save_CXXFLAGS=$CXXFLAGS
5505
   save_LIBS=$LIBS
5506

    
5507
   CXXFLAGS="$PTHREAD_CFLAGS"
5508
   LIBS="$PTHREAD_LIBS"
5509

    
5510
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD with CFLAGS=\"$PTHREAD_CFLAGS\" LIBS=\"$PTHREAD_LIBS\"" >&5
5511
$as_echo_n "checking for PTHREAD with CFLAGS=\"$PTHREAD_CFLAGS\" LIBS=\"$PTHREAD_LIBS\"... " >&6; }
5512

    
5513
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5514
/* end confdefs.h.  */
5515
#include <pthread.h>
5516
int
5517
main ()
5518
{
5519
pthread_join;
5520
  ;
5521
  return 0;
5522
}
5523
_ACEOF
5524
if ac_fn_cxx_try_link "$LINENO"; then :
5525
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5526
$as_echo "yes" >&6; }; pthread_ok=yes;
5527
else
5528
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529
$as_echo "no" >&6; }; pthread_ok=no;
5530
fi
5531
rm -f core conftest.err conftest.$ac_objext \
5532
    conftest$ac_exeext conftest.$ac_ext
5533

    
5534
   CXXFLAGS=$save_CXXFLAGS
5535
   LIBS=$save_LIBS
5536

    
5537
if test $pthread_ok = no; then
5538
	as_fn_error $? "pthread lib not found." "$LINENO" 5
5539
fi
5540

    
5541
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
5542
SYS_LIBS="$SYS_LIBS $PTHREAD_LIBS"
5543

    
5544

    
5545
#----------------------
5546
# Check for libatomic-ops-dev
5547
#----------------------
5548

    
5549
   save_CXXFLAGS=$CXXFLAGS
5550
   save_LIBS=$LIBS
5551

    
5552
   CXXFLAGS="$ATOMIC_OPS_CFLAGS"
5553
   LIBS="$ATOMIC_OPS_LIBS"
5554

    
5555
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATOMIC-OPS with CFLAGS=\"$ATOMIC_OPS_CFLAGS\" LIBS=\"$ATOMIC_OPS_LIBS\"" >&5
5556
$as_echo_n "checking for ATOMIC-OPS with CFLAGS=\"$ATOMIC_OPS_CFLAGS\" LIBS=\"$ATOMIC_OPS_LIBS\"... " >&6; }
5557

    
5558
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5559
/* end confdefs.h.  */
5560
#include <atomic_ops.h>
5561
int
5562
main ()
5563
{
5564
AO_load;
5565
  ;
5566
  return 0;
5567
}
5568
_ACEOF
5569
if ac_fn_cxx_try_link "$LINENO"; then :
5570
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5571
$as_echo "yes" >&6; }; atomic_ops_ok=yes;
5572
else
5573
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574
$as_echo "no" >&6; }; atomic_ops_ok=no;
5575
fi
5576
rm -f core conftest.err conftest.$ac_objext \
5577
    conftest$ac_exeext conftest.$ac_ext
5578

    
5579
   CXXFLAGS=$save_CXXFLAGS
5580
   LIBS=$save_LIBS
5581

    
5582
if test $atomic_ops_ok = no; then
5583
    as_fn_error $? "libatomic-ops not found. You can disable use of this library in configure.user, but be warned that this might cause data corruption at runtime." "$LINENO" 5
5584
fi
5585

    
5586
CFLAGS="$CFLAGS $ATOMIC_OPS_CFLAGS"
5587
USER_CFLAGS="$USER_CFLAGS $ATOMIC_OPS_CFLAGS"
5588
SYS_LIBS="$SYS_LIBS $ATOMIC_OPS_LIBS"
5589

    
5590
#----------------------
5591
# Check for JRE
5592
#----------------------
5593
for ac_prog in $JRE java
5594
do
5595
  # Extract the first word of "$ac_prog", so it can be a program name with args.
5596
set dummy $ac_prog; ac_word=$2
5597
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5598
$as_echo_n "checking for $ac_word... " >&6; }
5599
if test "${ac_cv_prog_JRE+set}" = set; then :
5600
  $as_echo_n "(cached) " >&6
5601
else
5602
  if test -n "$JRE"; then
5603
  ac_cv_prog_JRE="$JRE" # Let the user override the test.
5604
else
5605
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5606
for as_dir in $PATH
5607
do
5608
  IFS=$as_save_IFS
5609
  test -z "$as_dir" && as_dir=.
5610
    for ac_exec_ext in '' $ac_executable_extensions; do
5611
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5612
    ac_cv_prog_JRE="$ac_prog"
5613
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5614
    break 2
5615
  fi
5616
done
5617
  done
5618
IFS=$as_save_IFS
5619

    
5620
fi
5621
fi
5622
JRE=$ac_cv_prog_JRE
5623
if test -n "$JRE"; then
5624
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JRE" >&5
5625
$as_echo "$JRE" >&6; }
5626
else
5627
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5628
$as_echo "no" >&6; }
5629
fi
5630

    
5631

    
5632
  test -n "$JRE" && break
5633
done
5634
test -n "$JRE" || JRE="nope"
5635

    
5636
if test "$JRE" = nope; then
5637
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES  JRE (recommended)"
5638
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find a suitable Java Runtime Environment - The IDE requires JRE 1.5 or later. Please install it before configuring" >&5
5639
$as_echo "$as_me: WARNING: Cannot find a suitable Java Runtime Environment - The IDE requires JRE 1.5 or later. Please install it before configuring" >&2;}
5640
fi
5641

    
5642
#----------------------
5643
# Check for JDK
5644
#----------------------
5645

    
5646
if test "$JAVA_CFLAGS" = ""; then
5647
   if test "$JDK" = ""; then
5648
     javahome_candidates="/usr/lib/jvm/java /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-1.6.0-sun /usr/lib/jvm/java-5-sun /usr/lib/jvm/java-1.5.0-sun /usr/java/jdk /Library/Java/Home"
5649
     for dir in $javahome_candidates; do
5650
         if test "$JAVA_HOME" = "" -a -d "$dir"; then
5651
             JAVA_HOME=$dir
5652
         fi
5653
     done
5654
   else
5655
     JAVA_HOME=$JDK
5656
   fi
5657
   if test "$JAVA_HOME" = ""; then
5658
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JAVA_HOME variable not set." >&5
5659
$as_echo "$as_me: WARNING: JAVA_HOME variable not set." >&2;}
5660
   else
5661
      JAVA_CFLAGS="-fno-strict-aliasing -I$JAVA_HOME/include -I$JAVA_HOME/include/$jni_platform"
5662
      JAVA_LIBS="-L$JAVA_HOME/jre/lib/i386/client -Wl,-rpath,$JAVA_HOME/jre/lib/i386/client:. -ljvm"
5663
   fi
5664
fi
5665

    
5666

    
5667
   save_CXXFLAGS=$CXXFLAGS
5668
   CXXFLAGS="$CFLAGS_RELEASE $JAVA_CFLAGS"
5669

    
5670
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI with CFLAGS=\"$CFLAGS_RELEASE $JAVA_CFLAGS\"" >&5
5671
$as_echo_n "checking for JNI with CFLAGS=\"$CFLAGS_RELEASE $JAVA_CFLAGS\"... " >&6; }
5672

    
5673
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674
/* end confdefs.h.  */
5675
#include <jni.h>
5676
int
5677
main ()
5678
{
5679
JNI_GetCreatedJavaVMs(0,0,0);
5680
  ;
5681
  return 0;
5682
}
5683
_ACEOF
5684
if ac_fn_cxx_try_compile "$LINENO"; then :
5685
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5686
$as_echo "yes" >&6; }; jni_ok=yes;
5687
else
5688
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689
$as_echo "no" >&6; }; jni_ok=no;
5690
fi
5691
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5692

    
5693
   CXXFLAGS=$save_CXXFLAGS
5694

    
5695

    
5696
if test "$jni_ok" = "no" -o "$SWIG" = "not found"; then
5697
   JNILIBS_IF_POSSIBLE=missing-dependency