configure 759 KB
Newer Older
6001
    for ac_exec_ext in '' $ac_executable_extensions; do
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6002
6003
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
6004
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6005
6006
6007
    break 2
  fi
done
6008
  done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6009
6010
6011
6012
6013
6014
IFS=$as_save_IFS

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
6015
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
6016
$as_echo "$CXX" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6017
else
6018
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6019
$as_echo "no" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
6032
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033
$as_echo_n "checking for $ac_word... " >&6; }
6034
if ${ac_cv_prog_ac_ct_CXX+:} false; then :
6035
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6036
6037
6038
6039
6040
6041
6042
6043
6044
else
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
6045
    for ac_exec_ext in '' $ac_executable_extensions; do
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6046
6047
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
6048
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6049
6050
6051
    break 2
  fi
done
6052
  done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6053
6054
6055
6056
6057
6058
IFS=$as_save_IFS

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
6059
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
6060
$as_echo "$ac_ct_CXX" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6061
else
6062
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063
$as_echo "no" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
6075
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6076
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6077
6078
6079
6080
6081
6082
6083
6084
6085
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
6086
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
6087
6088
set X $ac_compile
ac_compiler=$2
6089
6090
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6091
6092
6093
6094
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
6095
6096
6097
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6098
  ac_status=$?
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6109

6110
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
6111
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
6112
if ${ac_cv_cxx_compiler_gnu+:} false; then :
6113
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6114
else
6115
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
/* end confdefs.h.  */

int
main ()
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
6129
if ac_fn_cxx_try_compile "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6130
6131
  ac_compiler_gnu=yes
else
6132
  ac_compiler_gnu=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6133
6134
6135
6136
6137
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
6138
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
6139
6140
6141
6142
6143
6144
$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6145
6146
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
6147
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
6148
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
6149
if ${ac_cv_prog_cxx_g+:} false; then :
6150
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6151
6152
6153
6154
6155
else
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
6156
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
6167
if ac_fn_cxx_try_compile "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6168
6169
  ac_cv_prog_cxx_g=yes
else
6170
6171
  CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
6182
if ac_fn_cxx_try_compile "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6183

6184
6185
else
  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6186
	 CXXFLAGS="-g"
6187
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
6198
if ac_fn_cxx_try_compile "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6199
6200
6201
6202
6203
6204
6205
6206
6207
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
6208
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
6209
$as_echo "$ac_cv_prog_cxx_g" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

depcc="$CXX"  am_compiler_list=

6233
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6234
$as_echo_n "checking dependency style of $depcc... " >&6; }
6235
if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
6236
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
else
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named `D' -- because `-MD' means `put the output
  # in D'.
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir
  # We will build objects and dependencies in a subdirectory because
  # it helps to detect inapplicable dependency modes.  For instance
  # both Tru64's cc and ICC support -MD to output dependencies as a
  # side effect of compilation, but ICC will put the dependencies in
  # the current directory while Tru64 will put them in the object
  # directory.
  mkdir sub

  am_cv_CXX_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  for depmode in $am_compiler_list; do
    # Setup a source with many dependencies, because some compilers
    # like to wrap large dependency lists on column 80 (with \), and
    # we should not choose a depcomp mode which is confused by this.
    #
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    : > sub/conftest.c
    for i in 1 2 3 4 5 6; do
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
      # Solaris 8's {/usr,}/bin/sh.
      touch sub/conftst$i.h
    done
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf

    case $depmode in
    nosideeffect)
      # after this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    none) break ;;
    esac
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle `-M -o', and we need to detect this.
    if depmode=$depmode \
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
         >/dev/null 2>conftest.err &&
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      # icc doesn't choke on unknown options, it will just issue warnings
      # or remarks (even with -Werror).  So we grep stderr for any message
      # that says an option was ignored or not supported.
      # When given -MP, icc 7.0 and 7.1 complain thusly:
      #   icc: Command line warning: ignoring option '-M'; no argument required
      # The diagnosis changed in icc 8.0:
      #   icc: Command line remark: option '-MP' not supported
      if (grep 'ignoring option' conftest.err ||
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
        am_cv_CXX_dependencies_compiler_type=$depmode
        break
      fi
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CXX_dependencies_compiler_type=none
fi

fi
6324
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
6325
$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type

 if
  test "x$enable_dependency_tracking" != xno \
  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
  am__fastdepCXX_TRUE=
  am__fastdepCXX_FALSE='#'
else
  am__fastdepCXX_TRUE='#'
  am__fastdepCXX_FALSE=
fi




if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
    (test "X$CXX" != "Xg++"))) ; then
  ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6349
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
6350
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6351
if test -z "$CXXCPP"; then
6352
  if ${ac_cv_prog_CXXCPP+:} false; then :
6353
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
else
      # Double quotes because CXXCPP needs to be expanded
    for CXXCPP in "$CXX -E" "/lib/cpp"
    do
      ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
6367
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6368
6369
6370
6371
6372
6373
6374
6375
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
6376
if ac_fn_cxx_try_cpp "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6377

6378
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6379
6380
6381
  # Broken: fails on valid input.
continue
fi
6382
rm -f conftest.err conftest.i conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6383
6384
6385

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
6386
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6387
6388
6389
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
6390
if ac_fn_cxx_try_cpp "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6391
6392
6393
6394
6395
6396
6397
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
6398
rm -f conftest.err conftest.i conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6399
6400
6401

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6402
6403
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
  break
fi

    done
    ac_cv_prog_CXXCPP=$CXXCPP

fi
  CXXCPP=$ac_cv_prog_CXXCPP
else
  ac_cv_prog_CXXCPP=$CXXCPP
fi
6415
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
6416
$as_echo "$CXXCPP" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6417
6418
6419
6420
6421
6422
6423
6424
6425
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
  # Use a header file that comes with gcc, so configuring glibc
  # with a fresh cross-compiler works.
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
  # <limits.h> exists even on freestanding compilers.
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp. "Syntax error" is here to catch this case.
6426
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6427
6428
6429
6430
6431
6432
6433
6434
/* end confdefs.h.  */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
		     Syntax error
_ACEOF
6435
if ac_fn_cxx_try_cpp "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6436

6437
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6438
6439
6440
  # Broken: fails on valid input.
continue
fi
6441
rm -f conftest.err conftest.i conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6442
6443
6444

  # OK, works on sane cases.  Now check whether nonexistent headers
  # can be detected and how.
6445
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6446
6447
6448
/* end confdefs.h.  */
#include <ac_nonexistent.h>
_ACEOF
6449
if ac_fn_cxx_try_cpp "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6450
6451
6452
6453
6454
6455
6456
  # Broken: success on invalid input.
continue
else
  # Passes both tests.
ac_preproc_ok=:
break
fi
6457
rm -f conftest.err conftest.i conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6458
6459
6460

done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6461
6462
6463
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :

Emmanuel Bertin's avatar
Emmanuel Bertin committed
6464
else
6465
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6466
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6467
6468
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details" "$LINENO" 5; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
fi

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

fi


ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
6485
  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6486
6487
6488
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6489
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6490
$as_echo_n "checking for $ac_word... " >&6; }
6491
if ${ac_cv_prog_F77+:} false; then :
6492
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6493
6494
6495
6496
6497
6498
6499
6500
6501
else
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
6502
    for ac_exec_ext in '' $ac_executable_extensions; do
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6503
6504
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
6505
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6506
6507
6508
    break 2
  fi
done
6509
  done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6510
6511
6512
6513
6514
6515
IFS=$as_save_IFS

fi
fi
F77=$ac_cv_prog_F77
if test -n "$F77"; then
6516
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
6517
$as_echo "$F77" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6518
else
6519
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6520
$as_echo "no" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6521
6522
6523
6524
6525
6526
6527
6528
fi


    test -n "$F77" && break
  done
fi
if test -z "$F77"; then
  ac_ct_F77=$F77
6529
  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6530
6531
6532
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
6533
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6534
$as_echo_n "checking for $ac_word... " >&6; }
6535
if ${ac_cv_prog_ac_ct_F77+:} false; then :
6536
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6537
6538
6539
6540
6541
6542
6543
6544
6545
else
  if test -n "$ac_ct_F77"; then
  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
6546
    for ac_exec_ext in '' $ac_executable_extensions; do
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6547
6548
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_ac_ct_F77="$ac_prog"
6549
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6550
6551
6552
    break 2
  fi
done
6553
  done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6554
6555
6556
6557
6558
6559
IFS=$as_save_IFS

fi
fi
ac_ct_F77=$ac_cv_prog_ac_ct_F77
if test -n "$ac_ct_F77"; then
6560
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
6561
$as_echo "$ac_ct_F77" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6562
else
6563
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564
$as_echo "no" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
fi


  test -n "$ac_ct_F77" && break
done

  if test "x$ac_ct_F77" = x; then
    F77=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
6576
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6577
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6578
6579
6580
6581
6582
6583
6584
6585
ac_tool_warned=yes ;;
esac
    F77=$ac_ct_F77
  fi
fi


# Provide some information about the compiler.
6586
$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
6587
6588
set X $ac_compile
ac_compiler=$2
6589
6590
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6591
6592
6593
6594
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
6595
6596
6597
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6598
  ac_status=$?
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6609
6610
6611
6612
6613
6614
rm -f a.out

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.  (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
6615
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
6616
$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
6617
if ${ac_cv_f77_compiler_gnu+:} false; then :
6618
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6619
else
6620
  cat > conftest.$ac_ext <<_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6621
6622
6623
6624
6625
6626
6627
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
6628
if ac_fn_f77_try_compile "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6629
6630
  ac_compiler_gnu=yes
else
6631
  ac_compiler_gnu=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6632
6633
6634
6635
6636
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu

fi
6637
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
6638
$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6639
6640
6641
6642
ac_ext=$ac_save_ext
ac_test_FFLAGS=${FFLAGS+set}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
6643
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
6644
$as_echo_n "checking whether $F77 accepts -g... " >&6; }
6645
if ${ac_cv_prog_f77_g+:} false; then :
6646
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6647
6648
else
  FFLAGS=-g
6649
cat > conftest.$ac_ext <<_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6650
6651
6652
6653
      program main

      end
_ACEOF
6654
if ac_fn_f77_try_compile "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6655
6656
  ac_cv_prog_f77_g=yes
else
6657
  ac_cv_prog_f77_g=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6658
6659
6660
6661
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

fi
6662
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
6663
$as_echo "$ac_cv_prog_f77_g" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
if test "$ac_test_FFLAGS" = set; then
  FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-g -O2"
  else
    FFLAGS="-g"
  fi
else
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-O2"
  else
    FFLAGS=
  fi
fi

6680
6681
6682
6683
6684
if test $ac_compiler_gnu = yes; then
  G77=yes
else
  G77=
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6685
6686
6687
6688
6689
6690
6691
6692
6693
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu



# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6694

Emmanuel Bertin's avatar
Emmanuel Bertin committed
6695
# find the maximum length of command line arguments
6696
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
6697
$as_echo_n "checking the maximum length of command line arguments... " >&6; }
6698
if ${lt_cv_sys_max_cmd_len+:} false; then :
6699
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
else
    i=0
  teststring="ABCD"

  case $build_os in
  msdosdjgpp*)
    # On DJGPP, this test can blow up pretty badly due to problems in libc
    # (any single argument exceeding 2000 bytes causes a buffer overrun
    # during glob expansion).  Even if it were fixed, the result of this
    # check would be larger than it should be.
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
    ;;

  gnu*)
    # Under GNU Hurd, this test is not required because there is
    # no limit to the length of command line arguments.
    # Libtool will interpret -1 as no limit whatsoever
    lt_cv_sys_max_cmd_len=-1;
    ;;

  cygwin* | mingw*)
    # On Win9x/ME, this test blows up -- it succeeds, but takes
    # about 5 minutes as the teststring grows exponentially.
    # Worse, since 9x/ME are not pre-emptively multitasking,
    # you end up with a "frozen" computer, even though with patience
    # the test eventually succeeds (with a max line length of 256k).
    # Instead, let's just punt: use the minimum linelength reported by
    # all of the supported platforms: 8192 (on NT/2K/XP).
    lt_cv_sys_max_cmd_len=8192;
    ;;

  amigaos*)
    # On AmigaOS with pdksh, this test takes hours, literally.
    # So we just punt and use a minimum line length of 8192.
    lt_cv_sys_max_cmd_len=8192;
    ;;

  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
    # This has been around since 386BSD, at least.  Likely further.
    if test -x /sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
    elif test -x /usr/sbin/sysctl; then
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
    else
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
    fi
    # And add a safety zone
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
    ;;

  interix*)
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
    lt_cv_sys_max_cmd_len=196608
    ;;

  osf*)
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
    # nice to cause kernel panics so lets avoid the loop below.
    # First set a reasonable default.
    lt_cv_sys_max_cmd_len=16384
    #
    if test -x /sbin/sysconfig; then
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
      esac
    fi
    ;;
  sco3.2v5*)
    lt_cv_sys_max_cmd_len=102400
    ;;
  sysv5* | sco5v6* | sysv4.2uw2*)
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
    if test -n "$kargmax"; then
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ 	]//'`
    else
      lt_cv_sys_max_cmd_len=32768
    fi
    ;;
  *)
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
    if test -n "$lt_cv_sys_max_cmd_len"; then
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
    else
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
      while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
	       = "XX$teststring") >/dev/null 2>&1 &&
	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
	      lt_cv_sys_max_cmd_len=$new_result &&
	      test $i != 17 # 1/2 MB should be enough
      do
        i=`expr $i + 1`
        teststring=$teststring$teststring
      done
      teststring=
      # Add a significant safety factor because C++ compilers can tack on massive
      # amounts of additional arguments before passing them to the linker.
      # It appears as though 1/2 is a usable value.
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
    fi
    ;;
  esac

fi

if test -n $lt_cv_sys_max_cmd_len ; then
6808
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6809
$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6810
else
6811
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
6812
$as_echo "none" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6813
6814
6815
6816
6817
6818
6819
fi





# Check for command to grab the raw symbol name followed by C symbol from nm.
6820
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
6821
$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
6822
if ${lt_cv_sys_global_symbol_pipe+:} false; then :
6823
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
else

# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]

# Character class describing NM global symbol codes.
symcode='[BCDEGRST]'

# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'

# Transform an extracted symbol line into a proper C declaration
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"

# Transform an extracted symbol line into symbol name and symbol address
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"

# Define system-specific variables.
case $host_os in
aix*)
  symcode='[BCDT]'
  ;;
cygwin* | mingw* | pw32*)
  symcode='[ABCDGISTW]'
  ;;
hpux*) # Its linker distinguishes data from code symbols
  if test "$host_cpu" = ia64; then
    symcode='[ABCDEGRST]'
  fi
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
  ;;
linux* | k*bsd*-gnu)
  if test "$host_cpu" = ia64; then
    symcode='[ABCDGIRSTW]'
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
  fi
  ;;
irix* | nonstopux*)
  symcode='[BCDEGRST]'
  ;;
osf*)
  symcode='[BCDEGQRST]'
  ;;
solaris*)
  symcode='[BDRT]'
  ;;
sco3.2v5*)
  symcode='[DT]'
  ;;
sysv4.2uw2*)
  symcode='[DT]'
  ;;
sysv5* | sco5v6* | unixware* | OpenUNIX*)
  symcode='[ABDT]'
  ;;
sysv4)
  symcode='[DFNSTU]'
  ;;
esac

# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
mingw*)
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  ;;
esac

# If we're using GNU nm, then use its standard symbol codes.
case `$NM -V 2>&1` in
*GNU* | *'with BFD'*)
  symcode='[ABCDGIRSTW]' ;;
esac

# Try without a prefix undercore, then with it.
for ac_symprfx in "" "_"; do

  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  symxfrm="\\1 $ac_symprfx\\2 \\2"

  # Write the raw and C identifiers.
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"

  # Check to see that the pipe works correctly.
  pipe_works=no

  rm -f conftest*
  cat > conftest.$ac_ext <<EOF
#ifdef __cplusplus
extern "C" {
#endif
char nm_test_var;
void nm_test_func(){}
#ifdef __cplusplus
}
#endif
int main(){nm_test_var='a';nm_test_func();return(0);}
EOF

6925
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6926
6927
  (eval $ac_compile) 2>&5
  ac_status=$?
6928
6929
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6930
6931
    # Now try to grab the symbols.
    nlist=conftest.nm
6932
    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6933
6934
  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
  ac_status=$?
6935
6936
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s "$nlist"; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
      # Try sorting and uniquifying the output.
      if sort "$nlist" | uniq > "$nlist"T; then
	mv -f "$nlist"T "$nlist"
      else
	rm -f "$nlist"T
      fi

      # Make sure that we snagged all the symbols we need.
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
	  cat <<EOF > conftest.$ac_ext
#ifdef __cplusplus
extern "C" {
#endif

EOF
	  # Now generate the symbol file.
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'

	  cat <<EOF >> conftest.$ac_ext
#if defined (__STDC__) && __STDC__
# define lt_ptr_t void *
#else
# define lt_ptr_t char *
# define const
#endif

/* The mapping between symbol names and symbols. */
const struct {
  const char *name;
  lt_ptr_t address;
}
lt_preloaded_symbols[] =
{
EOF
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
	  cat <<\EOF >> conftest.$ac_ext
  {0, (lt_ptr_t) 0}
};

#ifdef __cplusplus
}
#endif
EOF
	  # Now try linking the two files.
	  mv conftest.$ac_objext conftstm.$ac_objext
	  lt_save_LIBS="$LIBS"
	  lt_save_CFLAGS="$CFLAGS"
	  LIBS="conftstm.$ac_objext"
	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6987
	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6988
6989
  (eval $ac_link) 2>&5
  ac_status=$?
6990
6991
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
6992
6993
6994
6995
6996
6997
6998
6999
7000
	    pipe_works=yes
	  fi
	  LIBS="$lt_save_LIBS"
	  CFLAGS="$lt_save_CFLAGS"
	else
	  echo "cannot find nm_test_func in $nlist" >&5
	fi
      else
	echo "cannot find nm_test_var in $nlist" >&5
For faster browsing, not all history is shown. View entire blame