acinclude/libtool.m4
author Sam Lantinga <slouken@libsdl.org>
Sun, 04 Oct 2009 20:31:21 +0000
branchSDL-1.2
changeset 4275 b73b5af69f48
child 4277 803eeeeaa8a0
permissions -rw-r--r--
Split acinclude.m4 into its constituent parts for easy upgrading
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4275
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
##############################################################################
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     2
# Based on libtool-1.5.22
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     3
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     4
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     5
## Free Software Foundation, Inc.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     6
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     7
##
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     8
## This file is free software; the Free Software Foundation gives
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     9
## unlimited permission to copy and/or distribute it, with or without
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    10
## modifications, as long as this notice is preserved.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    11
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    12
# serial 48 AC_PROG_LIBTOOL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    13
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    14
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    15
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    16
# -----------------------------------------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    17
# If this macro is not defined by Autoconf, define it here.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    18
m4_ifdef([AC_PROVIDE_IFELSE],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    19
         [],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    20
         [m4_define([AC_PROVIDE_IFELSE],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    21
	         [m4_ifdef([AC_PROVIDE_$1],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    22
		           [$2], [$3])])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    23
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    24
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    25
# AC_PROG_LIBTOOL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
# ---------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    27
AC_DEFUN([AC_PROG_LIBTOOL],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    30
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    31
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    32
    [AC_LIBTOOL_CXX],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    33
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    34
  ])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    35
dnl And a similar setup for Fortran 77 support
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    36
  AC_PROVIDE_IFELSE([AC_PROG_F77],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    37
    [AC_LIBTOOL_F77],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    38
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    39
])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    40
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    41
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    42
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    43
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    44
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    45
    [AC_LIBTOOL_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    46
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    47
      [AC_LIBTOOL_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    48
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    49
	[AC_LIBTOOL_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    50
      [ifdef([AC_PROG_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    51
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    52
       ifdef([A][M_PROG_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    53
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    54
       ifdef([LT_AC_PROG_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    55
	     [define([LT_AC_PROG_GCJ],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    56
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    57
])])# AC_PROG_LIBTOOL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    58
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    59
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    60
# _AC_PROG_LIBTOOL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    61
# ----------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    62
AC_DEFUN([_AC_PROG_LIBTOOL],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    63
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    64
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    65
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    66
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    67
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    68
# This can be used to rebuild libtool when needed
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    69
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    70
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    71
# Always use our own libtool.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    72
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    73
AC_SUBST(LIBTOOL)dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    74
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    75
# Prevent multiple expansion
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    76
define([AC_PROG_LIBTOOL], [])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    77
])# _AC_PROG_LIBTOOL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    78
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    79
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    80
# AC_LIBTOOL_SETUP
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    81
# ----------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    82
AC_DEFUN([AC_LIBTOOL_SETUP],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    83
[AC_PREREQ(2.50)dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    84
AC_REQUIRE([AC_ENABLE_SHARED])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    85
AC_REQUIRE([AC_ENABLE_STATIC])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    86
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    87
AC_REQUIRE([AC_CANONICAL_HOST])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    88
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    89
AC_REQUIRE([AC_PROG_CC])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    90
AC_REQUIRE([AC_PROG_LD])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    91
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    92
AC_REQUIRE([AC_PROG_NM])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    93
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    94
AC_REQUIRE([AC_PROG_LN_S])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    95
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    96
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    97
AC_REQUIRE([AC_OBJEXT])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    98
AC_REQUIRE([AC_EXEEXT])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    99
dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   100
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   101
AC_LIBTOOL_SYS_MAX_CMD_LEN
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   102
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   103
AC_LIBTOOL_OBJDIR
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   104
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   105
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   106
_LT_AC_PROG_ECHO_BACKSLASH
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   107
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   108
case $host_os in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   109
aix3*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   110
  # AIX sometimes has problems with the GCC collect2 program.  For some
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   111
  # reason, if we set the COLLECT_NAMES environment variable, the problems
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   112
  # vanish in a puff of smoke.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   113
  if test "X${COLLECT_NAMES+set}" != Xset; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   114
    COLLECT_NAMES=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   115
    export COLLECT_NAMES
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   116
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   117
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   118
esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   119
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   120
# Sed substitution that helps us do robust quoting.  It backslashifies
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   121
# metacharacters that are still active within double-quoted strings.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   122
Xsed='sed -e 1s/^X//'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   123
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   124
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   125
# Same as above, but do not quote variable references.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   126
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   127
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   128
# Sed substitution to delay expansion of an escaped shell variable in a
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   129
# double_quote_subst'ed string.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   130
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   131
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   132
# Sed substitution to avoid accidental globbing in evaled expressions
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   133
no_glob_subst='s/\*/\\\*/g'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   134
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   135
# Constants:
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   136
rm="rm -f"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   137
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   138
# Global variables:
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   139
default_ofile=libtool
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   140
can_build_shared=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   141
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   142
# All known linkers require a `.a' archive for static linking (except MSVC,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   143
# which needs '.lib').
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   144
libext=a
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   145
ltmain="$ac_aux_dir/ltmain.sh"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   146
ofile="$default_ofile"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   147
with_gnu_ld="$lt_cv_prog_gnu_ld"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   148
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   149
AC_CHECK_TOOL(AR, ar, false)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   150
AC_CHECK_TOOL(RANLIB, ranlib, :)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   151
AC_CHECK_TOOL(STRIP, strip, :)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   152
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   153
old_CC="$CC"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   154
old_CFLAGS="$CFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   155
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   156
# Set sane defaults for various variables
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   157
test -z "$AR" && AR=ar
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   158
test -z "$AR_FLAGS" && AR_FLAGS=cru
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   159
test -z "$AS" && AS=as
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   160
test -z "$CC" && CC=cc
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   161
test -z "$LTCC" && LTCC=$CC
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   162
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   163
test -z "$DLLTOOL" && DLLTOOL=dlltool
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   164
test -z "$LD" && LD=ld
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   165
test -z "$LN_S" && LN_S="ln -s"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   166
test -z "$MAGIC_CMD" && MAGIC_CMD=file
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   167
test -z "$NM" && NM=nm
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   168
test -z "$SED" && SED=sed
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   169
test -z "$OBJDUMP" && OBJDUMP=objdump
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   170
test -z "$RANLIB" && RANLIB=:
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   171
test -z "$STRIP" && STRIP=:
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   172
test -z "$ac_objext" && ac_objext=o
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   173
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   174
# Determine commands to create old-style static archives.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   175
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   176
old_postinstall_cmds='chmod 644 $oldlib'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   177
old_postuninstall_cmds=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   178
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   179
if test -n "$RANLIB"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   180
  case $host_os in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   181
  openbsd*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   182
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   183
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   184
  *)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   185
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   186
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   187
  esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   188
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   189
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   190
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   191
_LT_CC_BASENAME([$compiler])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   192
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   193
# Only perform the check for file, if the check method requires it
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   194
case $deplibs_check_method in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   195
file_magic*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   196
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   197
    AC_PATH_MAGIC
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   198
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   199
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   200
esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   201
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   202
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   203
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   204
enable_win32_dll=yes, enable_win32_dll=no)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   205
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   206
AC_ARG_ENABLE([libtool-lock],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   207
    [AC_HELP_STRING([--disable-libtool-lock],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   208
	[avoid locking (might break parallel builds)])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   209
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   210
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   211
AC_ARG_WITH([pic],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   212
    [AC_HELP_STRING([--with-pic],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   213
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   214
    [pic_mode="$withval"],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   215
    [pic_mode=default])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   216
test -z "$pic_mode" && pic_mode=default
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   217
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   218
# Use C for the default configuration in the libtool script
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   219
tagname=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   220
AC_LIBTOOL_LANG_C_CONFIG
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   221
_LT_AC_TAGCONFIG
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   222
])# AC_LIBTOOL_SETUP
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   223
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   224
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   225
# _LT_AC_SYS_COMPILER
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   226
# -------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   227
AC_DEFUN([_LT_AC_SYS_COMPILER],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   228
[AC_REQUIRE([AC_PROG_CC])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   229
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   230
# If no C compiler was specified, use CC.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   231
LTCC=${LTCC-"$CC"}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   232
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   233
# If no C compiler flags were specified, use CFLAGS.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   234
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   235
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   236
# Allow CC to be a program name with arguments.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   237
compiler=$CC
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   238
])# _LT_AC_SYS_COMPILER
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   239
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   240
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   241
# _LT_CC_BASENAME(CC)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   242
# -------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   243
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   244
AC_DEFUN([_LT_CC_BASENAME],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   245
[for cc_temp in $1""; do
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   246
  case $cc_temp in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   247
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   248
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   249
    \-*) ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   250
    *) break;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   251
  esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   252
done
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   253
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   254
])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   255
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   256
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   257
# _LT_COMPILER_BOILERPLATE
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   258
# ------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   259
# Check for compiler boilerplate output or warnings with
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   260
# the simple compiler test code.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   261
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   262
[ac_outfile=conftest.$ac_objext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   263
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   264
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   265
_lt_compiler_boilerplate=`cat conftest.err`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   266
$rm conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   267
])# _LT_COMPILER_BOILERPLATE
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   268
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   269
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   270
# _LT_LINKER_BOILERPLATE
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   271
# ----------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   272
# Check for linker boilerplate output or warnings with
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   273
# the simple link test code.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   274
AC_DEFUN([_LT_LINKER_BOILERPLATE],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   275
[ac_outfile=conftest.$ac_objext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   276
printf "$lt_simple_link_test_code" >conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   277
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   278
_lt_linker_boilerplate=`cat conftest.err`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   279
$rm conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   280
])# _LT_LINKER_BOILERPLATE
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   281
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   282
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   283
# _LT_AC_SYS_LIBPATH_AIX
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   284
# ----------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   285
# Links a minimal program and checks the executable
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   286
# for the system default hardcoded library path. In most cases,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   287
# this is /usr/lib:/lib, but when the MPI compilers are used
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   288
# the location of the communication and MPI libs are included too.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   289
# If we don't find anything, use the default library path according
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   290
# to the aix ld manual.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   291
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   292
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   293
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   294
}'`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   295
# Check for a 64-bit object if we didn't find anything.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   296
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   297
}'`; fi],[])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   298
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   299
])# _LT_AC_SYS_LIBPATH_AIX
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   300
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   301
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   302
# _LT_AC_SHELL_INIT(ARG)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   303
# ----------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   304
AC_DEFUN([_LT_AC_SHELL_INIT],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   305
[ifdef([AC_DIVERSION_NOTICE],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   306
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   307
	 [AC_DIVERT_PUSH(NOTICE)])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   308
$1
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   309
AC_DIVERT_POP
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   310
])# _LT_AC_SHELL_INIT
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   311
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   312
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   313
# _LT_AC_PROG_ECHO_BACKSLASH
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   314
# --------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   315
# Add some code to the start of the generated configure script which
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   316
# will find an echo command which doesn't interpret backslashes.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   317
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   318
[_LT_AC_SHELL_INIT([
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   319
# Check that we are running under the correct shell.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   320
SHELL=${CONFIG_SHELL-/bin/sh}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   321
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   322
case X$ECHO in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   323
X*--fallback-echo)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   324
  # Remove one level of quotation (which was required for Make).
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   325
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   326
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   327
esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   328
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   329
echo=${ECHO-echo}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   330
if test "X[$]1" = X--no-reexec; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   331
  # Discard the --no-reexec flag, and continue.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   332
  shift
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   333
elif test "X[$]1" = X--fallback-echo; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   334
  # Avoid inline document here, it may be left over
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   335
  :
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   336
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   337
  # Yippee, $echo works!
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   338
  :
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   339
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   340
  # Restart under the correct shell.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   341
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   342
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   343
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   344
if test "X[$]1" = X--fallback-echo; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   345
  # used as fallback echo
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   346
  shift
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   347
  cat <<EOF
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   348
[$]*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   349
EOF
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   350
  exit 0
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   351
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   352
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   353
# The HP-UX ksh and POSIX shell print the target directory to stdout
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   354
# if CDPATH is set.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   355
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   356
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   357
if test -z "$ECHO"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   358
if test "X${echo_test_string+set}" != Xset; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   359
# find a string as large as possible, as long as the shell can cope with it
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   360
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   361
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   362
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   363
       echo_test_string=`eval $cmd` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   364
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   365
    then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   366
      break
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   367
    fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   368
  done
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   369
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   370
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   371
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   372
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   373
   test "X$echo_testing_string" = "X$echo_test_string"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   374
  :
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   375
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   376
  # The Solaris, AIX, and Digital Unix default echo programs unquote
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   377
  # backslashes.  This makes it impossible to quote backslashes using
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   378
  #   echo "$something" | sed 's/\\/\\\\/g'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   379
  #
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   380
  # So, first we look for a working echo in the user's PATH.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   381
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   382
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   383
  for dir in $PATH /usr/ucb; do
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   384
    IFS="$lt_save_ifs"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   385
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   386
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   387
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   388
       test "X$echo_testing_string" = "X$echo_test_string"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   389
      echo="$dir/echo"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   390
      break
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   391
    fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   392
  done
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   393
  IFS="$lt_save_ifs"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   394
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   395
  if test "X$echo" = Xecho; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   396
    # We didn't find a better echo, so look for alternatives.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   397
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   398
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   399
       test "X$echo_testing_string" = "X$echo_test_string"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   400
      # This shell has a builtin print -r that does the trick.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   401
      echo='print -r'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   402
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   403
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   404
      # If we have ksh, try running configure again with it.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   405
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   406
      export ORIGINAL_CONFIG_SHELL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   407
      CONFIG_SHELL=/bin/ksh
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   408
      export CONFIG_SHELL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   409
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   410
    else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   411
      # Try using printf.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   412
      echo='printf %s\n'
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   413
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   414
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   415
	 test "X$echo_testing_string" = "X$echo_test_string"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   416
	# Cool, printf works
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   417
	:
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   418
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   419
	   test "X$echo_testing_string" = 'X\t' &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   420
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   421
	   test "X$echo_testing_string" = "X$echo_test_string"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   422
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   423
	export CONFIG_SHELL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   424
	SHELL="$CONFIG_SHELL"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   425
	export SHELL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   426
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   427
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   428
	   test "X$echo_testing_string" = 'X\t' &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   429
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   430
	   test "X$echo_testing_string" = "X$echo_test_string"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   431
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   432
      else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   433
	# maybe with a smaller string...
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   434
	prev=:
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   435
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   436
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   437
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   438
	  then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   439
	    break
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   440
	  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   441
	  prev="$cmd"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   442
	done
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   443
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   444
	if test "$prev" != 'sed 50q "[$]0"'; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   445
	  echo_test_string=`eval $prev`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   446
	  export echo_test_string
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   447
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   448
	else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   449
	  # Oops.  We lost completely, so just stick with echo.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   450
	  echo=echo
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   451
	fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   452
      fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   453
    fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   454
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   455
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   456
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   457
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   458
# Copy echo and quote the copy suitably for passing to libtool from
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   459
# the Makefile, instead of quoting the original, which is used later.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   460
ECHO=$echo
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   461
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   462
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   463
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   464
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   465
AC_SUBST(ECHO)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   466
])])# _LT_AC_PROG_ECHO_BACKSLASH
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   467
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   468
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   469
# _LT_AC_LOCK
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   470
# -----------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   471
AC_DEFUN([_LT_AC_LOCK],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   472
[AC_ARG_ENABLE([libtool-lock],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   473
    [AC_HELP_STRING([--disable-libtool-lock],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   474
	[avoid locking (might break parallel builds)])])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   475
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   476
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   477
# Some flags need to be propagated to the compiler or linker for good
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   478
# libtool support.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   479
case $host in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   480
ia64-*-hpux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   481
  # Find out which ABI we are using.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   482
  echo 'int i;' > conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   483
  if AC_TRY_EVAL(ac_compile); then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   484
    case `/usr/bin/file conftest.$ac_objext` in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   485
    *ELF-32*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   486
      HPUX_IA64_MODE="32"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   487
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   488
    *ELF-64*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   489
      HPUX_IA64_MODE="64"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   490
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   491
    esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   492
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   493
  rm -rf conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   494
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   495
*-*-irix6*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   496
  # Find out which ABI we are using.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   497
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   498
  if AC_TRY_EVAL(ac_compile); then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   499
   if test "$lt_cv_prog_gnu_ld" = yes; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   500
    case `/usr/bin/file conftest.$ac_objext` in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   501
    *32-bit*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   502
      LD="${LD-ld} -melf32bsmip"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   503
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   504
    *N32*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   505
      LD="${LD-ld} -melf32bmipn32"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   506
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   507
    *64-bit*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   508
      LD="${LD-ld} -melf64bmip"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   509
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   510
    esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   511
   else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   512
    case `/usr/bin/file conftest.$ac_objext` in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   513
    *32-bit*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   514
      LD="${LD-ld} -32"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   515
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   516
    *N32*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   517
      LD="${LD-ld} -n32"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   518
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   519
    *64-bit*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   520
      LD="${LD-ld} -64"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   521
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   522
    esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   523
   fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   524
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   525
  rm -rf conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   526
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   527
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   528
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   529
  # Find out which ABI we are using.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   530
  echo 'int i;' > conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   531
  if AC_TRY_EVAL(ac_compile); then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   532
    case `/usr/bin/file conftest.o` in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   533
    *32-bit*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   534
      case $host in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   535
        x86_64-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   536
          LD="${LD-ld} -m elf_i386"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   537
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   538
        ppc64-*linux*|powerpc64-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   539
          LD="${LD-ld} -m elf32ppclinux"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   540
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   541
        s390x-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   542
          LD="${LD-ld} -m elf_s390"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   543
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   544
        sparc64-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   545
          LD="${LD-ld} -m elf32_sparc"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   546
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   547
      esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   548
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   549
    *64-bit*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   550
      case $host in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   551
        x86_64-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   552
          LD="${LD-ld} -m elf_x86_64"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   553
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   554
        ppc*-*linux*|powerpc*-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   555
          LD="${LD-ld} -m elf64ppc"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   556
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   557
        s390*-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   558
          LD="${LD-ld} -m elf64_s390"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   559
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   560
        sparc*-*linux*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   561
          LD="${LD-ld} -m elf64_sparc"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   562
          ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   563
      esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   564
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   565
    esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   566
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   567
  rm -rf conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   568
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   569
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   570
*-*-sco3.2v5*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   571
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   572
  SAVE_CFLAGS="$CFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   573
  CFLAGS="$CFLAGS -belf"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   574
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   575
    [AC_LANG_PUSH(C)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   576
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   577
     AC_LANG_POP])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   578
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   579
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   580
    CFLAGS="$SAVE_CFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   581
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   582
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   583
sparc*-*solaris*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   584
  # Find out which ABI we are using.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   585
  echo 'int i;' > conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   586
  if AC_TRY_EVAL(ac_compile); then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   587
    case `/usr/bin/file conftest.o` in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   588
    *64-bit*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   589
      case $lt_cv_prog_gnu_ld in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   590
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   591
      *)    LD="${LD-ld} -64" ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   592
      esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   593
      ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   594
    esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   595
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   596
  rm -rf conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   597
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   598
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   599
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   600
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   601
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   602
  AC_CHECK_TOOL(AS, as, false)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   603
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   604
  ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   605
  ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   606
esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   607
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   608
need_locks="$enable_libtool_lock"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   609
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   610
])# _LT_AC_LOCK
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   611
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   612
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   613
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   614
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   615
# ----------------------------------------------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   616
# Check whether the given compiler option works
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   617
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   618
[AC_REQUIRE([LT_AC_PROG_SED])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   619
AC_CACHE_CHECK([$1], [$2],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   620
  [$2=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   621
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   622
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   623
   lt_compiler_flag="$3"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   624
   # Insert the option either (1) after the last *FLAGS variable, or
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   625
   # (2) before a word containing "conftest.", or (3) at the end.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   626
   # Note that $ac_compile itself does not contain backslashes and begins
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   627
   # with a dollar sign (not a hyphen), so the echo should work correctly.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   628
   # The option is referenced via a variable to avoid confusing sed.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   629
   lt_compile=`echo "$ac_compile" | $SED \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   630
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   631
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   632
   -e 's:$: $lt_compiler_flag:'`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   633
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   634
   (eval "$lt_compile" 2>conftest.err)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   635
   ac_status=$?
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   636
   cat conftest.err >&AS_MESSAGE_LOG_FD
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   637
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   638
   if (exit $ac_status) && test -s "$ac_outfile"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   639
     # The compiler can only warn and ignore the option if not recognized
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   640
     # So say no if there are warnings other than the usual output.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   641
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   642
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   643
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   644
       $2=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   645
     fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   646
   fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   647
   $rm conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   648
])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   649
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   650
if test x"[$]$2" = xyes; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   651
    ifelse([$5], , :, [$5])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   652
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   653
    ifelse([$6], , :, [$6])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   654
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   655
])# AC_LIBTOOL_COMPILER_OPTION
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   656
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   657
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   658
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   659
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   660
# ------------------------------------------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   661
# Check whether the given compiler option works
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   662
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   663
[AC_CACHE_CHECK([$1], [$2],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   664
  [$2=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   665
   save_LDFLAGS="$LDFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   666
   LDFLAGS="$LDFLAGS $3"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   667
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   668
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   669
     # The linker can only warn and ignore the option if not recognized
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   670
     # So say no if there are warnings
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   671
     if test -s conftest.err; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   672
       # Append any errors to the config.log.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   673
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   674
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   675
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   676
       if diff conftest.exp conftest.er2 >/dev/null; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   677
         $2=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   678
       fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   679
     else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   680
       $2=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   681
     fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   682
   fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   683
   $rm conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   684
   LDFLAGS="$save_LDFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   685
])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   686
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   687
if test x"[$]$2" = xyes; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   688
    ifelse([$4], , :, [$4])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   689
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   690
    ifelse([$5], , :, [$5])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   691
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   692
])# AC_LIBTOOL_LINKER_OPTION
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   693
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   694
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   695
# AC_LIBTOOL_SYS_MAX_CMD_LEN
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   696
# --------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   697
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   698
[# find the maximum length of command line arguments
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   699
AC_MSG_CHECKING([the maximum length of command line arguments])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   700
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   701
  i=0
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   702
  teststring="ABCD"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   703
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   704
  case $build_os in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   705
  msdosdjgpp*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   706
    # On DJGPP, this test can blow up pretty badly due to problems in libc
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   707
    # (any single argument exceeding 2000 bytes causes a buffer overrun
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   708
    # during glob expansion).  Even if it were fixed, the result of this
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   709
    # check would be larger than it should be.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   710
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   711
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   712
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   713
  gnu*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   714
    # Under GNU Hurd, this test is not required because there is
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   715
    # no limit to the length of command line arguments.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   716
    # Libtool will interpret -1 as no limit whatsoever
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   717
    lt_cv_sys_max_cmd_len=-1;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   718
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   719
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   720
  cygwin* | mingw*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   721
    # On Win9x/ME, this test blows up -- it succeeds, but takes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   722
    # about 5 minutes as the teststring grows exponentially.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   723
    # Worse, since 9x/ME are not pre-emptively multitasking,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   724
    # you end up with a "frozen" computer, even though with patience
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   725
    # the test eventually succeeds (with a max line length of 256k).
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   726
    # Instead, let's just punt: use the minimum linelength reported by
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   727
    # all of the supported platforms: 8192 (on NT/2K/XP).
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   728
    lt_cv_sys_max_cmd_len=8192;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   729
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   730
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   731
  beos*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   732
    # On BeOS, this test takes a really really long time.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   733
    # So we just punt and use a minimum line length of 8192.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   734
    lt_cv_sys_max_cmd_len=8192;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   735
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   736
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   737
  amigaos*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   738
    # On AmigaOS with pdksh, this test takes hours, literally.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   739
    # So we just punt and use a minimum line length of 8192.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   740
    lt_cv_sys_max_cmd_len=8192;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   741
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   742
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   743
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   744
    # This has been around since 386BSD, at least.  Likely further.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   745
    if test -x /sbin/sysctl; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   746
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   747
    elif test -x /usr/sbin/sysctl; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   748
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   749
    else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   750
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   751
    fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   752
    # And add a safety zone
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   753
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   754
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   755
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   756
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   757
  interix*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   758
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   759
    lt_cv_sys_max_cmd_len=196608
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   760
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   761
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   762
  osf*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   763
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   764
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   765
    # nice to cause kernel panics so lets avoid the loop below.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   766
    # First set a reasonable default.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   767
    lt_cv_sys_max_cmd_len=16384
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   768
    #
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   769
    if test -x /sbin/sysconfig; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   770
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   771
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   772
      esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   773
    fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   774
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   775
  sco3.2v5*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   776
    lt_cv_sys_max_cmd_len=102400
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   777
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   778
  sysv5* | sco5v6* | sysv4.2uw2*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   779
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   780
    if test -n "$kargmax"; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   781
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   782
    else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   783
      lt_cv_sys_max_cmd_len=32768
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   784
    fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   785
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   786
  *)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   787
    # If test is not a shell built-in, we'll probably end up computing a
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   788
    # maximum length that is only half of the actual maximum length, but
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   789
    # we can't tell.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   790
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   791
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   792
	       = "XX$teststring") >/dev/null 2>&1 &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   793
	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   794
	    lt_cv_sys_max_cmd_len=$new_result &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   795
	    test $i != 17 # 1/2 MB should be enough
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   796
    do
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   797
      i=`expr $i + 1`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   798
      teststring=$teststring$teststring
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   799
    done
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   800
    teststring=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   801
    # Add a significant safety factor because C++ compilers can tack on massive
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   802
    # amounts of additional arguments before passing them to the linker.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   803
    # It appears as though 1/2 is a usable value.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   804
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   805
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   806
  esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   807
])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   808
if test -n $lt_cv_sys_max_cmd_len ; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   809
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   810
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   811
  AC_MSG_RESULT(none)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   812
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   813
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   814
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   815
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   816
# _LT_AC_CHECK_DLFCN
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   817
# ------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   818
AC_DEFUN([_LT_AC_CHECK_DLFCN],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   819
[AC_CHECK_HEADERS(dlfcn.h)dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   820
])# _LT_AC_CHECK_DLFCN
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   821
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   822
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   823
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   824
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   825
# ---------------------------------------------------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   826
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   827
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   828
if test "$cross_compiling" = yes; then :
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   829
  [$4]
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   830
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   831
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   832
  lt_status=$lt_dlunknown
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   833
  cat > conftest.$ac_ext <<EOF
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   834
[#line __oline__ "configure"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   835
#include "confdefs.h"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   836
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   837
#if HAVE_DLFCN_H
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   838
#include <dlfcn.h>
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   839
#endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   840
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   841
#include <stdio.h>
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   842
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   843
#ifdef RTLD_GLOBAL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   844
#  define LT_DLGLOBAL		RTLD_GLOBAL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   845
#else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   846
#  ifdef DL_GLOBAL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   847
#    define LT_DLGLOBAL		DL_GLOBAL
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   848
#  else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   849
#    define LT_DLGLOBAL		0
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   850
#  endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   851
#endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   852
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   853
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   854
   find out it does not work in some platform. */
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   855
#ifndef LT_DLLAZY_OR_NOW
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   856
#  ifdef RTLD_LAZY
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   857
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   858
#  else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   859
#    ifdef DL_LAZY
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   860
#      define LT_DLLAZY_OR_NOW		DL_LAZY
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   861
#    else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   862
#      ifdef RTLD_NOW
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   863
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   864
#      else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   865
#        ifdef DL_NOW
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   866
#          define LT_DLLAZY_OR_NOW	DL_NOW
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   867
#        else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   868
#          define LT_DLLAZY_OR_NOW	0
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   869
#        endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   870
#      endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   871
#    endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   872
#  endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   873
#endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   874
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   875
#ifdef __cplusplus
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   876
extern "C" void exit (int);
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   877
#endif
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   878
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   879
void fnord() { int i=42;}
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   880
int main ()
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   881
{
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   882
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   883
  int status = $lt_dlunknown;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   884
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   885
  if (self)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   886
    {
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   887
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   888
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   889
      /* dlclose (self); */
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   890
    }
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   891
  else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   892
    puts (dlerror ());
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   893
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   894
    exit (status);
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   895
}]
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   896
EOF
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   897
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   898
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   899
    lt_status=$?
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   900
    case x$lt_status in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   901
      x$lt_dlno_uscore) $1 ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   902
      x$lt_dlneed_uscore) $2 ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   903
      x$lt_dlunknown|x*) $3 ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   904
    esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   905
  else :
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   906
    # compilation failed
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   907
    $3
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   908
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   909
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   910
rm -fr conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   911
])# _LT_AC_TRY_DLOPEN_SELF
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   912
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   913
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   914
# AC_LIBTOOL_DLOPEN_SELF
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   915
# ----------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   916
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   917
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   918
if test "x$enable_dlopen" != xyes; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   919
  enable_dlopen=unknown
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   920
  enable_dlopen_self=unknown
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   921
  enable_dlopen_self_static=unknown
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   922
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   923
  lt_cv_dlopen=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   924
  lt_cv_dlopen_libs=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   925
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   926
  case $host_os in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   927
  beos*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   928
    lt_cv_dlopen="load_add_on"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   929
    lt_cv_dlopen_libs=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   930
    lt_cv_dlopen_self=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   931
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   932
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   933
  mingw* | pw32*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   934
    lt_cv_dlopen="LoadLibrary"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   935
    lt_cv_dlopen_libs=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   936
   ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   937
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   938
  cygwin*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   939
    lt_cv_dlopen="dlopen"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   940
    lt_cv_dlopen_libs=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   941
   ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   942
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   943
  darwin*)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   944
  # if libdl is installed we need to link against it
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   945
    AC_CHECK_LIB([dl], [dlopen],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   946
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   947
    lt_cv_dlopen="dyld"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   948
    lt_cv_dlopen_libs=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   949
    lt_cv_dlopen_self=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   950
    ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   951
   ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   952
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   953
  *)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   954
    AC_CHECK_FUNC([shl_load],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   955
	  [lt_cv_dlopen="shl_load"],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   956
      [AC_CHECK_LIB([dld], [shl_load],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   957
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   958
	[AC_CHECK_FUNC([dlopen],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   959
	      [lt_cv_dlopen="dlopen"],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   960
	  [AC_CHECK_LIB([dl], [dlopen],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   961
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   962
	    [AC_CHECK_LIB([svld], [dlopen],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   963
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   964
	      [AC_CHECK_LIB([dld], [dld_link],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   965
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   966
	      ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   967
	    ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   968
	  ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   969
	])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   970
      ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   971
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   972
  esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   973
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   974
  if test "x$lt_cv_dlopen" != xno; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   975
    enable_dlopen=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   976
  else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   977
    enable_dlopen=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   978
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   979
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   980
  case $lt_cv_dlopen in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   981
  dlopen)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   982
    save_CPPFLAGS="$CPPFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   983
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   984
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   985
    save_LDFLAGS="$LDFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   986
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   987
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   988
    save_LIBS="$LIBS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   989
    LIBS="$lt_cv_dlopen_libs $LIBS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   990
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   991
    AC_CACHE_CHECK([whether a program can dlopen itself],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   992
	  lt_cv_dlopen_self, [dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   993
	  _LT_AC_TRY_DLOPEN_SELF(
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   994
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   995
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   996
    ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   997
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   998
    if test "x$lt_cv_dlopen_self" = xyes; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
   999
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1000
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1001
    	  lt_cv_dlopen_self_static, [dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1002
	  _LT_AC_TRY_DLOPEN_SELF(
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1003
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1004
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1005
      ])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1006
    fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1007
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1008
    CPPFLAGS="$save_CPPFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1009
    LDFLAGS="$save_LDFLAGS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1010
    LIBS="$save_LIBS"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1011
    ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1012
  esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1013
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1014
  case $lt_cv_dlopen_self in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1015
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1016
  *) enable_dlopen_self=unknown ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1017
  esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1018
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1019
  case $lt_cv_dlopen_self_static in
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1020
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1021
  *) enable_dlopen_self_static=unknown ;;
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1022
  esac
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1023
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1024
])# AC_LIBTOOL_DLOPEN_SELF
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1025
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1026
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1027
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1028
# ---------------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1029
# Check to see if options -c and -o are simultaneously supported by compiler
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1030
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1031
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1032
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1033
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1034
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1035
   $rm -r conftest 2>/dev/null
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1036
   mkdir conftest
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1037
   cd conftest
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1038
   mkdir out
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1039
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1040
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1041
   lt_compiler_flag="-o out/conftest2.$ac_objext"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1042
   # Insert the option either (1) after the last *FLAGS variable, or
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1043
   # (2) before a word containing "conftest.", or (3) at the end.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1044
   # Note that $ac_compile itself does not contain backslashes and begins
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1045
   # with a dollar sign (not a hyphen), so the echo should work correctly.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1046
   lt_compile=`echo "$ac_compile" | $SED \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1047
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1048
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1049
   -e 's:$: $lt_compiler_flag:'`
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1050
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1051
   (eval "$lt_compile" 2>out/conftest.err)
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1052
   ac_status=$?
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1053
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1054
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1055
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1056
   then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1057
     # The compiler can only warn and ignore the option if not recognized
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1058
     # So say no if there are warnings
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1059
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1060
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1061
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1062
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1063
     fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1064
   fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1065
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1066
   $rm conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1067
   # SGI C++ compiler will create directory out/ii_files/ for
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1068
   # template instantiation
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1069
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1070
   $rm out/* && rmdir out
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1071
   cd ..
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1072
   rmdir conftest
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1073
   $rm conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1074
])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1075
])# AC_LIBTOOL_PROG_CC_C_O
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1076
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1077
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1078
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1079
# -----------------------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1080
# Check to see if we can do hard links to lock some files if needed
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1081
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1082
[AC_REQUIRE([_LT_AC_LOCK])dnl
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1083
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1084
hard_links="nottested"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1085
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1086
  # do not overwrite the value of need_locks provided by the user
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1087
  AC_MSG_CHECKING([if we can lock with hard links])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1088
  hard_links=yes
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1089
  $rm conftest*
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1090
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1091
  touch conftest.a
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1092
  ln conftest.a conftest.b 2>&5 || hard_links=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1093
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1094
  AC_MSG_RESULT([$hard_links])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1095
  if test "$hard_links" = no; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1096
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1097
    need_locks=warn
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1098
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1099
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1100
  need_locks=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1101
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1102
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1103
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1104
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1105
# AC_LIBTOOL_OBJDIR
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1106
# -----------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1107
AC_DEFUN([AC_LIBTOOL_OBJDIR],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1108
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1109
[rm -f .libs 2>/dev/null
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1110
mkdir .libs 2>/dev/null
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1111
if test -d .libs; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1112
  lt_cv_objdir=.libs
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1113
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1114
  # MS-DOS does not allow filenames that begin with a dot.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1115
  lt_cv_objdir=_libs
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1116
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1117
rmdir .libs 2>/dev/null])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1118
objdir=$lt_cv_objdir
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1119
])# AC_LIBTOOL_OBJDIR
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1120
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1121
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1122
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1123
# ----------------------------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1124
# Check hardcoding attributes.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1125
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1126
[AC_MSG_CHECKING([how to hardcode library paths into programs])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1127
_LT_AC_TAGVAR(hardcode_action, $1)=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1128
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1129
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1130
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1131
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1132
  # We can hardcode non-existant directories.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1133
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1134
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1135
     # have to relink, otherwise we might link with an installed library
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1136
     # when we should be linking with a yet-to-be-installed one
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1137
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1138
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1139
    # Linking always hardcodes the temporary library directory.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1140
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1141
  else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1142
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1143
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1144
  fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1145
else
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1146
  # We cannot hardcode anything, or else we can only hardcode existing
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1147
  # directories.
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1148
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1149
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1150
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1151
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1152
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1153
  # Fast installation is not supported
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1154
  enable_fast_install=no
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1155
elif test "$shlibpath_overrides_runpath" = yes ||
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1156
     test "$enable_shared" = no; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1157
  # Fast installation is not necessary
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1158
  enable_fast_install=needless
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1159
fi
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1160
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1161
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1162
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1163
# AC_LIBTOOL_SYS_LIB_STRIP
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1164
# ------------------------
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1165
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1166
[striplib=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1167
old_striplib=
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1168
AC_MSG_CHECKING([whether stripping libraries is possible])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1169
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1170
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1171
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1172
  AC_MSG_RESULT([yes])
b73b5af69f48 Split acinclude.m4 into its constituent parts for easy upgrading
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
  1173
else