Statistics
| Branch: | Revision:

root / configure @ b6c9a58c

History | View | Annotate | Download (226 KB)

1
#! /bin/sh
2
# Guess values for system-dependent variables and create Makefiles.
3
# Generated by GNU Autoconf 2.68.
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
as_myself=
93
case $0 in #((
94
  *[\\/]* ) as_myself=$0 ;;
95
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96
for as_dir in $PATH
97
do
98
  IFS=$as_save_IFS
99
  test -z "$as_dir" && as_dir=.
100
    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101
  done
102
IFS=$as_save_IFS
103

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

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

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

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

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

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

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

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

    
212

    
213
      if test "x$CONFIG_SHELL" != x; then :
214
  # We cannot yet assume a decent shell, so we have to provide a
215
	# neutralization value for shells without unset; and this also
216
	# works around shells that cannot unset nonexistent variables.
217
	# Preserve -v and -x to the replacement shell.
218
	BASH_ENV=/dev/null
219
	ENV=/dev/null
220
	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
221
	export CONFIG_SHELL
222
	case $- in # ((((
223
	  *v*x* | *x*v* ) as_opts=-vx ;;
224
	  *v* ) as_opts=-v ;;
225
	  *x* ) as_opts=-x ;;
226
	  * ) as_opts= ;;
227
	esac
228
	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
229
fi
230

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

    
253
## --------------------- ##
254
## M4sh Shell Functions. ##
255
## --------------------- ##
256
# as_fn_unset VAR
257
# ---------------
258
# Portably unset VAR.
259
as_fn_unset ()
260
{
261
  { eval $1=; unset $1;}
262
}
263
as_unset=as_fn_unset
264

    
265
# as_fn_set_status STATUS
266
# -----------------------
267
# Set $? to STATUS, without forking.
268
as_fn_set_status ()
269
{
270
  return $1
271
} # as_fn_set_status
272

    
273
# as_fn_exit STATUS
274
# -----------------
275
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
276
as_fn_exit ()
277
{
278
  set +e
279
  as_fn_set_status $1
280
  exit $1
281
} # as_fn_exit
282

    
283
# as_fn_mkdir_p
284
# -------------
285
# Create "$as_dir" as a directory, including parents if necessary.
286
as_fn_mkdir_p ()
287
{
288

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

    
328

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

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

    
365

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

    
382
if expr a : '\(a\)' >/dev/null 2>&1 &&
383
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
384
  as_expr=expr
385
else
386
  as_expr=false
387
fi
388

    
389
if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
390
  as_basename=basename
391
else
392
  as_basename=false
393
fi
394

    
395
if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
396
  as_dirname=dirname
397
else
398
  as_dirname=false
399
fi
400

    
401
as_me=`$as_basename -- "$0" ||
402
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
403
	 X"$0" : 'X\(//\)$' \| \
404
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
405
$as_echo X/"$0" |
406
    sed '/^.*\/\([^/][^/]*\)\/*$/{
407
	    s//\1/
408
	    q
409
	  }
410
	  /^X\/\(\/\/\)$/{
411
	    s//\1/
412
	    q
413
	  }
414
	  /^X\/\(\/\).*/{
415
	    s//\1/
416
	    q
417
	  }
418
	  s/.*/./; q'`
419

    
420
# Avoid depending upon Character Ranges.
421
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
422
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
423
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
424
as_cr_digits='0123456789'
425
as_cr_alnum=$as_cr_Letters$as_cr_digits
426

    
427

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

    
451
  # Don't try to exec as it changes $[0], causing all sort of problems
452
  # (the dirname of $[0] is not the place where we might find the
453
  # original and so on.  Autoconf is especially sensitive to this).
454
  . "./$as_me.lineno"
455
  # Exit status is that of the last command.
456
  exit
457
}
458

    
459
ECHO_C= ECHO_N= ECHO_T=
460
case `echo -n x` in #(((((
461
-n*)
462
  case `echo 'xy\c'` in
463
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
464
  xy)  ECHO_C='\c';;
465
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
466
       ECHO_T='	';;
467
  esac;;
468
*)
469
  ECHO_N='-n';;
470
esac
471

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

    
499
if mkdir -p . 2>/dev/null; then
500
  as_mkdir_p='mkdir -p "$as_dir"'
501
else
502
  test -d ./-p && rmdir ./-p
503
  as_mkdir_p=false
504
fi
505

    
506
if test -x / >/dev/null 2>&1; then
507
  as_test_x='test -x'
508
else
509
  if ls -dL / >/dev/null 2>&1; then
510
    as_ls_L_option=L
511
  else
512
    as_ls_L_option=
513
  fi
514
  as_test_x='
515
    eval sh -c '\''
516
      if test -d "$1"; then
517
	test -d "$1/.";
518
      else
519
	case $1 in #(
520
	-*)set "./$1";;
521
	esac;
522
	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
523
	???[sx]*):;;*)false;;esac;fi
524
    '\'' sh
525
  '
526
fi
527
as_executable_p=$as_test_x
528

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

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

    
535

    
536
test -n "$DJDIR" || exec 7<&0 </dev/null
537
exec 6>&1
538

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

    
544
#
545
# Initializations.
546
#
547
ac_default_prefix=/usr/local
548
ac_clean_files=
549
ac_config_libobj_dir=.
550
LIBOBJS=
551
cross_compiling=no
552
subdirs=
553
MFLAGS=
554
MAKEFLAGS=
555

    
556
# Identity of this package.
557
PACKAGE_NAME=
558
PACKAGE_TARNAME=
559
PACKAGE_VERSION=
560
PACKAGE_STRING=
561
PACKAGE_BUGREPORT=
562
PACKAGE_URL=
563

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

    
736

    
737
# Initialize some variables set by options.
738
ac_init_help=
739
ac_init_version=false
740
ac_unrecognized_opts=
741
ac_unrecognized_sep=
742
# The variables have the same names as the options, with
743
# dashes changed to underlines.
744
cache_file=/dev/null
745
exec_prefix=NONE
746
no_create=
747
no_recursion=
748
prefix=NONE
749
program_prefix=NONE
750
program_suffix=NONE
751
program_transform_name=s,x,x,
752
silent=
753
site=
754
srcdir=
755
verbose=
756
x_includes=NONE
757
x_libraries=NONE
758

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

    
785
ac_prev=
786
ac_dashdash=
787
for ac_option
788
do
789
  # If the previous option needs an argument, assign it.
790
  if test -n "$ac_prev"; then
791
    eval $ac_prev=\$ac_option
792
    ac_prev=
793
    continue
794
  fi
795

    
796
  case $ac_option in
797
  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
798
  *=)   ac_optarg= ;;
799
  *)    ac_optarg=yes ;;
800
  esac
801

    
802
  # Accept the important Cygnus configure options, so we can diagnose typos.
803

    
804
  case $ac_dashdash$ac_option in
805
  --)
806
    ac_dashdash=yes ;;
807

    
808
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
809
    ac_prev=bindir ;;
810
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
811
    bindir=$ac_optarg ;;
812

    
813
  -build | --build | --buil | --bui | --bu)
814
    ac_prev=build_alias ;;
815
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
816
    build_alias=$ac_optarg ;;
817

    
818
  -cache-file | --cache-file | --cache-fil | --cache-fi \
819
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
820
    ac_prev=cache_file ;;
821
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
822
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
823
    cache_file=$ac_optarg ;;
824

    
825
  --config-cache | -C)
826
    cache_file=config.cache ;;
827

    
828
  -datadir | --datadir | --datadi | --datad)
829
    ac_prev=datadir ;;
830
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
831
    datadir=$ac_optarg ;;
832

    
833
  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
834
  | --dataroo | --dataro | --datar)
835
    ac_prev=datarootdir ;;
836
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
837
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
838
    datarootdir=$ac_optarg ;;
839

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

    
856
  -docdir | --docdir | --docdi | --doc | --do)
857
    ac_prev=docdir ;;
858
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859
    docdir=$ac_optarg ;;
860

    
861
  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862
    ac_prev=dvidir ;;
863
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864
    dvidir=$ac_optarg ;;
865

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

    
882
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
883
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
884
  | --exec | --exe | --ex)
885
    ac_prev=exec_prefix ;;
886
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
887
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
888
  | --exec=* | --exe=* | --ex=*)
889
    exec_prefix=$ac_optarg ;;
890

    
891
  -gas | --gas | --ga | --g)
892
    # Obsolete; use --with-gas.
893
    with_gas=yes ;;
894

    
895
  -help | --help | --hel | --he | -h)
896
    ac_init_help=long ;;
897
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
898
    ac_init_help=recursive ;;
899
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
900
    ac_init_help=short ;;
901

    
902
  -host | --host | --hos | --ho)
903
    ac_prev=host_alias ;;
904
  -host=* | --host=* | --hos=* | --ho=*)
905
    host_alias=$ac_optarg ;;
906

    
907
  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
908
    ac_prev=htmldir ;;
909
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
910
  | --ht=*)
911
    htmldir=$ac_optarg ;;
912

    
913
  -includedir | --includedir | --includedi | --included | --include \
914
  | --includ | --inclu | --incl | --inc)
915
    ac_prev=includedir ;;
916
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
917
  | --includ=* | --inclu=* | --incl=* | --inc=*)
918
    includedir=$ac_optarg ;;
919

    
920
  -infodir | --infodir | --infodi | --infod | --info | --inf)
921
    ac_prev=infodir ;;
922
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
923
    infodir=$ac_optarg ;;
924

    
925
  -libdir | --libdir | --libdi | --libd)
926
    ac_prev=libdir ;;
927
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
928
    libdir=$ac_optarg ;;
929

    
930
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
931
  | --libexe | --libex | --libe)
932
    ac_prev=libexecdir ;;
933
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
934
  | --libexe=* | --libex=* | --libe=*)
935
    libexecdir=$ac_optarg ;;
936

    
937
  -localedir | --localedir | --localedi | --localed | --locale)
938
    ac_prev=localedir ;;
939
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
940
    localedir=$ac_optarg ;;
941

    
942
  -localstatedir | --localstatedir | --localstatedi | --localstated \
943
  | --localstate | --localstat | --localsta | --localst | --locals)
944
    ac_prev=localstatedir ;;
945
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
946
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
947
    localstatedir=$ac_optarg ;;
948

    
949
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
950
    ac_prev=mandir ;;
951
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
952
    mandir=$ac_optarg ;;
953

    
954
  -nfp | --nfp | --nf)
955
    # Obsolete; use --without-fp.
956
    with_fp=no ;;
957

    
958
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959
  | --no-cr | --no-c | -n)
960
    no_create=yes ;;
961

    
962
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
963
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
964
    no_recursion=yes ;;
965

    
966
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
967
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
968
  | --oldin | --oldi | --old | --ol | --o)
969
    ac_prev=oldincludedir ;;
970
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
971
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
972
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
973
    oldincludedir=$ac_optarg ;;
974

    
975
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
976
    ac_prev=prefix ;;
977
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
978
    prefix=$ac_optarg ;;
979

    
980
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
981
  | --program-pre | --program-pr | --program-p)
982
    ac_prev=program_prefix ;;
983
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
984
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
985
    program_prefix=$ac_optarg ;;
986

    
987
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
988
  | --program-suf | --program-su | --program-s)
989
    ac_prev=program_suffix ;;
990
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
991
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
992
    program_suffix=$ac_optarg ;;
993

    
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
    ac_prev=program_transform_name ;;
1002
  -program-transform-name=* | --program-transform-name=* \
1003
  | --program-transform-nam=* | --program-transform-na=* \
1004
  | --program-transform-n=* | --program-transform-=* \
1005
  | --program-transform=* | --program-transfor=* \
1006
  | --program-transfo=* | --program-transf=* \
1007
  | --program-trans=* | --program-tran=* \
1008
  | --progr-tra=* | --program-tr=* | --program-t=*)
1009
    program_transform_name=$ac_optarg ;;
1010

    
1011
  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1012
    ac_prev=pdfdir ;;
1013
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1014
    pdfdir=$ac_optarg ;;
1015

    
1016
  -psdir | --psdir | --psdi | --psd | --ps)
1017
    ac_prev=psdir ;;
1018
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1019
    psdir=$ac_optarg ;;
1020

    
1021
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1022
  | -silent | --silent | --silen | --sile | --sil)
1023
    silent=yes ;;
1024

    
1025
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1026
    ac_prev=sbindir ;;
1027
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1028
  | --sbi=* | --sb=*)
1029
    sbindir=$ac_optarg ;;
1030

    
1031
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1032
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1033
  | --sharedst | --shareds | --shared | --share | --shar \
1034
  | --sha | --sh)
1035
    ac_prev=sharedstatedir ;;
1036
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1037
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1038
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1039
  | --sha=* | --sh=*)
1040
    sharedstatedir=$ac_optarg ;;
1041

    
1042
  -site | --site | --sit)
1043
    ac_prev=site ;;
1044
  -site=* | --site=* | --sit=*)
1045
    site=$ac_optarg ;;
1046

    
1047
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1048
    ac_prev=srcdir ;;
1049
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1050
    srcdir=$ac_optarg ;;
1051

    
1052
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1053
  | --syscon | --sysco | --sysc | --sys | --sy)
1054
    ac_prev=sysconfdir ;;
1055
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1056
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1057
    sysconfdir=$ac_optarg ;;
1058

    
1059
  -target | --target | --targe | --targ | --tar | --ta | --t)
1060
    ac_prev=target_alias ;;
1061
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1062
    target_alias=$ac_optarg ;;
1063

    
1064
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1065
    verbose=yes ;;
1066

    
1067
  -version | --version | --versio | --versi | --vers | -V)
1068
    ac_init_version=: ;;
1069

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

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

    
1102
  --x)
1103
    # Obsolete; use --with-x.
1104
    with_x=yes ;;
1105

    
1106
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1107
  | --x-incl | --x-inc | --x-in | --x-i)
1108
    ac_prev=x_includes ;;
1109
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1110
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1111
    x_includes=$ac_optarg ;;
1112

    
1113
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1114
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1115
    ac_prev=x_libraries ;;
1116
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1117
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1118
    x_libraries=$ac_optarg ;;
1119

    
1120
  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1121
Try \`$0 --help' for more information"
1122
    ;;
1123

    
1124
  *=*)
1125
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1126
    # Reject names that are not valid shell variable names.
1127
    case $ac_envvar in #(
1128
      '' | [0-9]* | *[!_$as_cr_alnum]* )
1129
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1130
    esac
1131
    eval $ac_envvar=\$ac_optarg
1132
    export $ac_envvar ;;
1133

    
1134
  *)
1135
    # FIXME: should be removed in autoconf 3.0.
1136
    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1137
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1138
      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1139
    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1140
    ;;
1141

    
1142
  esac
1143
done
1144

    
1145
if test -n "$ac_prev"; then
1146
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1147
  as_fn_error $? "missing argument to $ac_option"
1148
fi
1149

    
1150
if test -n "$ac_unrecognized_opts"; then
1151
  case $enable_option_checking in
1152
    no) ;;
1153
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1154
    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1155
  esac
1156
fi
1157

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

    
1179
# There might be people who depend on the old broken behavior: `$host'
1180
# used to hold the argument of --host etc.
1181
# FIXME: To remove some day.
1182
build=$build_alias
1183
host=$host_alias
1184
target=$target_alias
1185

    
1186
# FIXME: To remove some day.
1187
if test "x$host_alias" != x; then
1188
  if test "x$build_alias" = x; then
1189
    cross_compiling=maybe
1190
    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1191
    If a cross compiler is detected then cross compile mode will be used" >&2
1192
  elif test "x$build_alias" != "x$host_alias"; then
1193
    cross_compiling=yes
1194
  fi
1195
fi
1196

    
1197
ac_tool_prefix=
1198
test -n "$host_alias" && ac_tool_prefix=$host_alias-
1199

    
1200
test "$silent" = yes && exec 6>/dev/null
1201

    
1202

    
1203
ac_pwd=`pwd` && test -n "$ac_pwd" &&
1204
ac_ls_di=`ls -di .` &&
1205
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1206
  as_fn_error $? "working directory cannot be determined"
1207
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1208
  as_fn_error $? "pwd does not report name of working directory"
1209

    
1210

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

    
1270
#
1271
# Report the --help message.
1272
#
1273
if test "$ac_init_help" = "long"; then
1274
  # Omit some internal or obsolete options to make the list less imposing.
1275
  # This message is too long to be a string in the A/UX 3.1 sh.
1276
  cat <<_ACEOF
1277
\`configure' configures this package to adapt to many kinds of systems.
1278

    
1279
Usage: $0 [OPTION]... [VAR=VALUE]...
1280

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

    
1284
Defaults for the options are specified in brackets.
1285

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

    
1297
Installation directories:
1298
  --prefix=PREFIX         install architecture-independent files in PREFIX
1299
                          [$ac_default_prefix]
1300
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1301
                          [PREFIX]
1302

    
1303
By default, \`make install' will install all the files in
1304
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1305
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1306
for instance \`--prefix=\$HOME'.
1307

    
1308
For better control, use the options below.
1309

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

    
1332
  cat <<\_ACEOF
1333

    
1334
X features:
1335
  --x-includes=DIR    X include files are in DIR
1336
  --x-libraries=DIR   X library files are in DIR
1337

    
1338
System types:
1339
  --build=BUILD     configure for building on BUILD [guessed]
1340
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1341
_ACEOF
1342
fi
1343

    
1344
if test -n "$ac_init_help"; then
1345

    
1346
  cat <<\_ACEOF
1347

    
1348
Optional Packages:
1349
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1350
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1351
  --with-x                use the X Window System
1352

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

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

    
1377
Report bugs to the package provider.
1378
_ACEOF
1379
ac_status=$?
1380
fi
1381

    
1382
if test "$ac_init_help" = "recursive"; then
1383
  # If there are subdirs, report their specific --help.
1384
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1385
    test -d "$ac_dir" ||
1386
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1387
      continue
1388
    ac_builddir=.
1389

    
1390
case "$ac_dir" in
1391
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1392
*)
1393
  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1394
  # A ".." for each directory in $ac_dir_suffix.
1395
  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1396
  case $ac_top_builddir_sub in
1397
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1399
  esac ;;
1400
esac
1401
ac_abs_top_builddir=$ac_pwd
1402
ac_abs_builddir=$ac_pwd$ac_dir_suffix
1403
# for backward compatibility:
1404
ac_top_builddir=$ac_top_build_prefix
1405

    
1406
case $srcdir in
1407
  .)  # We are building in place.
1408
    ac_srcdir=.
1409
    ac_top_srcdir=$ac_top_builddir_sub
1410
    ac_abs_top_srcdir=$ac_pwd ;;
1411
  [\\/]* | ?:[\\/]* )  # Absolute name.
1412
    ac_srcdir=$srcdir$ac_dir_suffix;
1413
    ac_top_srcdir=$srcdir
1414
    ac_abs_top_srcdir=$srcdir ;;
1415
  *) # Relative name.
1416
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1417
    ac_top_srcdir=$ac_top_build_prefix$srcdir
1418
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1419
esac
1420
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1421

    
1422
    cd "$ac_dir" || { ac_status=$?; continue; }
1423
    # Check for guested configure.
1424
    if test -f "$ac_srcdir/configure.gnu"; then
1425
      echo &&
1426
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1427
    elif test -f "$ac_srcdir/configure"; then
1428
      echo &&
1429
      $SHELL "$ac_srcdir/configure" --help=recursive
1430
    else
1431
      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1432
    fi || ac_status=$?
1433
    cd "$ac_pwd" || { ac_status=$?; break; }
1434
  done
1435
fi
1436

    
1437
test -n "$ac_init_help" && exit $ac_status
1438
if $ac_init_version; then
1439
  cat <<\_ACEOF
1440
configure
1441
generated by GNU Autoconf 2.68
1442

    
1443
Copyright (C) 2010 Free Software Foundation, Inc.
1444
This configure script is free software; the Free Software Foundation
1445
gives unlimited permission to copy, distribute and modify it.
1446
_ACEOF
1447
  exit
1448
fi
1449

    
1450
## ------------------------ ##
1451
## Autoconf initialization. ##
1452
## ------------------------ ##
1453

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

    
1485
	ac_retval=1
1486
fi
1487
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1488
  as_fn_set_status $ac_retval
1489

    
1490
} # ac_fn_c_try_compile
1491

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

    
1523
	ac_retval=1
1524
fi
1525
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1526
  as_fn_set_status $ac_retval
1527

    
1528
} # ac_fn_cxx_try_compile
1529

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

    
1564
	ac_retval=1
1565
fi
1566
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1567
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1568
  # interfere with the next link command; also delete a directory that is
1569
  # left behind by Apple's compiler.  We do this before executing the actions.
1570
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1571
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1572
  as_fn_set_status $ac_retval
1573

    
1574
} # ac_fn_cxx_try_link
1575

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

    
1606
    ac_retval=1
1607
fi
1608
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1609
  as_fn_set_status $ac_retval
1610

    
1611
} # ac_fn_cxx_try_cpp
1612

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

    
1647
       ac_retval=$ac_status
1648
fi
1649
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1650
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1651
  as_fn_set_status $ac_retval
1652

    
1653
} # ac_fn_cxx_try_run
1654
cat >config.log <<_ACEOF
1655
This file contains any messages produced by compilers while
1656
running configure, to aid debugging if configure makes a mistake.
1657

    
1658
It was created by $as_me, which was
1659
generated by GNU Autoconf 2.68.  Invocation command line was
1660

    
1661
  $ $0 $@
1662

    
1663
_ACEOF
1664
exec 5>>config.log
1665
{
1666
cat <<_ASUNAME
1667
## --------- ##
1668
## Platform. ##
1669
## --------- ##
1670

    
1671
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1672
uname -m = `(uname -m) 2>/dev/null || echo unknown`
1673
uname -r = `(uname -r) 2>/dev/null || echo unknown`
1674
uname -s = `(uname -s) 2>/dev/null || echo unknown`
1675
uname -v = `(uname -v) 2>/dev/null || echo unknown`
1676

    
1677
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1678
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1679

    
1680
/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1681
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1682
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1683
/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1684
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1685
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1686
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1687

    
1688
_ASUNAME
1689

    
1690
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1691
for as_dir in $PATH
1692
do
1693
  IFS=$as_save_IFS
1694
  test -z "$as_dir" && as_dir=.
1695
    $as_echo "PATH: $as_dir"
1696
  done
1697
IFS=$as_save_IFS
1698

    
1699
} >&5
1700

    
1701
cat >&5 <<_ACEOF
1702

    
1703

    
1704
## ----------- ##
1705
## Core tests. ##
1706
## ----------- ##
1707

    
1708
_ACEOF
1709

    
1710

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

    
1759
# When interrupted or exit'd, cleanup temporary files, and complete
1760
# config.log.  We remove comments because anyway the quotes in there
1761
# would cause problems or look ugly.
1762
# WARNING: Use '\'' to represent an apostrophe within the trap.
1763
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1764
trap 'exit_status=$?
1765
  # Save into config.log some information that might help in debugging.
1766
  {
1767
    echo
1768

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

    
1805
    $as_echo "## ----------------- ##
1806
## Output variables. ##
1807
## ----------------- ##"
1808
    echo
1809
    for ac_var in $ac_subst_vars
1810
    do
1811
      eval ac_val=\$$ac_var
1812
      case $ac_val in
1813
      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1814
      esac
1815
      $as_echo "$ac_var='\''$ac_val'\''"
1816
    done | sort
1817
    echo
1818

    
1819
    if test -n "$ac_subst_files"; then
1820
      $as_echo "## ------------------- ##
1821
## File substitutions. ##
1822
## ------------------- ##"
1823
      echo
1824
      for ac_var in $ac_subst_files
1825
      do
1826
	eval ac_val=\$$ac_var
1827
	case $ac_val in
1828
	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1829
	esac
1830
	$as_echo "$ac_var='\''$ac_val'\''"
1831
      done | sort
1832
      echo
1833
    fi
1834

    
1835
    if test -s confdefs.h; then
1836
      $as_echo "## ----------- ##
1837
## confdefs.h. ##
1838
## ----------- ##"
1839
      echo
1840
      cat confdefs.h
1841
      echo
1842
    fi
1843
    test "$ac_signal" != 0 &&
1844
      $as_echo "$as_me: caught signal $ac_signal"
1845
    $as_echo "$as_me: exit $exit_status"
1846
  } >&5
1847
  rm -f core *.core core.conftest.* &&
1848
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1849
    exit $exit_status
1850
' 0
1851
for ac_signal in 1 2 13 15; do
1852
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1853
done
1854
ac_signal=0
1855

    
1856
# confdefs.h avoids OS command line length limits that DEFS can exceed.
1857
rm -f -r conftest* confdefs.h
1858

    
1859
$as_echo "/* confdefs.h */" > confdefs.h
1860

    
1861
# Predefined preprocessor variables.
1862

    
1863
cat >>confdefs.h <<_ACEOF
1864
#define PACKAGE_NAME "$PACKAGE_NAME"
1865
_ACEOF
1866

    
1867
cat >>confdefs.h <<_ACEOF
1868
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1869
_ACEOF
1870

    
1871
cat >>confdefs.h <<_ACEOF
1872
#define PACKAGE_VERSION "$PACKAGE_VERSION"
1873
_ACEOF
1874

    
1875
cat >>confdefs.h <<_ACEOF
1876
#define PACKAGE_STRING "$PACKAGE_STRING"
1877
_ACEOF
1878

    
1879
cat >>confdefs.h <<_ACEOF
1880
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1881
_ACEOF
1882

    
1883
cat >>confdefs.h <<_ACEOF
1884
#define PACKAGE_URL "$PACKAGE_URL"
1885
_ACEOF
1886

    
1887

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

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

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

    
1999
ac_ext=c
2000
ac_cpp='$CPP $CPPFLAGS'
2001
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2002
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2003
ac_compiler_gnu=$ac_cv_c_compiler_gnu
2004

    
2005

    
2006

    
2007
ac_ext=cpp
2008
ac_cpp='$CXXCPP $CPPFLAGS'
2009
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2010
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2011
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2012

    
2013
ac_aux_dir=
2014
for ac_dir in src/utils "$srcdir"/src/utils; do
2015
  if test -f "$ac_dir/install-sh"; then
2016
    ac_aux_dir=$ac_dir
2017
    ac_install_sh="$ac_aux_dir/install-sh -c"
2018
    break
2019
  elif test -f "$ac_dir/install.sh"; then
2020
    ac_aux_dir=$ac_dir
2021
    ac_install_sh="$ac_aux_dir/install.sh -c"
2022
    break
2023
  elif test -f "$ac_dir/shtool"; then
2024
    ac_aux_dir=$ac_dir
2025
    ac_install_sh="$ac_aux_dir/shtool install -c"
2026
    break
2027
  fi
2028
done
2029
if test -z "$ac_aux_dir"; then
2030
  as_fn_error $? "cannot find install-sh, install.sh, or shtool in src/utils \"$srcdir\"/src/utils" "$LINENO" 5
2031
fi
2032

    
2033
# These three variables are undocumented and unsupported,
2034
# and are intended to be withdrawn in a future Autoconf release.
2035
# They can cause serious problems if a builder's source tree is in a directory
2036
# whose full name contains unusual characters.
2037
ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2038
ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2039
ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2040

    
2041

    
2042
# Make sure we can run config.sub.
2043
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2044
  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2045

    
2046
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2047
$as_echo_n "checking build system type... " >&6; }
2048
if ${ac_cv_build+:} false; then :
2049
  $as_echo_n "(cached) " >&6
2050
else
2051
  ac_build_alias=$build_alias
2052
test "x$ac_build_alias" = x &&
2053
  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2054
test "x$ac_build_alias" = x &&
2055
  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2056
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2057
  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2058

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

    
2079

    
2080
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2081
$as_echo_n "checking host system type... " >&6; }
2082
if ${ac_cv_host+:} false; then :
2083
  $as_echo_n "(cached) " >&6
2084
else
2085
  if test "x$host_alias" = x; then
2086
  ac_cv_host=$ac_cv_build
2087
else
2088
  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2089
    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2090
fi
2091

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

    
2112

    
2113

    
2114
#
2115
# OMNeT++/OMNEST version number
2116
#
2117
OMNETPP_PRODUCT="OMNeT++"
2118
OMNETPP_RELEASE=`cat Version`
2119
OMNETPP_VERSION=`cat Version | sed 's/^.*-//'`
2120
OMNETPP_BUILDID="100611-4b63c38"
2121
OMNETPP_EDITION="Academic Public License -- NOT FOR COMMERCIAL USE"
2122

    
2123
# We'll collect in this variable the components we've detected problems with
2124
OPP_PROBLEM_PACKAGES=
2125

    
2126
#
2127
# Location of various components. They are defined here so that they can be overridden in configure.user.
2128
#
2129

    
2130
# determine OMNETPP_ROOT; note that 'case' branches on *host* platform not the target platform
2131
case $host in
2132
*-*-cygwin*)
2133
    OMNETPP_ROOT=`cygpath -w $OMNETPP_ROOT | sed 's|\\\\|/|g'`
2134
    ;;
2135
*-*-mingw32*)
2136
    OMNETPP_ROOT=`pwd -W`
2137
    ;;
2138
*)
2139
    OMNETPP_ROOT=`pwd`
2140
    ;;
2141
esac
2142

    
2143
OMNETPP_SRC_DIR="$OMNETPP_ROOT/src"
2144
OMNETPP_UI_DIR="$OMNETPP_ROOT/ui"
2145
OMNETPP_UTILS_DIR="$OMNETPP_SRC_DIR/utils"
2146
OMNETPP_DOC_DIR="$OMNETPP_ROOT/doc"
2147
OMNETPP_TEST_DIR="$OMNETPP_ROOT/test"
2148
OMNETPP_IMAGE_PATH="./bitmaps;./images;$OMNETPP_ROOT/images"
2149

    
2150
OMNETPP_BIN_DIR="$OMNETPP_ROOT/bin"
2151
OMNETPP_INCL_DIR="$OMNETPP_ROOT/include"
2152
OMNETPP_OUT_DIR="$OMNETPP_ROOT/out"
2153
OMNETPP_LIB_DIR="$OMNETPP_ROOT/lib"
2154

    
2155
OMNETPP_TKENV_DIR="$OMNETPP_SRC_DIR/tkenv"
2156

    
2157
if test "$cygwin" = yes; then
2158
    MYPWD="$OMNETPP_SRC_DIR/utils/cygpwd"
2159
else
2160
    MYPWD="pwd"
2161
fi
2162

    
2163
#----------------------
2164
# Read user settings (and allow override the above settings)
2165
#----------------------
2166
{ $as_echo "$as_me:${as_lineno-$LINENO}: -----------------------------------------------" >&5
2167
$as_echo "$as_me: -----------------------------------------------" >&6;}
2168
{ $as_echo "$as_me:${as_lineno-$LINENO}: reading configure.user for your custom settings" >&5
2169
$as_echo "$as_me: reading configure.user for your custom settings" >&6;}
2170
{ $as_echo "$as_me:${as_lineno-$LINENO}: -----------------------------------------------" >&5
2171
$as_echo "$as_me: -----------------------------------------------" >&6;}
2172
. ./configure.user
2173

    
2174

    
2175
#
2176
# set default library suffixes. May be already defined
2177
# with system/arch specific values
2178
#
2179
A_LIB_SUFFIX=${A_LIB_SUFFIX:-".a"}
2180
SO_LIB_SUFFIX=${SO_LIB_SUFFIX:-".so"}
2181
DLL_LIB_SUFFIX=${DLL_LIB_SUFFIX:-".dll"}
2182
EXE_SUFFIX=
2183
SHARED_LIB_SUFFIX='$(SO_LIB_SUFFIX)'
2184
LIB_PREFIX="lib"
2185

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

    
2250
JNI_LIB_SUFFIX=${JNI_LIB_SUFFIX:-$SHARED_LIB_SUFFIX}
2251

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

    
2255
# Build shared library by default
2256
SHARED_LIBS=${SHARED_LIBS:-yes}
2257

    
2258
#----------------------
2259
# Default flags for values for other variables that come from configure.user.
2260
#----------------------
2261
#----------------------
2262
# pthread for Horizon
2263
#----------------------
2264

    
2265
PTHREAD_CFLAGS="-I /usr/include"
2266
PTHREAD_LIBS="-lpthread"
2267
#----------------------
2268
# Set variables to defaults if not already set.
2269
# Note: ${VAR:-defaultvalue} used below appears to be a POSIX syntax.
2270
#----------------------
2271
# on mingw special debug option is needed to debug with gdb.
2272
if test "$mingw" = "yes"; then
2273
  CFLAGS_DEBUG=${CFLAGS_DEBUG:- -gstabs+ -Wall}
2274
else
2275
  CFLAGS_DEBUG=${CFLAGS_DEBUG:- -g -Wall}
2276
fi
2277

    
2278
CFLAGS_RELEASE=${CFLAGS_RELEASE:- -O2 -DNDEBUG=1}
2279

    
2280
WHOLE_ARCHIVE_ON=
2281
WHOLE_ARCHIVE_OFF=
2282

    
2283
MSGC=${MSGC:-opp_msgc}
2284
NEDTOOL=${NEDTOOL:-nedtool}
2285
MAKEDEPEND=${MAKEDEPEND:-opp_makedep -Y --objdirtree}
2286
LN=${LN:-ln -sf}
2287
MKPATH=${MKPATH:-mkdir -p}
2288
SHLIB_POSTPROCESS=${SHLIB_POSTPROCESS:-opp_shlib_postprocess}
2289

    
2290
#----------------------
2291
# Check compiler
2292
#----------------------
2293

    
2294
if test "$TOOLCHAIN" = "mingw"; then
2295
    cc_candidates="i586-mingw32msvc-gcc"
2296
    cxx_candidates="i586-mingw32msvc-g++"
2297
else
2298
    # icc, icpc: Intel compiler (further ones: Sun Studio: cxx, IBM: xlC)
2299
    cc_candidates="icc gcc cc xlc"
2300
    cxx_candidates="icpc g++ c++ cxx xlC"
2301
fi
2302

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

    
2337
fi
2338
fi
2339
CC=$ac_cv_prog_CC
2340
if test -n "$CC"; then
2341
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2342
$as_echo "$CC" >&6; }
2343
else
2344
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2345
$as_echo "no" >&6; }
2346
fi
2347

    
2348

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

    
2381
fi
2382
fi
2383
ac_ct_CC=$ac_cv_prog_ac_ct_CC
2384
if test -n "$ac_ct_CC"; then
2385
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2386
$as_echo "$ac_ct_CC" >&6; }
2387
else
2388
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2389
$as_echo "no" >&6; }
2390
fi
2391

    
2392

    
2393
  test -n "$ac_ct_CC" && break
2394
done
2395

    
2396
  if test "x$ac_ct_CC" = x; then
2397
    CC=""
2398
  else
2399
    case $cross_compiling:$ac_tool_warned in
2400
yes:)
2401
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2402
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2403
ac_tool_warned=yes ;;
2404
esac
2405
    CC=$ac_ct_CC
2406
  fi
2407
fi
2408

    
2409

    
2410
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2411
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2412
as_fn_error $? "no acceptable C compiler found in \$PATH
2413
See \`config.log' for more details" "$LINENO" 5; }
2414

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

    
2440
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441
/* end confdefs.h.  */
2442

    
2443
int
2444
main ()
2445
{
2446

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

    
2460
# The possible output files:
2461
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2462

    
2463
ac_rmfiles=
2464
for ac_file in $ac_files
2465
do
2466
  case $ac_file in
2467
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2468
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2469
  esac
2470
done
2471
rm -f $ac_rmfiles
2472

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

    
2516
else
2517
  ac_file=''
2518
fi
2519
if test -z "$ac_file"; then :
2520
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2521
$as_echo "no" >&6; }
2522
$as_echo "$as_me: failed program was:" >&5
2523
sed 's/^/| /' conftest.$ac_ext >&5
2524

    
2525
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2526
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2527
as_fn_error 77 "C compiler cannot create executables
2528
See \`config.log' for more details" "$LINENO" 5; }
2529
else
2530
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2531
$as_echo "yes" >&6; }
2532
fi
2533
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2534
$as_echo_n "checking for C compiler default output file name... " >&6; }
2535
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2536
$as_echo "$ac_file" >&6; }
2537
ac_exeext=$ac_cv_exeext
2538

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

    
2577
rm -f conftest.$ac_ext
2578
EXEEXT=$ac_cv_exeext
2579
ac_exeext=$EXEEXT
2580
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581
/* end confdefs.h.  */
2582
#include <stdio.h>
2583
int
2584
main ()
2585
{
2586
FILE *f = fopen ("conftest.out", "w");
2587
 return ferror (f) || fclose (f) != 0;
2588

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

    
2637
rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2638
ac_clean_files=$ac_clean_files_save
2639
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2640
$as_echo_n "checking for suffix of object files... " >&6; }
2641
if ${ac_cv_objext+:} false; then :
2642
  $as_echo_n "(cached) " >&6
2643
else
2644
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2645
/* end confdefs.h.  */
2646

    
2647
int
2648
main ()
2649
{
2650

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

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

    
2698
int
2699
main ()
2700
{
2701
#ifndef __GNUC__
2702
       choke me
2703
#endif
2704

    
2705
  ;
2706
  return 0;
2707
}
2708
_ACEOF
2709
if ac_fn_c_try_compile "$LINENO"; then :
2710
  ac_compiler_gnu=yes
2711
else
2712
  ac_compiler_gnu=no
2713
fi
2714
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2715
ac_cv_c_compiler_gnu=$ac_compiler_gnu
2716

    
2717
fi
2718
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2719
$as_echo "$ac_cv_c_compiler_gnu" >&6; }
2720
if test $ac_compiler_gnu = yes; then
2721
  GCC=yes
2722
else
2723
  GCC=
2724
fi
2725
ac_test_CFLAGS=${CFLAGS+set}
2726
ac_save_CFLAGS=$CFLAGS
2727
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2728
$as_echo_n "checking whether $CC accepts -g... " >&6; }
2729
if ${ac_cv_prog_cc_g+:} false; then :
2730
  $as_echo_n "(cached) " >&6
2731
else
2732
  ac_save_c_werror_flag=$ac_c_werror_flag
2733
   ac_c_werror_flag=yes
2734
   ac_cv_prog_cc_g=no
2735
   CFLAGS="-g"
2736
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2737
/* end confdefs.h.  */
2738

    
2739
int
2740
main ()
2741
{
2742

    
2743
  ;
2744
  return 0;
2745
}
2746
_ACEOF
2747
if ac_fn_c_try_compile "$LINENO"; then :
2748
  ac_cv_prog_cc_g=yes
2749
else
2750
  CFLAGS=""
2751
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752
/* end confdefs.h.  */
2753

    
2754
int
2755
main ()
2756
{
2757

    
2758
  ;
2759
  return 0;
2760
}
2761
_ACEOF
2762
if ac_fn_c_try_compile "$LINENO"; then :
2763

    
2764
else
2765
  ac_c_werror_flag=$ac_save_c_werror_flag
2766
	 CFLAGS="-g"
2767
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2768
/* end confdefs.h.  */
2769

    
2770
int
2771
main ()
2772
{
2773

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

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

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

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

    
2878
fi
2879
# AC_CACHE_VAL
2880
case "x$ac_cv_prog_cc_c89" in
2881
  x)
2882
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2883
$as_echo "none needed" >&6; } ;;
2884
  xno)
2885
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2886
$as_echo "unsupported" >&6; } ;;
2887
  *)
2888
    CC="$CC $ac_cv_prog_cc_c89"
2889
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2890
$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2891
esac
2892
if test "x$ac_cv_prog_cc_c89" != xno; then :
2893

    
2894
fi
2895

    
2896
ac_ext=cpp
2897
ac_cpp='$CXXCPP $CPPFLAGS'
2898
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2899
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2900
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2901

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

    
2939
fi
2940
fi
2941
CXX=$ac_cv_prog_CXX
2942
if test -n "$CXX"; then
2943
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
2944
$as_echo "$CXX" >&6; }
2945
else
2946
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2947
$as_echo "no" >&6; }
2948
fi
2949

    
2950

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

    
2983
fi
2984
fi
2985
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2986
if test -n "$ac_ct_CXX"; then
2987
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
2988
$as_echo "$ac_ct_CXX" >&6; }
2989
else
2990
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2991
$as_echo "no" >&6; }
2992
fi
2993

    
2994

    
2995
  test -n "$ac_ct_CXX" && break
2996
done
2997

    
2998
  if test "x$ac_ct_CXX" = x; then
2999
    CXX="g++"
3000
  else
3001
    case $cross_compiling:$ac_tool_warned in
3002
yes:)
3003
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3004
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3005
ac_tool_warned=yes ;;
3006
esac
3007
    CXX=$ac_ct_CXX
3008
  fi
3009
fi
3010

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

    
3038
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3039
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3040
if ${ac_cv_cxx_compiler_gnu+:} false; then :
3041
  $as_echo_n "(cached) " >&6
3042
else
3043
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3044
/* end confdefs.h.  */
3045

    
3046
int
3047
main ()
3048
{
3049
#ifndef __GNUC__
3050
       choke me
3051
#endif
3052

    
3053
  ;
3054
  return 0;
3055
}
3056
_ACEOF
3057
if ac_fn_cxx_try_compile "$LINENO"; then :
3058
  ac_compiler_gnu=yes
3059
else
3060
  ac_compiler_gnu=no
3061
fi
3062
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3063
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3064

    
3065
fi
3066
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3067
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3068
if test $ac_compiler_gnu = yes; then
3069
  GXX=yes
3070
else
3071
  GXX=
3072
fi
3073
ac_test_CXXFLAGS=${CXXFLAGS+set}
3074
ac_save_CXXFLAGS=$CXXFLAGS
3075
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3076
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3077
if ${ac_cv_prog_cxx_g+:} false; then :
3078
  $as_echo_n "(cached) " >&6
3079
else
3080
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3081
   ac_cxx_werror_flag=yes
3082
   ac_cv_prog_cxx_g=no
3083
   CXXFLAGS="-g"
3084
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3085
/* end confdefs.h.  */
3086

    
3087
int
3088
main ()
3089
{
3090

    
3091
  ;
3092
  return 0;
3093
}
3094
_ACEOF
3095
if ac_fn_cxx_try_compile "$LINENO"; then :
3096
  ac_cv_prog_cxx_g=yes
3097
else
3098
  CXXFLAGS=""
3099
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3100
/* end confdefs.h.  */
3101

    
3102
int
3103
main ()
3104
{
3105

    
3106
  ;
3107
  return 0;
3108
}
3109
_ACEOF
3110
if ac_fn_cxx_try_compile "$LINENO"; then :
3111

    
3112
else
3113
  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3114
	 CXXFLAGS="-g"
3115
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3116
/* end confdefs.h.  */
3117

    
3118
int
3119
main ()
3120
{
3121

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

    
3159

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

    
3185
  test -z "$ac_cv_prog_tmp_CXX" && ac_cv_prog_tmp_CXX="not found"
3186
fi
3187
fi
3188
tmp_CXX=$ac_cv_prog_tmp_CXX
3189
if test -n "$tmp_CXX"; then
3190
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tmp_CXX" >&5
3191
$as_echo "$tmp_CXX" >&6; }
3192
else
3193
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3194
$as_echo "no" >&6; }
3195
fi
3196

    
3197

    
3198
if test "$tmp_CXX" = "not found"; then
3199
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES g++"
3200
   as_fn_error $? "No C++ compiler found -- one is required to build OMNeT++/OMNEST, and also for model development." "$LINENO" 5
3201
fi
3202

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

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

    
3270
fi
3271
fi
3272
RANLIB=$ac_cv_prog_RANLIB
3273
if test -n "$RANLIB"; then
3274
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
3275
$as_echo "$RANLIB" >&6; }
3276
else
3277
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3278
$as_echo "no" >&6; }
3279
fi
3280

    
3281

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

    
3310
fi
3311
fi
3312
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3313
if test -n "$ac_ct_RANLIB"; then
3314
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
3315
$as_echo "$ac_ct_RANLIB" >&6; }
3316
else
3317
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3318
$as_echo "no" >&6; }
3319
fi
3320

    
3321
  if test "x$ac_ct_RANLIB" = x; then
3322
    RANLIB=":"
3323
  else
3324
    case $cross_compiling:$ac_tool_warned in
3325
yes:)
3326
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3327
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3328
ac_tool_warned=yes ;;
3329
esac
3330
    RANLIB=$ac_ct_RANLIB
3331
  fi
3332
else
3333
  RANLIB="$ac_cv_prog_RANLIB"
3334
fi
3335

    
3336
fi
3337

    
3338

    
3339
# determine toolchain name, used in opp_makemake-generated Makefiles as part of the linker path
3340
if test "$TOOLCHAIN_NAME" = ""; then
3341
    if test "$mingw" = yes; then
3342
        TOOLCHAIN_NAME="gcc"
3343
    elif test "$cygwin" = yes; then
3344
        TOOLCHAIN_NAME="cygwin"
3345
    else
3346
        # toolchain name: compiler ($CC) without path
3347
        # note: doubling the brackets is needed, otherwise M4 swallows them!
3348
        TOOLCHAIN_NAME=`echo $CC | sed 's!^.*/!!g' | sed 's![ :]!_!'g`
3349
    fi
3350
fi
3351

    
3352
#----------------------
3353
# check and disable stack checking to avoid opplibs.so dependence on glibc 2.4
3354
#----------------------
3355

    
3356

    
3357
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fno-stack-protector" >&5
3358
$as_echo_n "checking whether $CXX supports -fno-stack-protector... " >&6; }
3359
    ac_save_CXX="$CXX"
3360
    CXX="$CXX -fno-stack-protector"
3361
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3362
/* end confdefs.h.  */
3363

    
3364
int
3365
main ()
3366
{
3367

    
3368
  ;
3369
  return 0;
3370
}
3371
_ACEOF
3372
if ac_fn_cxx_try_compile "$LINENO"; then :
3373

    
3374
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3375
$as_echo "yes" >&6; }
3376

    
3377
        CXX="$ac_save_CXX"
3378
        CFLAGS_RELEASE="$CFLAGS_RELEASE -fno-stack-protector"
3379

    
3380
else
3381

    
3382
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383
$as_echo "no" >&6; }
3384
        CXX="$ac_save_CXX"
3385

    
3386

    
3387
fi
3388
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3389

    
3390

    
3391
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -fno-stack-protector" >&5
3392
$as_echo_n "checking whether $CXX supports -fno-stack-protector... " >&6; }
3393
    ac_save_CXX="$CXX"
3394
    CXX="$CXX -fno-stack-protector"
3395
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3396
/* end confdefs.h.  */
3397

    
3398
int
3399
main ()
3400
{
3401

    
3402
  ;
3403
  return 0;
3404
}
3405
_ACEOF
3406
if ac_fn_cxx_try_compile "$LINENO"; then :
3407

    
3408
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3409
$as_echo "yes" >&6; }
3410

    
3411
        CXX="$ac_save_CXX"
3412
        CFLAGS_DEBUG="$CFLAGS_DEBUG -fno-stack-protector"
3413

    
3414
else
3415

    
3416
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3417
$as_echo "no" >&6; }
3418
        CXX="$ac_save_CXX"
3419

    
3420

    
3421
fi
3422
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3423

    
3424

    
3425
#----------------------
3426
# Test if "-fPIC" is needed for shared libs (there's a performance penalty if we use it unnecessarily)
3427
#----------------------
3428
# To test, we try to compile the following code into a shared library:
3429
#      int x;
3430
#      int getX() {return x;}
3431
#
3432

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

    
3482

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

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

    
3502
   save_CXXFLAGS=$CXXFLAGS
3503
   save_LIBS=$LIBS
3504

    
3505
   CXXFLAGS=""
3506
   LIBS=""
3507

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

    
3511
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3512
/* end confdefs.h.  */
3513
#include <dlfcn.h>
3514
int
3515
main ()
3516
{
3517
dlopen("",0);
3518
  ;
3519
  return 0;
3520
}
3521
_ACEOF
3522
if ac_fn_cxx_try_link "$LINENO"; then :
3523
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3524
$as_echo "yes" >&6; }; ldl_not_needed=yes; ldl=""
3525
else
3526
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3527
$as_echo "no" >&6; }; ldl_not_needed=no; ldl="-ldl"
3528
fi
3529
rm -f core conftest.err conftest.$ac_objext \
3530
    conftest$ac_exeext conftest.$ac_ext
3531

    
3532
   CXXFLAGS=$save_CXXFLAGS
3533
   LIBS=$save_LIBS
3534

    
3535

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

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

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

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

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

    
3703

    
3704
#----------------------
3705
# Check Cygwin
3706
#----------------------
3707
if test "$WITH_PARSIM" = "yes" -a "$cygwin" = "yes"; then
3708
   as_fn_error $? "WITH_PARSIM=yes not supported with Cygwin -- please edit configure.user!" "$LINENO" 5
3709
fi
3710

    
3711
#----------------------
3712
# set arch specific flags
3713
#----------------------
3714
CFLAGS_DEBUG="$CFLAGS_DEBUG $CFLAGS_ARCH"
3715
CFLAGS_RELEASE="$CFLAGS_RELEASE $CFLAGS_ARCH"
3716
LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
3717

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

    
3730
int
3731
main ()
3732
{
3733

    
3734
  ;
3735
  return 0;
3736
}
3737
_ACEOF
3738
if ac_fn_cxx_try_link "$LINENO"; then :
3739
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3740
$as_echo "yes" >&6; }
3741
else
3742
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3743
$as_echo "no" >&6; }; RPATH_UNSUPPORTED="true"; LDFLAGS="$LDFLAGS_SAVE"
3744
fi
3745
rm -f core conftest.err conftest.$ac_objext \
3746
    conftest$ac_exeext conftest.$ac_ext
3747

    
3748
#----------------------
3749
# Checks for programs.
3750
#----------------------
3751

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

    
3779
fi
3780
fi
3781
YACC=$ac_cv_prog_YACC
3782
if test -n "$YACC"; then
3783
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
3784
$as_echo "$YACC" >&6; }
3785
else
3786
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787
$as_echo "no" >&6; }
3788
fi
3789

    
3790

    
3791
  test -n "$YACC" && break
3792
done
3793
test -n "$YACC" || YACC="yacc"
3794

    
3795
if test "$YACC" = "yacc"; then
3796
   as_fn_error $? "Bison not found, needed to build OMNeT++/OMNEST -- please install it!" "$LINENO" 5
3797
fi
3798
BISON_VER_LINE=`$YACC --version | grep "bison.* [234]\\."`
3799
if test -z "$BISON_VER_LINE"; then
3800
   as_fn_error $? "At least bison version 2.0 required -- type '$YACC --version' to see the version number" "$LINENO" 5
3801
fi
3802

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

    
3830
fi
3831
fi
3832
LEX=$ac_cv_prog_LEX
3833
if test -n "$LEX"; then
3834
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
3835
$as_echo "$LEX" >&6; }
3836
else
3837
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3838
$as_echo "no" >&6; }
3839
fi
3840

    
3841

    
3842
  test -n "$LEX" && break
3843
done
3844
test -n "$LEX" || LEX=":"
3845

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

    
3883
if test -f lex.yy.c; then
3884
  ac_cv_prog_lex_root=lex.yy
3885
elif test -f lexyy.c; then
3886
  ac_cv_prog_lex_root=lexyy
3887
else
3888
  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
3889
fi
3890
fi
3891
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
3892
$as_echo "$ac_cv_prog_lex_root" >&6; }
3893
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
3894

    
3895
if test -z "${LEXLIB+set}"; then
3896
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
3897
$as_echo_n "checking lex library... " >&6; }
3898
if ${ac_cv_lib_lex+:} false; then :
3899
  $as_echo_n "(cached) " >&6
3900
else
3901

    
3902
    ac_save_LIBS=$LIBS
3903
    ac_cv_lib_lex='none needed'
3904
    for ac_lib in '' -lfl -ll; do
3905
      LIBS="$ac_lib $ac_save_LIBS"
3906
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3907
/* end confdefs.h.  */
3908
`cat $LEX_OUTPUT_ROOT.c`
3909
_ACEOF
3910
if ac_fn_cxx_try_link "$LINENO"; then :
3911
  ac_cv_lib_lex=$ac_lib
3912
fi
3913
rm -f core conftest.err conftest.$ac_objext \
3914
    conftest$ac_exeext conftest.$ac_ext
3915
      test "$ac_cv_lib_lex" != 'none needed' && break
3916
    done
3917
    LIBS=$ac_save_LIBS
3918

    
3919
fi
3920
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
3921
$as_echo "$ac_cv_lib_lex" >&6; }
3922
  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
3923
fi
3924

    
3925

    
3926
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
3927
$as_echo_n "checking whether yytext is a pointer... " >&6; }
3928
if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
3929
  $as_echo_n "(cached) " >&6
3930
else
3931
  # POSIX says lex can declare yytext either as a pointer or an array; the
3932
# default is implementation-dependent.  Figure out which it is, since
3933
# not all implementations provide the %pointer and %array declarations.
3934
ac_cv_prog_lex_yytext_pointer=no
3935
ac_save_LIBS=$LIBS
3936
LIBS="$LEXLIB $ac_save_LIBS"
3937
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3938
/* end confdefs.h.  */
3939

    
3940
  #define YYTEXT_POINTER 1
3941
`cat $LEX_OUTPUT_ROOT.c`
3942
_ACEOF
3943
if ac_fn_cxx_try_link "$LINENO"; then :
3944
  ac_cv_prog_lex_yytext_pointer=yes
3945
fi
3946
rm -f core conftest.err conftest.$ac_objext \
3947
    conftest$ac_exeext conftest.$ac_ext
3948
LIBS=$ac_save_LIBS
3949

    
3950
fi
3951
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
3952
$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
3953
if test $ac_cv_prog_lex_yytext_pointer = yes; then
3954

    
3955
$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
3956

    
3957
fi
3958
rm -f conftest.l $LEX_OUTPUT_ROOT.c
3959

    
3960
fi
3961
if test "$LEX" != "flex"; then
3962
   as_fn_error $? "Flex not found, needed to build OMNeT++/OMNEST -- please install it!" "$LINENO" 5
3963
fi
3964
FLEX_VER_LINE=`$LEX --version | grep "flex.* 2\\.[5-9]"`
3965
if test -z "$FLEX_VER_LINE"; then
3966
   as_fn_error $? "At least flex version 2.5 required -- type '$LEX --version' to see the version number" "$LINENO" 5
3967
fi
3968

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

    
3995
  test -z "$ac_cv_prog_MAKE" && ac_cv_prog_MAKE="not found"
3996
fi
3997
fi
3998
MAKE=$ac_cv_prog_MAKE
3999
if test -n "$MAKE"; then
4000
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
4001
$as_echo "$MAKE" >&6; }
4002
else
4003
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4004
$as_echo "no" >&6; }
4005
fi
4006

    
4007

    
4008
if test "$MAKE" = "not found"; then
4009
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES make"
4010
   as_fn_error and also for model development. "make program not found -- it is required to build OMNeT++/OMNEST" "$LINENO" 5
4011
else
4012
   if "$MAKE" --version 2>/dev/null | grep -i GNU >/dev/null; then :; else
4013
       as_fn_error $? "GNU Make is required to build OMNeT++/OMNEST." "$LINENO" 5
4014
   fi
4015
fi
4016

    
4017
# perl is needed for opp_msgc
4018

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

    
4044
  test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="not found"
4045
fi
4046
fi
4047
PERL=$ac_cv_prog_PERL
4048
if test -n "$PERL"; then
4049
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
4050
$as_echo "$PERL" >&6; }
4051
else
4052
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4053
$as_echo "no" >&6; }
4054
fi
4055

    
4056

    
4057
if test "$PERL" = "not found"; then
4058
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES  perl"
4059
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perl not found -- please install it! Perl is required by opp_msgc" >&5
4060
$as_echo "$as_me: WARNING: Perl not found -- please install it! Perl is required by opp_msgc" >&2;}
4061
fi
4062
if test ! -x /usr/bin/perl; then
4063
   this_perl=`which perl`
4064
   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
4065
fi
4066

    
4067
# swig is used for building the ui support libs
4068

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

    
4094
  test -z "$ac_cv_prog_SWIG" && ac_cv_prog_SWIG="not found"
4095
fi
4096
fi
4097
SWIG=$ac_cv_prog_SWIG
4098
if test -n "$SWIG"; then
4099
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5
4100
$as_echo "$SWIG" >&6; }
4101
else
4102
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103
$as_echo "no" >&6; }
4104
fi
4105

    
4106

    
4107

    
4108

    
4109
#----------------------
4110
# Checks for standard libraries.
4111
#----------------------
4112

    
4113
SYS_LIBS=""
4114

    
4115
# time functions
4116

    
4117
   save_CXXFLAGS=$CXXFLAGS
4118
   save_LIBS=$LIBS
4119

    
4120
   CXXFLAGS=""
4121
   LIBS=""
4122

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

    
4126
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4127
/* end confdefs.h.  */
4128
#include <time.h>
4129
int
4130
main ()
4131
{
4132
clock_gettime(0,0);
4133
  ;
4134
  return 0;
4135
}
4136
_ACEOF
4137
if ac_fn_cxx_try_link "$LINENO"; then :
4138
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4139
$as_echo "yes" >&6; }; time_ok=yes;
4140
else
4141
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142
$as_echo "no" >&6; }; time_ok=no;
4143
fi
4144
rm -f core conftest.err conftest.$ac_objext \
4145
    conftest$ac_exeext conftest.$ac_ext
4146

    
4147
   CXXFLAGS=$save_CXXFLAGS
4148
   LIBS=$save_LIBS
4149

    
4150
if test $time_ok = no; then
4151

    
4152
   save_CXXFLAGS=$CXXFLAGS
4153
   save_LIBS=$LIBS
4154

    
4155
   CXXFLAGS=""
4156
   LIBS="-lrt"
4157

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

    
4161
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4162
/* end confdefs.h.  */
4163
#include <time.h>
4164
int
4165
main ()
4166
{
4167
clock_gettime(0,0);
4168
  ;
4169
  return 0;
4170
}
4171
_ACEOF
4172
if ac_fn_cxx_try_link "$LINENO"; then :
4173
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4174
$as_echo "yes" >&6; }; time_ok=yes; SYS_LIBS="-lrt $SYS_LIBS"
4175
else
4176
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4177
$as_echo "no" >&6; }; time_ok=no;
4178
fi
4179
rm -f core conftest.err conftest.$ac_objext \
4180
    conftest$ac_exeext conftest.$ac_ext
4181

    
4182
   CXXFLAGS=$save_CXXFLAGS
4183
   LIBS=$save_LIBS
4184

    
4185
fi
4186
if test $time_ok = no; then
4187
   as_fn_error $? "Time library -lrt not found" "$LINENO" 5
4188
fi
4189

    
4190
# math functions
4191

    
4192
   save_CXXFLAGS=$CXXFLAGS
4193
   save_LIBS=$LIBS
4194

    
4195
   CXXFLAGS=""
4196
   LIBS=""
4197

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

    
4201
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4202
/* end confdefs.h.  */
4203
#include <math.h>
4204
int
4205
main ()
4206
{
4207
floor(0);
4208
  ;
4209
  return 0;
4210
}
4211
_ACEOF
4212
if ac_fn_cxx_try_link "$LINENO"; then :
4213
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4214
$as_echo "yes" >&6; }; math_ok=yes;
4215
else
4216
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217
$as_echo "no" >&6; }; math_ok=no;
4218
fi
4219
rm -f core conftest.err conftest.$ac_objext \
4220
    conftest$ac_exeext conftest.$ac_ext
4221

    
4222
   CXXFLAGS=$save_CXXFLAGS
4223
   LIBS=$save_LIBS
4224

    
4225
if test $math_ok = no; then
4226

    
4227
   save_CXXFLAGS=$CXXFLAGS
4228
   save_LIBS=$LIBS
4229

    
4230
   CXXFLAGS=""
4231
   LIBS="-lm"
4232

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

    
4236
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237
/* end confdefs.h.  */
4238
#include <math.h>
4239
int
4240
main ()
4241
{
4242
floor(0);
4243
  ;
4244
  return 0;
4245
}
4246
_ACEOF
4247
if ac_fn_cxx_try_link "$LINENO"; then :
4248
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4249
$as_echo "yes" >&6; }; math_ok=yes; SYS_LIBS="-lm $SYS_LIBS"
4250
else
4251
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252
$as_echo "no" >&6; }; math_ok=no;
4253
fi
4254
rm -f core conftest.err conftest.$ac_objext \
4255
    conftest$ac_exeext conftest.$ac_ext
4256

    
4257
   CXXFLAGS=$save_CXXFLAGS
4258
   LIBS=$save_LIBS
4259

    
4260
fi
4261
if test $math_ok = no; then
4262
   as_fn_error $? "Standard C math library -lm not found" "$LINENO" 5
4263
fi
4264

    
4265
# -lstdc++
4266
# currently we have a modified version of mingw which has a shared stdc++ by default so the below
4267
# check is not needed
4268
#if test "$mingw" = "yes"; then
4269
#   # check for shared version (on mingw)
4270
#   OPP_CHECK_LIB(standard C++ lib, iostream, /**/, , -lstdc++_s, stdcpp_ok, SYS_LIBS="-lstdc++_s $SYS_LIBS")
4271
#else
4272

    
4273
   save_CXXFLAGS=$CXXFLAGS
4274
   save_LIBS=$LIBS
4275

    
4276
   CXXFLAGS=""
4277
   LIBS="-lstdc++"
4278

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

    
4282
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4283
/* end confdefs.h.  */
4284
#include <iostream>
4285
int
4286
main ()
4287
{
4288
/**/;
4289
  ;
4290
  return 0;
4291
}
4292
_ACEOF
4293
if ac_fn_cxx_try_link "$LINENO"; then :
4294
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4295
$as_echo "yes" >&6; }; stdcpp_ok=yes; SYS_LIBS="-lstdc++ $SYS_LIBS"
4296
else
4297
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4298
$as_echo "no" >&6; }; stdcpp_ok=no;
4299
fi
4300
rm -f core conftest.err conftest.$ac_objext \
4301
    conftest$ac_exeext conftest.$ac_ext
4302

    
4303
   CXXFLAGS=$save_CXXFLAGS
4304
   LIBS=$save_LIBS
4305

    
4306
   if test $stdcpp_ok = no; then
4307

    
4308
   save_CXXFLAGS=$CXXFLAGS
4309
   save_LIBS=$LIBS
4310

    
4311
   CXXFLAGS=""
4312
   LIBS="-lcxx"
4313

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

    
4317
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4318
/* end confdefs.h.  */
4319
#include <iostream>
4320
int
4321
main ()
4322
{
4323
/**/;
4324
  ;
4325
  return 0;
4326
}
4327
_ACEOF
4328
if ac_fn_cxx_try_link "$LINENO"; then :
4329
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4330
$as_echo "yes" >&6; }; stdcpp_ok=yes; SYS_LIBS="-lcxx $SYS_LIBS"
4331
else
4332
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4333
$as_echo "no" >&6; }; stdcpp_ok=no;
4334
fi
4335
rm -f core conftest.err conftest.$ac_objext \
4336
    conftest$ac_exeext conftest.$ac_ext
4337

    
4338
   CXXFLAGS=$save_CXXFLAGS
4339
   LIBS=$save_LIBS
4340

    
4341
   fi
4342
   if test $stdcpp_ok = no; then
4343

    
4344
   save_CXXFLAGS=$CXXFLAGS
4345
   save_LIBS=$LIBS
4346

    
4347
   CXXFLAGS=""
4348
   LIBS="-lcxa"
4349

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

    
4353
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354
/* end confdefs.h.  */
4355
#include <iostream>
4356
int
4357
main ()
4358
{
4359
/**/;
4360
  ;
4361
  return 0;
4362
}
4363
_ACEOF
4364
if ac_fn_cxx_try_link "$LINENO"; then :
4365
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4366
$as_echo "yes" >&6; }; stdcpp_ok=yes; SYS_LIBS="-lcxa $SYS_LIBS"
4367
else
4368
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4369
$as_echo "no" >&6; }; stdcpp_ok=no;
4370
fi
4371
rm -f core conftest.err conftest.$ac_objext \
4372
    conftest$ac_exeext conftest.$ac_ext
4373

    
4374
   CXXFLAGS=$save_CXXFLAGS
4375
   LIBS=$save_LIBS
4376

    
4377
   fi
4378
#fi
4379
if test $stdcpp_ok = no; then
4380
   as_fn_error $? "Standard C++ library -lstdc++_s or -lstdc++ or -lcxx or -lcxa not found" "$LINENO" 5
4381
fi
4382

    
4383
# dlopen()
4384

    
4385
   save_CXXFLAGS=$CXXFLAGS
4386
   save_LIBS=$LIBS
4387

    
4388
   CXXFLAGS=""
4389
   LIBS=""
4390

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

    
4394
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4395
/* end confdefs.h.  */
4396
#include <dlfcn.h>
4397
int
4398
main ()
4399
{
4400
dlopen("",0);
4401
  ;
4402
  return 0;
4403
}
4404
_ACEOF
4405
if ac_fn_cxx_try_link "$LINENO"; then :
4406
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4407
$as_echo "yes" >&6; }; dl_ok=yes;
4408
else
4409
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4410
$as_echo "no" >&6; }; dl_ok=no;
4411
fi
4412
rm -f core conftest.err conftest.$ac_objext \
4413
    conftest$ac_exeext conftest.$ac_ext
4414

    
4415
   CXXFLAGS=$save_CXXFLAGS
4416
   LIBS=$save_LIBS
4417

    
4418
if test $dl_ok = no; then
4419

    
4420
   save_CXXFLAGS=$CXXFLAGS
4421
   save_LIBS=$LIBS
4422

    
4423
   CXXFLAGS=""
4424
   LIBS="-ldl"
4425

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

    
4429
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4430
/* end confdefs.h.  */
4431
#include <dlfcn.h>
4432
int
4433
main ()
4434
{
4435
dlopen("",0);
4436
  ;
4437
  return 0;
4438
}
4439
_ACEOF
4440
if ac_fn_cxx_try_link "$LINENO"; then :
4441
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4442
$as_echo "yes" >&6; }; dl_ok=yes; SYS_LIBS="-ldl $SYS_LIBS"
4443
else
4444
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445
$as_echo "no" >&6; }; dl_ok=no;
4446
fi
4447
rm -f core conftest.err conftest.$ac_objext \
4448
    conftest$ac_exeext conftest.$ac_ext
4449

    
4450
   CXXFLAGS=$save_CXXFLAGS
4451
   LIBS=$save_LIBS
4452

    
4453
fi
4454
if test $dl_ok = yes; then
4455
   HAVE_DLOPEN=1
4456
else
4457
   HAVE_DLOPEN=0
4458
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no dlopen(): dynamic loading of libs not possible" >&5
4459
$as_echo "$as_me: WARNING: no dlopen(): dynamic loading of libs not possible" >&2;}
4460
fi
4461

    
4462
# winsock (for MinGW)
4463

    
4464
   save_CXXFLAGS=$CXXFLAGS
4465
   save_LIBS=$LIBS
4466

    
4467
   CXXFLAGS=""
4468
   LIBS="-lwsock32"
4469

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

    
4473
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4474
/* end confdefs.h.  */
4475
#include <winsock.h>
4476
int
4477
main ()
4478
{
4479
socket(0,0,0);
4480
  ;
4481
  return 0;
4482
}
4483
_ACEOF
4484
if ac_fn_cxx_try_link "$LINENO"; then :
4485
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4486
$as_echo "yes" >&6; }; wsock_ok=yes; SYS_LIBS="-lwsock32 $SYS_LIBS"
4487
else
4488
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4489
$as_echo "no" >&6; }; wsock_ok=no;
4490
fi
4491
rm -f core conftest.err conftest.$ac_objext \
4492
    conftest$ac_exeext conftest.$ac_ext
4493

    
4494
   CXXFLAGS=$save_CXXFLAGS
4495
   LIBS=$save_LIBS
4496

    
4497

    
4498
# zlib
4499
if test "$ZLIB_LIBS" = ""; then
4500
    ZLIB_LIBS=-lz
4501
fi
4502

    
4503
   save_CXXFLAGS=$CXXFLAGS
4504
   save_LIBS=$LIBS
4505

    
4506
   CXXFLAGS="$CFLAGS_RELEASE $ZLIB_CFLAGS"
4507
   LIBS="$ZLIB_LIBS"
4508

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

    
4512
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4513
/* end confdefs.h.  */
4514
#include <zlib.h>
4515
int
4516
main ()
4517
{
4518
gzopen("","");
4519
  ;
4520
  return 0;
4521
}
4522
_ACEOF
4523
if ac_fn_cxx_try_link "$LINENO"; then :
4524
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4525
$as_echo "yes" >&6; }; zlib_ok=yes;
4526
else
4527
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528
$as_echo "no" >&6; }; zlib_ok=no;
4529
fi
4530
rm -f core conftest.err conftest.$ac_objext \
4531
    conftest$ac_exeext conftest.$ac_ext
4532

    
4533
   CXXFLAGS=$save_CXXFLAGS
4534
   LIBS=$save_LIBS
4535

    
4536
# on mingw/msys try a different library name
4537
if test $zlib_ok = no -a "$mingw" = yes; then
4538
    ZLIB_LIBS="-lzlib1"
4539

    
4540
   save_CXXFLAGS=$CXXFLAGS
4541
   save_LIBS=$LIBS
4542

    
4543
   CXXFLAGS="$CFLAGS_RELEASE $ZLIB_CFLAGS"
4544
   LIBS="$ZLIB_LIBS"
4545

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

    
4549
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550
/* end confdefs.h.  */
4551
#include <zlib.h>
4552
int
4553
main ()
4554
{
4555
gzopen("","");
4556
  ;
4557
  return 0;
4558
}
4559
_ACEOF
4560
if ac_fn_cxx_try_link "$LINENO"; then :
4561
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4562
$as_echo "yes" >&6; }; zlib_ok=yes;
4563
else
4564
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565
$as_echo "no" >&6; }; zlib_ok=no;
4566
fi
4567
rm -f core conftest.err conftest.$ac_objext \
4568
    conftest$ac_exeext conftest.$ac_ext
4569

    
4570
   CXXFLAGS=$save_CXXFLAGS
4571
   LIBS=$save_LIBS
4572

    
4573
fi
4574
if test $zlib_ok = no; then
4575
   as_fn_error $? "zlib or zlib header file not found, please install it" "$LINENO" 5
4576
fi
4577

    
4578

    
4579
#----------------------
4580
# Check for Tcl/Tk.
4581
#----------------------
4582
if test -n "$NO_TCL"; then
4583

    
4584
    # skip testing for TCL
4585
    TKENV_IF_POSSIBLE=missing-dependency
4586

    
4587
    # and build samples using Cmdenv (TBD)
4588
    ALL_ENV_LIBS='$(CMDENV_LIBS)'
4589

    
4590
else  #matching "fi" is after BLT testing
4591

    
4592
   if test -d /usr/include/tcl8.4; then
4593
        # this was reported to be the case on Debian 3.1 "sarge"
4594
        TK_CFLAGS84=${TK_CFLAGS:-"-I/usr/include/tcl8.4"}
4595
   fi
4596
   if test -d /usr/include/tcl8.5; then
4597
        TK_CFLAGS85=${TK_CFLAGS:-"-I/usr/include/tcl8.5"}
4598
   fi
4599
   if test -d /usr/include/tcl8.6; then
4600
        TK_CFLAGS86=${TK_CFLAGS:-"-I/usr/include/tcl8.6"}
4601
   fi
4602

    
4603
   if test -n "$TK_LIBS"; then
4604

    
4605
   save_CXXFLAGS=$CXXFLAGS
4606
   save_LIBS=$LIBS
4607

    
4608
   CXXFLAGS="$TK_CFLAGS"
4609
   LIBS="$TK_LIBS"
4610

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

    
4614
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615
/* end confdefs.h.  */
4616
#include <tk.h>
4617
int
4618
main ()
4619
{
4620
Tk_MainLoop();
4621
  ;
4622
  return 0;
4623
}
4624
_ACEOF
4625
if ac_fn_cxx_try_link "$LINENO"; then :
4626
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4627
$as_echo "yes" >&6; }; tcltk_ok=yes;
4628
else
4629
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630
$as_echo "no" >&6; }; tcltk_ok=no;
4631
fi
4632
rm -f core conftest.err conftest.$ac_objext \
4633
    conftest$ac_exeext conftest.$ac_ext
4634

    
4635
   CXXFLAGS=$save_CXXFLAGS
4636
   LIBS=$save_LIBS
4637

    
4638
    else
4639
        # try to use tcl/tk without X (e.g. on Mac OS X native aqua Tcl/Tk impl)
4640

    
4641
   save_CXXFLAGS=$CXXFLAGS
4642
   save_LIBS=$LIBS
4643

    
4644
   CXXFLAGS="$CFLAGS_RELEASE $TK_CFLAGS86"
4645
   LIBS="-ltk8.6 -ltcl8.6"
4646

    
4647
   { $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
4648
$as_echo_n "checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS86\" LIBS=\"-ltk8.6 -ltcl8.6\"... " >&6; }
4649

    
4650
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4651
/* end confdefs.h.  */
4652
#include <tk.h>
4653
int
4654
main ()
4655
{
4656
Tk_MainLoop();
4657
  ;
4658
  return 0;
4659
}
4660
_ACEOF
4661
if ac_fn_cxx_try_link "$LINENO"; then :
4662
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4663
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="-ltk8.6 -ltcl8.6" TK_CFLAGS=$TK_CFLAGS86
4664
else
4665
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4666
$as_echo "no" >&6; }; tcltk_ok=no;
4667
fi
4668
rm -f core conftest.err conftest.$ac_objext \
4669
    conftest$ac_exeext conftest.$ac_ext
4670

    
4671
   CXXFLAGS=$save_CXXFLAGS
4672
   LIBS=$save_LIBS
4673

    
4674
        if test $tcltk_ok = no; then
4675

    
4676
   save_CXXFLAGS=$CXXFLAGS
4677
   save_LIBS=$LIBS
4678

    
4679
   CXXFLAGS="$CFLAGS_RELEASE $TK_CFLAGS85"
4680
   LIBS="-ltk8.5 -ltcl8.5"
4681

    
4682
   { $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
4683
$as_echo_n "checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS85\" LIBS=\"-ltk8.5 -ltcl8.5\"... " >&6; }
4684

    
4685
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4686
/* end confdefs.h.  */
4687
#include <tk.h>
4688
int
4689
main ()
4690
{
4691
Tk_MainLoop();
4692
  ;
4693
  return 0;
4694
}
4695
_ACEOF
4696
if ac_fn_cxx_try_link "$LINENO"; then :
4697
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4698
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="-ltk8.5 -ltcl8.5" TK_CFLAGS=$TK_CFLAGS85
4699
else
4700
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701
$as_echo "no" >&6; }; tcltk_ok=no;
4702
fi
4703
rm -f core conftest.err conftest.$ac_objext \
4704
    conftest$ac_exeext conftest.$ac_ext
4705

    
4706
   CXXFLAGS=$save_CXXFLAGS
4707
   LIBS=$save_LIBS
4708

    
4709
        fi
4710
        if test $tcltk_ok = no; then
4711

    
4712
   save_CXXFLAGS=$CXXFLAGS
4713
   save_LIBS=$LIBS
4714

    
4715
   CXXFLAGS="$CFLAGS_RELEASE $TK_CFLAGS84"
4716
   LIBS="-ltk8.4 -ltcl8.4"
4717

    
4718
   { $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
4719
$as_echo_n "checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $TK_CFLAGS84\" LIBS=\"-ltk8.4 -ltcl8.4\"... " >&6; }
4720

    
4721
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4722
/* end confdefs.h.  */
4723
#include <tk.h>
4724
int
4725
main ()
4726
{
4727
Tk_MainLoop();
4728
  ;
4729
  return 0;
4730
}
4731
_ACEOF
4732
if ac_fn_cxx_try_link "$LINENO"; then :
4733
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4734
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="-ltk8.4 -ltcl8.4" TK_CFLAGS=$TK_CFLAGS84
4735
else
4736
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4737
$as_echo "no" >&6; }; tcltk_ok=no;
4738
fi
4739
rm -f core conftest.err conftest.$ac_objext \
4740
    conftest$ac_exeext conftest.$ac_ext
4741

    
4742
   CXXFLAGS=$save_CXXFLAGS
4743
   LIBS=$save_LIBS
4744

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

    
4783
else
4784
  # Broken: fails on valid input.
4785
continue
4786
fi
4787
rm -f conftest.err conftest.i conftest.$ac_ext
4788

    
4789
  # OK, works on sane cases.  Now check whether nonexistent headers
4790
  # can be detected and how.
4791
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4792
/* end confdefs.h.  */
4793
#include <ac_nonexistent.h>
4794
_ACEOF
4795
if ac_fn_cxx_try_cpp "$LINENO"; then :
4796
  # Broken: success on invalid input.
4797
continue
4798
else
4799
  # Passes both tests.
4800
ac_preproc_ok=:
4801
break
4802
fi
4803
rm -f conftest.err conftest.i conftest.$ac_ext
4804

    
4805
done
4806
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4807
rm -f conftest.i conftest.err conftest.$ac_ext
4808
if $ac_preproc_ok; then :
4809
  break
4810
fi
4811

    
4812
    done
4813
    ac_cv_prog_CXXCPP=$CXXCPP
4814

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

    
4842
else
4843
  # Broken: fails on valid input.
4844
continue
4845
fi
4846
rm -f conftest.err conftest.i conftest.$ac_ext
4847

    
4848
  # OK, works on sane cases.  Now check whether nonexistent headers
4849
  # can be detected and how.
4850
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4851
/* end confdefs.h.  */
4852
#include <ac_nonexistent.h>
4853
_ACEOF
4854
if ac_fn_cxx_try_cpp "$LINENO"; then :
4855
  # Broken: success on invalid input.
4856
continue
4857
else
4858
  # Passes both tests.
4859
ac_preproc_ok=:
4860
break
4861
fi
4862
rm -f conftest.err conftest.i conftest.$ac_ext
4863

    
4864
done
4865
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4866
rm -f conftest.i conftest.err conftest.$ac_ext
4867
if $ac_preproc_ok; then :
4868

    
4869
else
4870
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4871
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4872
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
4873
See \`config.log' for more details" "$LINENO" 5; }
4874
fi
4875

    
4876
ac_ext=cpp
4877
ac_cpp='$CXXCPP $CPPFLAGS'
4878
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4879
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4880
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4881

    
4882

    
4883
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
4884
$as_echo_n "checking for X... " >&6; }
4885

    
4886

    
4887
# Check whether --with-x was given.
4888
if test "${with_x+set}" = set; then :
4889
  withval=$with_x;
4890
fi
4891

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

    
4943
# Standard set of common directories for X headers.
4944
# Check X11 before X11Rn because it is often a symlink to the current release.
4945
ac_x_header_dirs='
4946
/usr/X11/include
4947
/usr/X11R7/include
4948
/usr/X11R6/include
4949
/usr/X11R5/include
4950
/usr/X11R4/include
4951

    
4952
/usr/include/X11
4953
/usr/include/X11R7
4954
/usr/include/X11R6
4955
/usr/include/X11R5
4956
/usr/include/X11R4
4957

    
4958
/usr/local/X11/include
4959
/usr/local/X11R7/include
4960
/usr/local/X11R6/include
4961
/usr/local/X11R5/include
4962
/usr/local/X11R4/include
4963

    
4964
/usr/local/include/X11
4965
/usr/local/include/X11R7
4966
/usr/local/include/X11R6
4967
/usr/local/include/X11R5
4968
/usr/local/include/X11R4
4969

    
4970
/usr/X386/include
4971
/usr/x386/include
4972
/usr/XFree86/include/X11
4973

    
4974
/usr/include
4975
/usr/local/include
4976
/usr/unsupported/include
4977
/usr/athena/include
4978
/usr/local/x11r5/include
4979
/usr/lpp/Xamples/include
4980

    
4981
/usr/openwin/include
4982
/usr/openwin/share/include'
4983

    
4984
if test "$ac_x_includes" = no; then
4985
  # Guess where to find include files, by looking for Xlib.h.
4986
  # First, try using that file with no special directory specified.
4987
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4988
/* end confdefs.h.  */
4989
#include <X11/Xlib.h>
4990
_ACEOF
4991
if ac_fn_cxx_try_cpp "$LINENO"; then :
4992
  # We can compile using X headers with no special include directory.
4993
ac_x_includes=
4994
else
4995
  for ac_dir in $ac_x_header_dirs; do
4996
  if test -r "$ac_dir/X11/Xlib.h"; then
4997
    ac_x_includes=$ac_dir
4998
    break
4999
  fi
5000
done
5001
fi
5002
rm -f conftest.err conftest.i conftest.$ac_ext
5003
fi # $ac_x_includes = no
5004

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

    
5043
case $ac_x_includes,$ac_x_libraries in #(
5044
  no,* | *,no | *\'*)
5045
    # Didn't find X, or a directory has "'" in its name.
5046
    ac_cv_have_x="have_x=no";; #(
5047
  *)
5048
    # Record where we found X for the cache.
5049
    ac_cv_have_x="have_x=yes\
5050
	ac_x_includes='$ac_x_includes'\
5051
	ac_x_libraries='$ac_x_libraries'"
5052
esac
5053
fi
5054
;; #(
5055
    *) have_x=yes;;
5056
  esac
5057
  eval "$ac_cv_have_x"
5058
fi # $with_x != no
5059

    
5060
if test "$have_x" != yes; then
5061
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
5062
$as_echo "$have_x" >&6; }
5063
  no_x=yes
5064
else
5065
  # If each of the values was on the command line, it overrides each guess.
5066
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5067
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5068
  # Update the cache value to reflect the command line values.
5069
  ac_cv_have_x="have_x=yes\
5070
	ac_x_includes='$x_includes'\
5071
	ac_x_libraries='$x_libraries'"
5072
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
5073
$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
5074
fi
5075

    
5076
            if test "$no_x" = "yes"; then
5077
                opp_x11inc=
5078
                opp_x11lib=
5079
            else
5080
               if test -n "$x_includes"; then
5081
                   opp_x11inc="-I$x_includes"
5082
               fi
5083
               if test -n "$x_libraries"; then
5084
                   opp_x11lib="-L$x_libraries -lX11"
5085
               fi
5086
            fi
5087
        fi
5088
        if test $tcltk_ok = no; then
5089

    
5090
   save_CXXFLAGS=$CXXFLAGS
5091
   save_LIBS=$LIBS
5092

    
5093
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86"
5094
   LIBS="$opp_x11lib -ltk86 -ltcl86"
5095

    
5096
   { $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
5097
$as_echo_n "checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -ltk86 -ltcl86\"... " >&6; }
5098

    
5099
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5100
/* end confdefs.h.  */
5101
#include <tk.h>
5102
int
5103
main ()
5104
{
5105
Tk_MainLoop();
5106
  ;
5107
  return 0;
5108
}
5109
_ACEOF
5110
if ac_fn_cxx_try_link "$LINENO"; then :
5111
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5112
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk86 -ltcl86" TK_CFLAGS=$TK_CFLAGS86
5113
else
5114
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115
$as_echo "no" >&6; }; tcltk_ok=no;
5116
fi
5117
rm -f core conftest.err conftest.$ac_objext \
5118
    conftest$ac_exeext conftest.$ac_ext
5119

    
5120
   CXXFLAGS=$save_CXXFLAGS
5121
   LIBS=$save_LIBS
5122

    
5123
        fi
5124
        if test $tcltk_ok = no; then
5125

    
5126
   save_CXXFLAGS=$CXXFLAGS
5127
   save_LIBS=$LIBS
5128

    
5129
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86"
5130
   LIBS="$opp_x11lib -ltk8.6 -ltcl8.6"
5131

    
5132
   { $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
5133
$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; }
5134

    
5135
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5136
/* end confdefs.h.  */
5137
#include <tk.h>
5138
int
5139
main ()
5140
{
5141
Tk_MainLoop();
5142
  ;
5143
  return 0;
5144
}
5145
_ACEOF
5146
if ac_fn_cxx_try_link "$LINENO"; then :
5147
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5148
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk8.6 -ltcl8.6" TK_CFLAGS=$TK_CFLAGS86
5149
else
5150
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151
$as_echo "no" >&6; }; tcltk_ok=no;
5152
fi
5153
rm -f core conftest.err conftest.$ac_objext \
5154
    conftest$ac_exeext conftest.$ac_ext
5155

    
5156
   CXXFLAGS=$save_CXXFLAGS
5157
   LIBS=$save_LIBS
5158

    
5159
        fi
5160
        if test $tcltk_ok = no -a "$cygwin" = yes; then
5161

    
5162
   save_CXXFLAGS=$CXXFLAGS
5163
   save_LIBS=$LIBS
5164

    
5165
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86"
5166
   LIBS="$opp_x11lib -lcygtk86 -lcygtcl86"
5167

    
5168
   { $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
5169
$as_echo_n "checking for Tcl/Tk 8.6 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS86\" LIBS=\"$opp_x11lib -lcygtk86 -lcygtcl86\"... " >&6; }
5170

    
5171
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5172
/* end confdefs.h.  */
5173
#include <tk.h>
5174
int
5175
main ()
5176
{
5177
Tk_MainLoop();
5178
  ;
5179
  return 0;
5180
}
5181
_ACEOF
5182
if ac_fn_cxx_try_link "$LINENO"; then :
5183
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5184
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -lcygtk86 -lcygtcl86" TK_CFLAGS=$TK_CFLAGS86
5185
else
5186
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187
$as_echo "no" >&6; }; tcltk_ok=no;
5188
fi
5189
rm -f core conftest.err conftest.$ac_objext \
5190
    conftest$ac_exeext conftest.$ac_ext
5191

    
5192
   CXXFLAGS=$save_CXXFLAGS
5193
   LIBS=$save_LIBS
5194

    
5195
        fi
5196
        # check for 8.5
5197
        if test $tcltk_ok = no; then
5198

    
5199
   save_CXXFLAGS=$CXXFLAGS
5200
   save_LIBS=$LIBS
5201

    
5202
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85"
5203
   LIBS="$opp_x11lib -ltk85 -ltcl85"
5204

    
5205
   { $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
5206
$as_echo_n "checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -ltk85 -ltcl85\"... " >&6; }
5207

    
5208
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5209
/* end confdefs.h.  */
5210
#include <tk.h>
5211
int
5212
main ()
5213
{
5214
Tk_MainLoop();
5215
  ;
5216
  return 0;
5217
}
5218
_ACEOF
5219
if ac_fn_cxx_try_link "$LINENO"; then :
5220
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5221
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk85 -ltcl85" TK_CFLAGS=$TK_CFLAGS85
5222
else
5223
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224
$as_echo "no" >&6; }; tcltk_ok=no;
5225
fi
5226
rm -f core conftest.err conftest.$ac_objext \
5227
    conftest$ac_exeext conftest.$ac_ext
5228

    
5229
   CXXFLAGS=$save_CXXFLAGS
5230
   LIBS=$save_LIBS
5231

    
5232
        fi
5233
        if test $tcltk_ok = no; then
5234

    
5235
   save_CXXFLAGS=$CXXFLAGS
5236
   save_LIBS=$LIBS
5237

    
5238
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85"
5239
   LIBS="$opp_x11lib -ltk8.5 -ltcl8.5"
5240

    
5241
   { $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
5242
$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; }
5243

    
5244
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5245
/* end confdefs.h.  */
5246
#include <tk.h>
5247
int
5248
main ()
5249
{
5250
Tk_MainLoop();
5251
  ;
5252
  return 0;
5253
}
5254
_ACEOF
5255
if ac_fn_cxx_try_link "$LINENO"; then :
5256
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5257
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk8.5 -ltcl8.5" TK_CFLAGS=$TK_CFLAGS85
5258
else
5259
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260
$as_echo "no" >&6; }; tcltk_ok=no;
5261
fi
5262
rm -f core conftest.err conftest.$ac_objext \
5263
    conftest$ac_exeext conftest.$ac_ext
5264

    
5265
   CXXFLAGS=$save_CXXFLAGS
5266
   LIBS=$save_LIBS
5267

    
5268
        fi
5269
        if test $tcltk_ok = no -a "$cygwin" = yes; then
5270

    
5271
   save_CXXFLAGS=$CXXFLAGS
5272
   save_LIBS=$LIBS
5273

    
5274
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85"
5275
   LIBS="$opp_x11lib -lcygtk85 -lcygtcl85"
5276

    
5277
   { $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
5278
$as_echo_n "checking for Tcl/Tk 8.5 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS85\" LIBS=\"$opp_x11lib -lcygtk85 -lcygtcl85\"... " >&6; }
5279

    
5280
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5281
/* end confdefs.h.  */
5282
#include <tk.h>
5283
int
5284
main ()
5285
{
5286
Tk_MainLoop();
5287
  ;
5288
  return 0;
5289
}
5290
_ACEOF
5291
if ac_fn_cxx_try_link "$LINENO"; then :
5292
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5293
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -lcygtk85 -lcygtcl85" TK_CFLAGS=$TK_CFLAGS85
5294
else
5295
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296
$as_echo "no" >&6; }; tcltk_ok=no;
5297
fi
5298
rm -f core conftest.err conftest.$ac_objext \
5299
    conftest$ac_exeext conftest.$ac_ext
5300

    
5301
   CXXFLAGS=$save_CXXFLAGS
5302
   LIBS=$save_LIBS
5303

    
5304
        fi
5305
        # check for 8.4
5306
        if test $tcltk_ok = no; then
5307

    
5308
   save_CXXFLAGS=$CXXFLAGS
5309
   save_LIBS=$LIBS
5310

    
5311
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84"
5312
   LIBS="$opp_x11lib -ltk84 -ltcl84"
5313

    
5314
   { $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
5315
$as_echo_n "checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -ltk84 -ltcl84\"... " >&6; }
5316

    
5317
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5318
/* end confdefs.h.  */
5319
#include <tk.h>
5320
int
5321
main ()
5322
{
5323
Tk_MainLoop();
5324
  ;
5325
  return 0;
5326
}
5327
_ACEOF
5328
if ac_fn_cxx_try_link "$LINENO"; then :
5329
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5330
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk84 -ltcl84" TK_CFLAGS=$TK_CFLAGS84
5331
else
5332
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333
$as_echo "no" >&6; }; tcltk_ok=no;
5334
fi
5335
rm -f core conftest.err conftest.$ac_objext \
5336
    conftest$ac_exeext conftest.$ac_ext
5337

    
5338
   CXXFLAGS=$save_CXXFLAGS
5339
   LIBS=$save_LIBS
5340

    
5341
        fi
5342
        if test $tcltk_ok = no; then
5343

    
5344
   save_CXXFLAGS=$CXXFLAGS
5345
   save_LIBS=$LIBS
5346

    
5347
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84"
5348
   LIBS="$opp_x11lib -ltk8.4 -ltcl8.4"
5349

    
5350
   { $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
5351
$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; }
5352

    
5353
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354
/* end confdefs.h.  */
5355
#include <tk.h>
5356
int
5357
main ()
5358
{
5359
Tk_MainLoop();
5360
  ;
5361
  return 0;
5362
}
5363
_ACEOF
5364
if ac_fn_cxx_try_link "$LINENO"; then :
5365
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5366
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -ltk8.4 -ltcl8.4" TK_CFLAGS=$TK_CFLAGS84
5367
else
5368
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5369
$as_echo "no" >&6; }; tcltk_ok=no;
5370
fi
5371
rm -f core conftest.err conftest.$ac_objext \
5372
    conftest$ac_exeext conftest.$ac_ext
5373

    
5374
   CXXFLAGS=$save_CXXFLAGS
5375
   LIBS=$save_LIBS
5376

    
5377
        fi
5378
        if test $tcltk_ok = no -a "$cygwin" = yes; then
5379

    
5380
   save_CXXFLAGS=$CXXFLAGS
5381
   save_LIBS=$LIBS
5382

    
5383
   CXXFLAGS="$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84"
5384
   LIBS="$opp_x11lib -lcygtk84 -lcygtcl84"
5385

    
5386
   { $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
5387
$as_echo_n "checking for Tcl/Tk 8.4 with CFLAGS=\"$CFLAGS_RELEASE $opp_x11inc $TK_CFLAGS84\" LIBS=\"$opp_x11lib -lcygtk84 -lcygtcl84\"... " >&6; }
5388

    
5389
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5390
/* end confdefs.h.  */
5391
#include <tk.h>
5392
int
5393
main ()
5394
{
5395
Tk_MainLoop();
5396
  ;
5397
  return 0;
5398
}
5399
_ACEOF
5400
if ac_fn_cxx_try_link "$LINENO"; then :
5401
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5402
$as_echo "yes" >&6; }; tcltk_ok=yes; TK_LIBS="$opp_x11lib -lcygtk84 -lcygtcl84" TK_CFLAGS=$TK_CFLAGS84
5403
else
5404
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5405
$as_echo "no" >&6; }; tcltk_ok=no;
5406
fi
5407
rm -f core conftest.err conftest.$ac_objext \
5408
    conftest$ac_exeext conftest.$ac_ext
5409

    
5410
   CXXFLAGS=$save_CXXFLAGS
5411
   LIBS=$save_LIBS
5412

    
5413
        fi
5414
    fi
5415

    
5416
    if test $tcltk_ok = no; then
5417
        # try to give a hint in the error message about the problem
5418
        if test "$no_x" = "yes"; then
5419
            if test "$cygwin" = yes; then
5420
                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
5421
            else
5422
                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
5423
            fi
5424
        else
5425
            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
5426
        fi
5427
    fi
5428

    
5429
    # Check for tclsh.
5430
    for ac_prog in $TCLSH tclsh tclsh86 tclsh8.6 tclsh85 tclsh8.5 tclsh84 tclsh8.4 cygtclsh cygtclsh86 cygtclsh85 cygtclsh84
5431
do
5432
  # Extract the first word of "$ac_prog", so it can be a program name with args.
5433
set dummy $ac_prog; ac_word=$2
5434
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5435
$as_echo_n "checking for $ac_word... " >&6; }
5436
if ${ac_cv_prog_TCLSH+:} false; then :
5437
  $as_echo_n "(cached) " >&6
5438
else
5439
  if test -n "$TCLSH"; then
5440
  ac_cv_prog_TCLSH="$TCLSH" # Let the user override the test.
5441
else
5442
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5443
for as_dir in $PATH
5444
do
5445
  IFS=$as_save_IFS
5446
  test -z "$as_dir" && as_dir=.
5447
    for ac_exec_ext in '' $ac_executable_extensions; do
5448
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5449
    ac_cv_prog_TCLSH="$ac_prog"
5450
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5451
    break 2
5452
  fi
5453
done
5454
  done
5455
IFS=$as_save_IFS
5456

    
5457
fi
5458
fi
5459
TCLSH=$ac_cv_prog_TCLSH
5460
if test -n "$TCLSH"; then
5461
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
5462
$as_echo "$TCLSH" >&6; }
5463
else
5464
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5465
$as_echo "no" >&6; }
5466
fi
5467

    
5468

    
5469
  test -n "$TCLSH" && break
5470
done
5471
test -n "$TCLSH" || TCLSH="nope"
5472

    
5473
    if test "$TCLSH" = nope; then
5474
       as_fn_error $? "Cannot find tclsh, part of Tcl/Tk -- maybe it is not in the PATH or has some exotic name (tested names were: tclsh tclsh86 tclsh8.6 tclsh85 tclsh8.5 tclsh84 tclsh8.4 cygtclsh cygtclsh86 cygtclsh85 cygtclsh84)" "$LINENO" 5
5475
    fi
5476
    if echo 'puts OK; exit' | $TCLSH | grep OK >/dev/null; then :; else
5477
        as_fn_error $? "Cannot run tclsh (tclsh command \"puts OK; exit\" failed): maybe your TCL installation is broken?" "$LINENO" 5
5478
    fi
5479

    
5480
    # disabled because this check actually only works with a running X server. However, the OPP_CHECK_LIB checks above should cover this check most of the time.
5481
    #if echo 'catch {package require Tk 8.4; puts OK}; exit' | $TCLSH | grep OK >/dev/null; then :; else
5482
    #    AC_MSG_ERROR([tclsh command "package require Tk 8.4" failed: probably old Tcl/Tk version, version 8.4.0+ required])
5483
    #fi
5484

    
5485
    # note: square brackets necessary otherwise M4 messes up the Tcl command
5486
    tcl_library=`echo 'puts [info library]; exit' | $TCLSH`
5487

    
5488

    
5489
    #----------------------
5490
    # Check for BLT. NOTE: since plove and scalars are out, blt-devel is no longer needed
5491
    #----------------------
5492
    if echo 'catch {package require BLT 2.4; puts OK}; exit' | $TCLSH | grep OK >/dev/null; then
5493
        HAVE_BLT=yes
5494
    else
5495
        HAVE_BLT=no
5496
        # Native Tcl/Tk (aqua) on Mac OS does not support BLT so we do not annoy the users
5497
        if test "$PLATFORM" != "macosx"; then
5498
            OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES  BLT (optional)"
5499
            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Tcl cannot load BLT (wish command \"package require BLT 2.4\" failed), BLT not installed?" >&5
5500
$as_echo "$as_me: WARNING: Tcl cannot load BLT (wish command \"package require BLT 2.4\" failed), BLT not installed?" >&2;}
5501
        fi
5502
    fi
5503

    
5504
    # if we got through until here, enable building of the following progs:
5505
    TKENV_IF_POSSIBLE=tkenv
5506

    
5507
    # and build samples using Tkenv
5508
    ALL_ENV_LIBS='$(TKENV_LIBS) $(CMDENV_LIBS)'
5509

    
5510
fi # end of Tcl tests ($NO_TCL=="" branch)
5511

    
5512
#----------------------
5513
# Check for pthread
5514
#----------------------
5515

    
5516
   save_CXXFLAGS=$CXXFLAGS
5517
   save_LIBS=$LIBS
5518

    
5519
   CXXFLAGS="$PTHREAD_CFLAGS"
5520
   LIBS="$PTHREAD_LIBS"
5521

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

    
5525
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5526
/* end confdefs.h.  */
5527
#include <pthread.h>
5528
int
5529
main ()
5530
{
5531
pthread_join;
5532
  ;
5533
  return 0;
5534
}
5535
_ACEOF
5536
if ac_fn_cxx_try_link "$LINENO"; then :
5537
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5538
$as_echo "yes" >&6; }; pthread_ok=yes;
5539
else
5540
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5541
$as_echo "no" >&6; }; pthread_ok=no;
5542
fi
5543
rm -f core conftest.err conftest.$ac_objext \
5544
    conftest$ac_exeext conftest.$ac_ext
5545

    
5546
   CXXFLAGS=$save_CXXFLAGS
5547
   LIBS=$save_LIBS
5548

    
5549
if test $pthread_ok = no; then
5550
	as_fn_error $? "pthread lib not found." "$LINENO" 5
5551
fi
5552

    
5553
CFLAGS_DEBUG="$CFLAGS_DEBUG $PTHREAD_CFLAGS"
5554
CFLAGS_RELEASE="$CFLAGS_RELEASE $PTHREAD_CFLAGS"
5555
SYS_LIBS="$SYS_LIBS $PTHREAD_LIBS"
5556

    
5557

    
5558
#----------------------
5559
# Check for libatomic-ops-dev
5560
#----------------------
5561

    
5562
   save_CXXFLAGS=$CXXFLAGS
5563
   save_LIBS=$LIBS
5564

    
5565
   CXXFLAGS="$ATOMIC_OPS_CFLAGS"
5566
   LIBS="$ATOMIC_OPS_LIBS"
5567

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

    
5571
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5572
/* end confdefs.h.  */
5573
#include <atomic_ops.h>
5574
int
5575
main ()
5576
{
5577
AO_load;
5578
  ;
5579
  return 0;
5580
}
5581
_ACEOF
5582
if ac_fn_cxx_try_link "$LINENO"; then :
5583
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5584
$as_echo "yes" >&6; }; atomic_ops_ok=yes;
5585
else
5586
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587
$as_echo "no" >&6; }; atomic_ops_ok=no;
5588
fi
5589
rm -f core conftest.err conftest.$ac_objext \
5590
    conftest$ac_exeext conftest.$ac_ext
5591

    
5592
   CXXFLAGS=$save_CXXFLAGS
5593
   LIBS=$save_LIBS
5594

    
5595
if test $atomic_ops_ok = no; then
5596
    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
5597
fi
5598

    
5599
CFLAGS_DEBUG="$CFLAGS_DEBUG $ATOMIC_OPS_CFLAGS"
5600
CFLAGS_RELEASE="$CFLAGS_RELEASE $ATOMIC_OPS_CFLAGS"
5601
SYS_LIBS="$SYS_LIBS $ATOMIC_OPS_LIBS"
5602

    
5603
#----------------------
5604
# Check for JRE
5605
#----------------------
5606
for ac_prog in $JRE java
5607
do
5608
  # Extract the first word of "$ac_prog", so it can be a program name with args.
5609
set dummy $ac_prog; ac_word=$2
5610
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5611
$as_echo_n "checking for $ac_word... " >&6; }
5612
if ${ac_cv_prog_JRE+:} false; then :
5613
  $as_echo_n "(cached) " >&6
5614
else
5615
  if test -n "$JRE"; then
5616
  ac_cv_prog_JRE="$JRE" # Let the user override the test.
5617
else
5618
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619
for as_dir in $PATH
5620
do
5621
  IFS=$as_save_IFS
5622
  test -z "$as_dir" && as_dir=.
5623
    for ac_exec_ext in '' $ac_executable_extensions; do
5624
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5625
    ac_cv_prog_JRE="$ac_prog"
5626
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5627
    break 2
5628
  fi
5629
done
5630
  done
5631
IFS=$as_save_IFS
5632

    
5633
fi
5634
fi
5635
JRE=$ac_cv_prog_JRE
5636
if test -n "$JRE"; then
5637
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JRE" >&5
5638
$as_echo "$JRE" >&6; }
5639
else
5640
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5641
$as_echo "no" >&6; }
5642
fi
5643

    
5644

    
5645
  test -n "$JRE" && break
5646
done
5647
test -n "$JRE" || JRE="nope"
5648

    
5649
if test "$JRE" = nope; then
5650
   OPP_PROBLEM_PACKAGES="$OPP_PROBLEM_PACKAGES  JRE (recommended)"
5651
   { $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
5652
$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;}
5653
fi
5654

    
5655
#----------------------
5656
# Check for JDK
5657
#----------------------
5658

    
5659
if test "$JAVA_CFLAGS" = ""; then
5660
   if test "$JDK" = ""; then
5661
     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"
5662
     for dir in $javahome_candidates; do
5663
         if test "$JAVA_HOME" = "" -a -d "$dir"; then
5664
             JAVA_HOME=$dir
5665
         fi
5666
     done
5667
   else
5668
     JAVA_HOME=$JDK
5669
   fi
5670
   if test "$JAVA_HOME" = ""; then
5671
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JAVA_HOME variable not set." >&5
5672
$as_echo "$as_me: WARNING: JAVA_HOME variable not set." >&2;}
5673
   else
5674
      JAVA_CFLAGS="-fno-strict-aliasing -I$JAVA_HOME/include -I$JAVA_HOME/include/$jni_platform"
5675
      JAVA_LIBS="-L$JAVA_HOME/jre/lib/i386/client -Wl,-rpath,$JAVA_HOME/jre/lib/i386/client:. -ljvm"
5676
   fi
5677
fi
5678

    
5679

    
5680
   save_CXXFLAGS=$CXXFLAGS
5681
   CXXFLAGS="$CFLAGS_RELEASE $JAVA_CFLAGS"
5682

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

    
5686
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5687
/* end confdefs.h.  */
5688
#include <jni.h>
5689
int
5690
main ()
5691
{
5692
JNI_GetCreatedJavaVMs(0,0,0);
5693
  ;
5694
  return 0;
5695
}
5696
_ACEOF
5697
if ac_fn_cxx_try_compile "$LINENO"; then :
5698
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5699
$as_echo "yes" >&6; }; jni_ok=yes;
5700
else
5701
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5