annotate acinclude.m4 @ 481:3f03af31e246 stable-1.0

Backported .voc fix.
author Ryan C. Gordon <icculus@icculus.org>
date Fri, 12 Nov 2004 08:26:11 +0000
parents 75819e5c59d4
children 0b244f36049e
rev   line source
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
1 # Configure paths for SDL
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
2 # Sam Lantinga 9/21/99
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
3 # stolen from Manish Singh
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
4 # stolen back from Frank Belew
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
5 # stolen from Manish Singh
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
6 # Shamelessly stolen from Owen Taylor
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
7
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
8 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
9 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
10 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
11 AC_DEFUN(AM_PATH_SDL,
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
12 [dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
13 dnl Get the cflags and libraries from the sdl-config script
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
14 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
15 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
16 sdl_prefix="$withval", sdl_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
17 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
18 sdl_exec_prefix="$withval", sdl_exec_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
19 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
20 , enable_sdltest=yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
21
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
22 if test x$sdl_exec_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
23 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
24 if test x${SDL_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
25 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
26 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
27 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
28 if test x$sdl_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
29 sdl_args="$sdl_args --prefix=$sdl_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
30 if test x${SDL_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
31 SDL_CONFIG=$sdl_prefix/bin/sdl-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
32 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
33 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
34
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
35 AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
36 min_sdl_version=ifelse([$1], ,0.11.0,$1)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
37 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
38 no_sdl=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
39 if test "$SDL_CONFIG" = "no" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
40 no_sdl=yes
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
41 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
42 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
43 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
44
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
45 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
46 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
47 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
48 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
49 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
50 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
51 if test "x$enable_sdltest" = "xyes" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
52 ac_save_CFLAGS="$CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
53 ac_save_LIBS="$LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
54 CFLAGS="$CFLAGS $SDL_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
55 LIBS="$LIBS $SDL_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
56 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
57 dnl Now check if the installed SDL is sufficiently new. (Also sanity
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
58 dnl checks the results of sdl-config to some extent
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
59 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
60 rm -f conf.sdltest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
61 AC_TRY_RUN([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
62 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
63 #include <stdlib.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
64 #include <string.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
65 #include "SDL.h"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
66
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
67 char*
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
68 my_strdup (char *str)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
69 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
70 char *new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
71
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
72 if (str)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
73 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
74 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
75 strcpy (new_str, str);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
76 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
77 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
78 new_str = NULL;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
79
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
80 return new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
81 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
82
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
83 int main (int argc, char *argv[])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
84 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
85 int major, minor, micro;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
86 char *tmp_version;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
87
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
88 /* This hangs on some systems (?)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
89 system ("touch conf.sdltest");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
90 */
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
91 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
92
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
93 /* HP/UX 9 (%@#!) writes to sscanf strings */
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
94 tmp_version = my_strdup("$min_sdl_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
95 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
96 printf("%s, bad version string\n", "$min_sdl_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
97 exit(1);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
98 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
99
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
100 if (($sdl_major_version > major) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
101 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
102 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
103 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
104 return 0;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
105 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
106 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
107 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
108 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
109 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
110 printf("*** best to upgrade to the required version.\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
111 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
112 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
113 printf("*** config.cache before re-running configure\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
114 return 1;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
115 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
116 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
117
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
118 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
119 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
120 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
121 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
122 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
123 if test "x$no_sdl" = x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
124 AC_MSG_RESULT(yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
125 ifelse([$2], , :, [$2])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
126 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
127 AC_MSG_RESULT(no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
128 if test "$SDL_CONFIG" = "no" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
129 echo "*** The sdl-config script installed by SDL could not be found"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
130 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
131 echo "*** your path, or set the SDL_CONFIG environment variable to the"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
132 echo "*** full path to sdl-config."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
133 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
134 if test -f conf.sdltest ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
135 :
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
136 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
137 echo "*** Could not run SDL test program, checking why..."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
138 CFLAGS="$CFLAGS $SDL_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
139 LIBS="$LIBS $SDL_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
140 AC_TRY_LINK([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
141 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
142 #include "SDL.h"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
143
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
144 int main(int argc, char *argv[])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
145 { return 0; }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
146 #undef main
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
147 #define main K_and_R_C_main
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
148 ], [ return 0; ],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
149 [ echo "*** The test program compiled, but did not run. This usually means"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
150 echo "*** that the run-time linker is not finding SDL or finding the wrong"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
151 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
152 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
153 echo "*** to the installed location Also, make sure you have run ldconfig if that"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
154 echo "*** is required on your system"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
155 echo "***"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
156 echo "*** If you have an old version installed, it is best to remove it, although"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
157 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
158 [ echo "*** The test program failed to compile or link. See the file config.log for the"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
159 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
160 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
161 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
162 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
163 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
164 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
165 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
166 SDL_CFLAGS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
167 SDL_LIBS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
168 ifelse([$3], , :, [$3])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
169 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
170 AC_SUBST(SDL_CFLAGS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
171 AC_SUBST(SDL_LIBS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
172 rm -f conf.sdltest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
173 ])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
174 # Configure paths for libmikmod
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
175 #
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
176 # Derived from glib.m4 (Owen Taylor 97-11-3)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
177 # Improved by Chris Butler
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
178 #
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
179
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
180 dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
181 dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
182 dnl LIBMIKMOD_LDADD
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
183 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
184 AC_DEFUN(AM_PATH_LIBMIKMOD,
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
185 [dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
186 dnl Get the cflags and libraries from the libmikmod-config script
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
187 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
188 AC_ARG_WITH(libmikmod-prefix,[ --with-libmikmod-prefix=PFX Prefix where libmikmod is installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
189 libmikmod_config_prefix="$withval", libmikmod_config_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
190 AC_ARG_WITH(libmikmod-exec-prefix,[ --with-libmikmod-exec-prefix=PFX Exec prefix where libmikmod is installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
191 libmikmod_config_exec_prefix="$withval", libmikmod_config_exec_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
192 AC_ARG_ENABLE(libmikmodtest, [ --disable-libmikmodtest Do not try to compile and run a test libmikmod program],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
193 , enable_libmikmodtest=yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
194
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
195 if test x$libmikmod_config_exec_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
196 libmikmod_config_args="$libmikmod_config_args --exec-prefix=$libmikmod_config_exec_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
197 if test x${LIBMIKMOD_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
198 LIBMIKMOD_CONFIG=$libmikmod_config_exec_prefix/bin/libmikmod-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
199 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
200 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
201 if test x$libmikmod_config_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
202 libmikmod_config_args="$libmikmod_config_args --prefix=$libmikmod_config_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
203 if test x${LIBMIKMOD_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
204 LIBMIKMOD_CONFIG=$libmikmod_config_prefix/bin/libmikmod-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
205 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
206 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
207
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
208 AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
209 min_libmikmod_version=ifelse([$1], ,3.1.5,$1)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
210 AC_MSG_CHECKING(for libmikmod - version >= $min_libmikmod_version)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
211 no_libmikmod=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
212 if test "$LIBMIKMOD_CONFIG" = "no" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
213 no_libmikmod=yes
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
214 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
215 LIBMIKMOD_CFLAGS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --cflags`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
216 LIBMIKMOD_LIBS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --libs`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
217 LIBMIKMOD_LDADD=`$LIBMIKMOD_CONFIG $libmikmod_config_args --ldadd`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
218 libmikmod_config_major_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
219 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
220 libmikmod_config_minor_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
221 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
222 libmikmod_config_micro_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
223 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
224 if test "x$enable_libmikmodtest" = "xyes" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
225 ac_save_CFLAGS="$CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
226 ac_save_LIBS="$LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
227 AC_LANG_SAVE
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
228 AC_LANG_C
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
229 CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS $LIBMIKMOD_LDADD"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
230 LIBS="$LIBMIKMOD_LIBS $LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
231 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
232 dnl Now check if the installed libmikmod is sufficiently new. (Also sanity
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
233 dnl checks the results of libmikmod-config to some extent
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
234 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
235 rm -f conf.mikmodtest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
236 AC_TRY_RUN([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
237 #include <mikmod.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
238 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
239 #include <stdlib.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
240
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
241 char* my_strdup (char *str)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
242 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
243 char *new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
244
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
245 if (str) {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
246 new_str = malloc ((strlen (str) + 1) * sizeof(char));
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
247 strcpy (new_str, str);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
248 } else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
249 new_str = NULL;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
250
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
251 return new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
252 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
253
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
254 int main()
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
255 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
256 int major,minor,micro;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
257 int libmikmod_major_version,libmikmod_minor_version,libmikmod_micro_version;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
258 char *tmp_version;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
259
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
260 system("touch conf.mikmodtest");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
261
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
262 /* HP/UX 9 (%@#!) writes to sscanf strings */
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
263 tmp_version = my_strdup("$min_libmikmod_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
264 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
265 printf("%s, bad version string\n", "$min_libmikmod_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
266 exit(1);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
267 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
268
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
269 libmikmod_major_version=(MikMod_GetVersion() >> 16) & 255;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
270 libmikmod_minor_version=(MikMod_GetVersion() >> 8) & 255;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
271 libmikmod_micro_version=(MikMod_GetVersion() ) & 255;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
272
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
273 if ((libmikmod_major_version != $libmikmod_config_major_version) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
274 (libmikmod_minor_version != $libmikmod_config_minor_version) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
275 (libmikmod_micro_version != $libmikmod_config_micro_version))
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
276 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
277 printf("\n*** 'libmikmod-config --version' returned %d.%d.%d, but libmikmod (%d.%d.%d)\n",
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
278 $libmikmod_config_major_version, $libmikmod_config_minor_version, $libmikmod_config_micro_version,
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
279 libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
280 printf ("*** was found! If libmikmod-config was correct, then it is best\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
281 printf ("*** to remove the old version of libmikmod. You may also be able to fix the error\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
282 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
283 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
284 printf("*** required on your system.\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
285 printf("*** If libmikmod-config was wrong, set the environment variable LIBMIKMOD_CONFIG\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
286 printf("*** to point to the correct copy of libmikmod-config, and remove the file config.cache\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
287 printf("*** before re-running configure\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
288 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
289 else if ((libmikmod_major_version != LIBMIKMOD_VERSION_MAJOR) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
290 (libmikmod_minor_version != LIBMIKMOD_VERSION_MINOR) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
291 (libmikmod_micro_version != LIBMIKMOD_REVISION))
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
292 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
293 printf("*** libmikmod header files (version %d.%d.%d) do not match\n",
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
294 LIBMIKMOD_VERSION_MAJOR, LIBMIKMOD_VERSION_MINOR, LIBMIKMOD_REVISION);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
295 printf("*** library (version %d.%d.%d)\n",
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
296 libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
297 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
298 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
299 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
300 if ((libmikmod_major_version > major) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
301 ((libmikmod_major_version == major) && (libmikmod_minor_version > minor)) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
302 ((libmikmod_major_version == major) && (libmikmod_minor_version == minor) && (libmikmod_micro_version >= micro)))
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
303 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
304 return 0;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
305 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
306 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
307 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
308 printf("\n*** An old version of libmikmod (%d.%d.%d) was found.\n",
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
309 libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
310 printf("*** You need a version of libmikmod newer than %d.%d.%d.\n",
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
311 major, minor, micro);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
312 printf("***\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
313 printf("*** If you have already installed a sufficiently new version, this error\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
314 printf("*** probably means that the wrong copy of the libmikmod-config shell script is\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
315 printf("*** being found. The easiest way to fix this is to remove the old version\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
316 printf("*** of libmikmod, but you can also set the LIBMIKMOD_CONFIG environment to point to the\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
317 printf("*** correct copy of libmikmod-config. (In this case, you will have to\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
318 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
319 printf("*** so that the correct libraries are found at run-time))\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
320 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
321 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
322 return 1;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
323 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
324 ],, no_libmikmod=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
325 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
326 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
327 AC_LANG_RESTORE
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
328 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
329 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
330 if test "x$no_libmikmod" = x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
331 AC_MSG_RESULT([yes, `$LIBMIKMOD_CONFIG --version`])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
332 ifelse([$2], , :, [$2])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
333 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
334 AC_MSG_RESULT(no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
335 if test "$LIBMIKMOD_CONFIG" = "no" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
336 echo "*** The libmikmod-config script installed by libmikmod could not be found"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
337 echo "*** If libmikmod was installed in PREFIX, make sure PREFIX/bin is in"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
338 echo "*** your path, or set the LIBMIKMOD_CONFIG environment variable to the"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
339 echo "*** full path to libmikmod-config."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
340 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
341 if test -f conf.mikmodtest ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
342 :
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
343 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
344 echo "*** Could not run libmikmod test program, checking why..."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
345 CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
346 LIBS="$LIBS $LIBMIKMOD_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
347 AC_LANG_SAVE
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
348 AC_LANG_C
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
349 AC_TRY_LINK([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
350 #include <mikmod.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
351 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
352 ], [ return (MikMod_GetVersion()!=0); ],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
353 [ echo "*** The test program compiled, but did not run. This usually means"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
354 echo "*** that the run-time linker is not finding libmikmod or finding the wrong"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
355 echo "*** version of libmikmod. If it is not finding libmikmod, you'll need to set your"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
356 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
357 echo "*** to the installed location. Also, make sure you have run ldconfig if that"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
358 echo "*** is required on your system."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
359 echo "***"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
360 echo "*** If you have an old version installed, it is best to remove it, although"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
361 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
362 [ echo "*** The test program failed to compile or link. See the file config.log for the"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
363 echo "*** exact error that occured. This usually means libmikmod was incorrectly installed"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
364 echo "*** or that you have moved libmikmod since it was installed. In the latter case, you"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
365 echo "*** may want to edit the libmikmod-config script: $LIBMIKMOD_CONFIG" ])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
366 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
367 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
368 AC_LANG_RESTORE
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
369 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
370 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
371 LIBMIKMOD_CFLAGS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
372 LIBMIKMOD_LIBS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
373 LIBMIKMOD_LDADD=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
374 ifelse([$3], , :, [$3])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
375 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
376 AC_SUBST(LIBMIKMOD_CFLAGS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
377 AC_SUBST(LIBMIKMOD_LIBS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
378 AC_SUBST(LIBMIKMOD_LDADD)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
379 rm -f conf.mikmodtest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
380 ])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
381 # Configure paths for libvorbis
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
382 # Jack Moffitt <jack@icecast.org> 10-21-2000
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
383 # Shamelessly stolen from Owen Taylor and Manish Singh
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
384
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
385 dnl AM_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
386 dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
387 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
388 AC_DEFUN(AM_PATH_VORBIS,
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
389 [dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
390 dnl Get the cflags and libraries
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
391 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
392 AC_ARG_WITH(vorbis-prefix,[ --with-vorbis-prefix=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
393 AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
394
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
395 if test x$vorbis_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
396 vorbis_args="$vorbis_args --prefix=$vorbis_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
397 VORBIS_CFLAGS="-I$vorbis_prefix/include"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
398 VORBIS_LIBDIR="-L$vorbis_prefix/lib"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
399 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
400
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
401 VORBIS_LIBS="$VORBIS_LIBDIR -lvorbis -lm"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
402 VORBISFILE_LIBS="-lvorbisfile"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
403 VORBISENC_LIBS="-lvorbisenc"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
404
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
405 AC_MSG_CHECKING(for Vorbis)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
406 no_vorbis=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
407
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
408
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
409 if test "x$enable_vorbistest" = "xyes" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
410 ac_save_CFLAGS="$CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
411 ac_save_LIBS="$LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
412 CFLAGS="$CFLAGS $VORBIS_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
413 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
414 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
415 dnl Now check if the installed Vorbis is sufficiently new.
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
416 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
417 rm -f conf.vorbistest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
418 AC_TRY_RUN([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
419 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
420 #include <stdlib.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
421 #include <string.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
422 #include <vorbis/codec.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
423
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
424 int main ()
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
425 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
426 system("touch conf.vorbistest");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
427 return 0;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
428 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
429
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
430 ],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
431 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
432 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
433 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
434
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
435 if test "x$no_vorbis" = x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
436 AC_MSG_RESULT(yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
437 ifelse([$1], , :, [$1])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
438 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
439 AC_MSG_RESULT(no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
440 if test -f conf.vorbistest ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
441 :
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
442 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
443 echo "*** Could not run Vorbis test program, checking why..."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
444 CFLAGS="$CFLAGS $VORBIS_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
445 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
446 AC_TRY_LINK([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
447 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
448 #include <vorbis/codec.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
449 ], [ return 0; ],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
450 [ echo "*** The test program compiled, but did not run. This usually means"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
451 echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
452 echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
453 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
454 echo "*** to the installed location Also, make sure you have run ldconfig if that"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
455 echo "*** is required on your system"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
456 echo "***"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
457 echo "*** If you have an old version installed, it is best to remove it, although"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
458 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
459 [ echo "*** The test program failed to compile or link. See the file config.log for the"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
460 echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
461 echo "*** or that you have moved Vorbis since it was installed." ])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
462 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
463 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
464 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
465 VORBIS_CFLAGS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
466 VORBIS_LIBS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
467 VORBISFILE_LIBS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
468 VORBISENC_LIBS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
469 ifelse([$2], , :, [$2])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
470 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
471 AC_SUBST(VORBIS_CFLAGS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
472 AC_SUBST(VORBIS_LIBS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
473 AC_SUBST(VORBISFILE_LIBS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
474 AC_SUBST(VORBISENC_LIBS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
475 rm -f conf.vorbistest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
476 ])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
477 # Configure paths for SMPEG
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
478 # Nicolas Vignal 11/19/2000
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
479 # stolen from Sam Lantinga
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
480 # stolen from Manish Singh
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
481 # stolen back from Frank Belew
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
482 # stolen from Manish Singh
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
483 # Shamelessly stolen from Owen Taylor
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
484
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
485 dnl AM_PATH_SMPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [,
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
486 ACTION-IF-NOT-FOUND]]])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
487 dnl Test for SMPEG, and define SMPEG_CFLAGS and SMPEG_LIBS
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
488 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
489 AC_DEFUN(AM_PATH_SMPEG,
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
490 [dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
491 dnl Get the cflags and libraries from the smpeg-config script
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
492 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
493 AC_ARG_WITH(smpeg-prefix,[ --with-smpeg-prefix=PFX Prefix where SMPEG is
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
494 installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
495 smpeg_prefix="$withval", smpeg_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
496 AC_ARG_WITH(smpeg-exec-prefix,[ --with-smpeg-exec-prefix=PFX Exec prefix
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
497 where SMPEG is installed (optional)],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
498 smpeg_exec_prefix="$withval", smpeg_exec_prefix="")
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
499 AC_ARG_ENABLE(smpegtest, [ --disable-smpegtest Do not try to compile
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
500 and run a test SMPEG program],
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
501 , enable_smpegtest=yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
502
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
503 if test x$smpeg_exec_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
504 smpeg_args="$smpeg_args --exec-prefix=$smpeg_exec_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
505 if test x${SMPEG_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
506 SMPEG_CONFIG=$smpeg_exec_prefix/bin/smpeg-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
507 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
508 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
509 if test x$smpeg_prefix != x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
510 smpeg_args="$smpeg_args --prefix=$smpeg_prefix"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
511 if test x${SMPEG_CONFIG+set} != xset ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
512 SMPEG_CONFIG=$smpeg_prefix/bin/smpeg-config
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
513 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
514 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
515
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
516 AC_PATH_PROG(SMPEG_CONFIG, smpeg-config, no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
517 min_smpeg_version=ifelse([$1], ,0.2.7,$1)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
518 AC_MSG_CHECKING(for SMPEG - version >= $min_smpeg_version)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
519 no_smpeg=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
520 if test "$SMPEG_CONFIG" = "no" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
521 no_smpeg=yes
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
522 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
523 SMPEG_CFLAGS=`$SMPEG_CONFIG $smpegconf_args --cflags`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
524 SMPEG_LIBS=`$SMPEG_CONFIG $smpegconf_args --libs`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
525
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
526 smpeg_major_version=`$SMPEG_CONFIG $smpeg_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
527 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
528 smpeg_minor_version=`$SMPEG_CONFIG $smpeg_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
529 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
530 smpeg_micro_version=`$SMPEG_CONFIG $smpeg_config_args --version | \
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
531 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
532 if test "x$enable_smpegtest" = "xyes" ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
533 ac_save_CFLAGS="$CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
534 ac_save_LIBS="$LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
535 CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
536 LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
537 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
538 dnl Now check if the installed SMPEG is sufficiently new. (Also sanity
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
539 dnl checks the results of smpeg-config to some extent
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
540 dnl
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
541 rm -f conf.smpegtest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
542 AC_TRY_RUN([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
543 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
544 #include <stdlib.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
545 #include <string.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
546 #include "smpeg.h"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
547
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
548 char*
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
549 my_strdup (char *str)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
550 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
551 char *new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
552
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
553 if (str)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
554 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
555 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
556 strcpy (new_str, str);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
557 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
558 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
559 new_str = NULL;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
560
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
561 return new_str;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
562 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
563
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
564 int main (int argc, char *argv[])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
565 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
566 int major, minor, micro;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
567 char *tmp_version;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
568
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
569 /* This hangs on some systems (?)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
570 system ("touch conf.smpegtest");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
571 */
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
572 { FILE *fp = fopen("conf.smpegtest", "a"); if ( fp ) fclose(fp); }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
573
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
574 /* HP/UX 9 (%@#!) writes to sscanf strings */
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
575 tmp_version = my_strdup("$min_smpeg_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
576 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
577 printf("%s, bad version string\n", "$min_smpeg_version");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
578 exit(1);
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
579 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
580
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
581 if (($smpeg_major_version > major) ||
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
582 (($smpeg_major_version == major) && ($smpeg_minor_version > minor)) ||
466
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
583 (($smpeg_major_version == major) && ($smpeg_minor_version == minor) &&
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
584 ($smpeg_micro_version >= micro)))
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
585 {
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
586 return 0;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
587 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
588 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
589 {
466
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
590 printf("\n*** 'smpeg-config --version' returned %d.%d.%d, but the minimum version\n", $smpeg_major_version, $smpeg_minor_version, $smpeg_micro_version);
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
591 printf("*** of SMPEG required is %d.%d.%d. If smpeg-config is correct, then it is\n", major, minor, micro);
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
592 printf("*** best to upgrade to the required version.\n");
466
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
593 printf("*** If smpeg-config was wrong, set the environment variable SMPEG_CONFIG\n");
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
594 printf("*** to point to the correct copy of smpeg-config, and remove the file\n");
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
595 printf("*** config.cache before re-running configure\n");
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
596 return 1;
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
597 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
598 }
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
599
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
600 ],, no_smpeg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
601 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
602 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
603 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
604 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
605 if test "x$no_smpeg" = x ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
606 AC_MSG_RESULT(yes)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
607 ifelse([$2], , :, [$2])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
608 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
609 AC_MSG_RESULT(no)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
610 if test "$SMPEG_CONFIG" = "no" ; then
466
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
611 echo "*** The smpeg-config script installed by SMPEG could not be found"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
612 echo "*** If SMPEG was installed in PREFIX, make sure PREFIX/bin is in"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
613 echo "*** your path, or set the SMPEG_CONFIG environment variable to the"
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
614 echo "*** full path to smpeg-config."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
615 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
616 if test -f conf.smpegtest ; then
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
617 :
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
618 else
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
619 echo "*** Could not run SMPEG test program, checking why..."
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
620 CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
621 LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
622 AC_TRY_LINK([
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
623 #include <stdio.h>
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
624 #include "smpeg.h"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
625 ], [ return 0; ],
466
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
626 [ echo "*** The test program compiled, but did not run. This usually means"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
627 echo "*** that the run-time linker is not finding SMPEG or finding the wrong"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
628 echo "*** version of SMPEG. If it is not finding SMPEG, you'll need to set your"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
629 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
630 echo "*** to the installed location Also, make sure you have run ldconfig if that"
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
631 echo "*** is required on your system"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
632 echo "***"
466
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
633 echo "*** If you have an old version installed, it is best to remove it, although"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
634 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
635 [ echo "*** The test program failed to compile or link. See the file config.log for the"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
636 echo "*** exact error that occured. This usually means SMPEG was incorrectly installed"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
637 echo "*** or that you have moved SMPEG since it was installed. In the latter case, you"
75819e5c59d4 Build system fixes.
Ryan C. Gordon <icculus@icculus.org>
parents: 440
diff changeset
638 echo "*** may want to edit the smpeg-config script: $SMPEG_CONFIG" ])
68
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
639 CFLAGS="$ac_save_CFLAGS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
640 LIBS="$ac_save_LIBS"
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
641 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
642 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
643 SMPEG_CFLAGS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
644 SMPEG_LIBS=""
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
645 ifelse([$3], , :, [$3])
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
646 fi
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
647 AC_SUBST(SMPEG_CFLAGS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
648 AC_SUBST(SMPEG_LIBS)
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
649 rm -f conf.smpegtest
0b53ace8b875 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
650 ])
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
651 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
652 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
653 ## Free Software Foundation, Inc.
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
654 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
655 ##
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
656 ## This program is free software; you can redistribute it and/or modify
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
657 ## it under the terms of the GNU General Public License as published by
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
658 ## the Free Software Foundation; either version 2 of the License, or
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
659 ## (at your option) any later version.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
660 ##
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
661 ## This program is distributed in the hope that it will be useful, but
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
662 ## WITHOUT ANY WARRANTY; without even the implied warranty of
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
663 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
664 ## General Public License for more details.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
665 ##
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
666 ## You should have received a copy of the GNU General Public License
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
667 ## along with this program; if not, write to the Free Software
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
668 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
669 ##
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
670 ## As a special exception to the GNU General Public License, if you
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
671 ## distribute this file as part of a program that contains a
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
672 ## configuration script generated by Autoconf, you may include it under
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
673 ## the same distribution terms that you use for the rest of that program.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
674
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
675 # serial 46 AC_PROG_LIBTOOL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
676
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
677 AC_DEFUN([AC_PROG_LIBTOOL],
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
678 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
679
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
680 # This can be used to rebuild libtool when needed
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
681 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
682
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
683 # Always use our own libtool.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
684 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
685 AC_SUBST(LIBTOOL)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
686
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
687 # Prevent multiple expansion
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
688 define([AC_PROG_LIBTOOL], [])
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
689 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
690
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
691 AC_DEFUN([AC_LIBTOOL_SETUP],
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
692 [AC_PREREQ(2.13)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
693 AC_REQUIRE([AC_ENABLE_SHARED])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
694 AC_REQUIRE([AC_ENABLE_STATIC])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
695 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
696 AC_REQUIRE([AC_CANONICAL_HOST])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
697 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
698 AC_REQUIRE([AC_PROG_CC])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
699 AC_REQUIRE([AC_PROG_LD])dnl
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
700 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
701 AC_REQUIRE([AC_PROG_NM])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
702 AC_REQUIRE([AC_PROG_LN_S])dnl
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
703 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
704 AC_REQUIRE([AC_OBJEXT])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
705 AC_REQUIRE([AC_EXEEXT])dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
706 dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
707
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
708 _LT_AC_PROG_ECHO_BACKSLASH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
709 # Only perform the check for file, if the check method requires it
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
710 case $deplibs_check_method in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
711 file_magic*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
712 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
713 AC_PATH_MAGIC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
714 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
715 ;;
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
716 esac
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
717
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
718 AC_CHECK_TOOL(RANLIB, ranlib, :)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
719 AC_CHECK_TOOL(STRIP, strip, :)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
720
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
721 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
722 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
723 enable_win32_dll=yes, enable_win32_dll=no)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
724
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
725 AC_ARG_ENABLE(libtool-lock,
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
726 [ --disable-libtool-lock avoid locking (might break parallel builds)])
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
727 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
728
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
729 # Some flags need to be propagated to the compiler or linker for good
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
730 # libtool support.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
731 case $host in
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
732 *-*-irix6*)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
733 # Find out which ABI we are using.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
734 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
735 if AC_TRY_EVAL(ac_compile); then
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
736 case `/usr/bin/file conftest.$ac_objext` in
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
737 *32-bit*)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
738 LD="${LD-ld} -32"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
739 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
740 *N32*)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
741 LD="${LD-ld} -n32"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
742 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
743 *64-bit*)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
744 LD="${LD-ld} -64"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
745 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
746 esac
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
747 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
748 rm -rf conftest*
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
749 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
750
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
751 *-*-sco3.2v5*)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
752 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
753 SAVE_CFLAGS="$CFLAGS"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
754 CFLAGS="$CFLAGS -belf"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
755 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
756 [AC_LANG_SAVE
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
757 AC_LANG_C
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
758 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
759 AC_LANG_RESTORE])
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
760 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
761 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
762 CFLAGS="$SAVE_CFLAGS"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
763 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
764 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
765
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
766 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
767 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
768 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
769 AC_CHECK_TOOL(AS, as, false)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
770 AC_CHECK_TOOL(OBJDUMP, objdump, false)
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
771
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
772 # recent cygwin and mingw systems supply a stub DllMain which the user
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
773 # can override, but on older systems we have to supply one
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
774 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
775 [AC_TRY_LINK([],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
776 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
777 DllMain (0, 0, 0);],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
778 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
779
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
780 case $host/$CC in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
781 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
782 # old mingw systems require "-dll" to link a DLL, while more recent ones
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
783 # require "-mdll"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
784 SAVE_CFLAGS="$CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
785 CFLAGS="$CFLAGS -mdll"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
786 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
787 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
788 CFLAGS="$SAVE_CFLAGS" ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
789 *-*-cygwin* | *-*-pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
790 # cygwin systems need to pass --dll to the linker, and not link
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
791 # crt.o which will require a WinMain@16 definition.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
792 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
793 esac
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
794 ;;
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
795 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
796 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
797
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
798 _LT_AC_LTCONFIG_HACK
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
799
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
800 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
801
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
802 # AC_LIBTOOL_HEADER_ASSERT
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
803 # ------------------------
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
804 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
805 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
806 [lt_cv_func_assert_works],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
807 [case $host in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
808 *-*-solaris*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
809 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
810 case `$CC --version 2>/dev/null` in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
811 [[12]].*) lt_cv_func_assert_works=no ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
812 *) lt_cv_func_assert_works=yes ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
813 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
814 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
815 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
816 esac])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
817
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
818 if test "x$lt_cv_func_assert_works" = xyes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
819 AC_CHECK_HEADERS(assert.h)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
820 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
821 ])# AC_LIBTOOL_HEADER_ASSERT
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
822
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
823 # _LT_AC_CHECK_DLFCN
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
824 # --------------------
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
825 AC_DEFUN([_LT_AC_CHECK_DLFCN],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
826 [AC_CHECK_HEADERS(dlfcn.h)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
827 ])# _LT_AC_CHECK_DLFCN
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
828
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
829 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
830 # ---------------------------------
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
831 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
832 [AC_REQUIRE([AC_CANONICAL_HOST])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
833 AC_REQUIRE([AC_PROG_NM])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
834 AC_REQUIRE([AC_OBJEXT])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
835 # Check for command to grab the raw symbol name followed by C symbol from nm.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
836 AC_MSG_CHECKING([command to parse $NM output])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
837 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
838
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
839 # These are sane defaults that work on at least a few old systems.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
840 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
841
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
842 # Character class describing NM global symbol codes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
843 symcode='[[BCDEGRST]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
844
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
845 # Regexp to match symbols that can be accessed directly from C.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
846 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
847
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
848 # Transform the above into a raw symbol and a C symbol.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
849 symxfrm='\1 \2\3 \3'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
850
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
851 # Transform an extracted symbol line into a proper C declaration
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
852 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
853
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
854 # Transform an extracted symbol line into symbol name and symbol address
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
855 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
856
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
857 # Define system-specific variables.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
858 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
859 aix*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
860 symcode='[[BCDT]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
861 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
862 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
863 symcode='[[ABCDGISTW]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
864 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
865 hpux*) # Its linker distinguishes data from code symbols
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
866 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
867 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
868 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
869 irix*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
870 symcode='[[BCDEGRST]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
871 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
872 solaris* | sysv5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
873 symcode='[[BDT]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
874 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
875 sysv4)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
876 symcode='[[DFNSTU]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
877 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
878 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
879
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
880 # Handle CRLF in mingw tool chain
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
881 opt_cr=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
882 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
883 mingw*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
884 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
885 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
886 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
887
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
888 # If we're using GNU nm, then use its standard symbol codes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
889 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
890 symcode='[[ABCDGISTW]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
891 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
892
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
893 # Try without a prefix undercore, then with it.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
894 for ac_symprfx in "" "_"; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
895
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
896 # Write the raw and C identifiers.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
897 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
898
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
899 # Check to see that the pipe works correctly.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
900 pipe_works=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
901 rm -f conftest*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
902 cat > conftest.$ac_ext <<EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
903 #ifdef __cplusplus
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
904 extern "C" {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
905 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
906 char nm_test_var;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
907 void nm_test_func(){}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
908 #ifdef __cplusplus
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
909 }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
910 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
911 int main(){nm_test_var='a';nm_test_func();return(0);}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
912 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
913
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
914 if AC_TRY_EVAL(ac_compile); then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
915 # Now try to grab the symbols.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
916 nlist=conftest.nm
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
917 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
918 # Try sorting and uniquifying the output.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
919 if sort "$nlist" | uniq > "$nlist"T; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
920 mv -f "$nlist"T "$nlist"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
921 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
922 rm -f "$nlist"T
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
923 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
924
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
925 # Make sure that we snagged all the symbols we need.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
926 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
927 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
928 cat <<EOF > conftest.$ac_ext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
929 #ifdef __cplusplus
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
930 extern "C" {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
931 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
932
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
933 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
934 # Now generate the symbol file.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
935 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
936
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
937 cat <<EOF >> conftest.$ac_ext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
938 #if defined (__STDC__) && __STDC__
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
939 # define lt_ptr void *
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
940 #else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
941 # define lt_ptr char *
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
942 # define const
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
943 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
944
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
945 /* The mapping between symbol names and symbols. */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
946 const struct {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
947 const char *name;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
948 lt_ptr address;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
949 }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
950 lt_preloaded_symbols[[]] =
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
951 {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
952 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
953 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
954 cat <<\EOF >> conftest.$ac_ext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
955 {0, (lt_ptr) 0}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
956 };
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
957
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
958 #ifdef __cplusplus
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
959 }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
960 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
961 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
962 # Now try linking the two files.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
963 mv conftest.$ac_objext conftstm.$ac_objext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
964 save_LIBS="$LIBS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
965 save_CFLAGS="$CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
966 LIBS="conftstm.$ac_objext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
967 CFLAGS="$CFLAGS$no_builtin_flag"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
968 if AC_TRY_EVAL(ac_link) && test -s conftest; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
969 pipe_works=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
970 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
971 LIBS="$save_LIBS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
972 CFLAGS="$save_CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
973 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
974 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
975 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
976 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
977 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
978 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
979 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
980 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
981 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
982 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
983 echo "$progname: failed program was:" >&AC_FD_CC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
984 cat conftest.$ac_ext >&5
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
985 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
986 rm -f conftest* conftst*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
987
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
988 # Do not use the global_symbol_pipe unless it works.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
989 if test "$pipe_works" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
990 break
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
991 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
992 lt_cv_sys_global_symbol_pipe=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
993 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
994 done
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
995 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
996 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
997 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
998 global_symbol_to_cdecl=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
999 global_symbol_to_c_name_address=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1000 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1001 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1002 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1003 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1004 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1005 then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1006 AC_MSG_RESULT(failed)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1007 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1008 AC_MSG_RESULT(ok)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1009 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1010 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1011
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1012 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1013 # ---------------------------------
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1014 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1015 [# Find the correct PATH separator. Usually this is `:', but
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1016 # DJGPP uses `;' like DOS.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1017 if test "X${PATH_SEPARATOR+set}" != Xset; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1018 UNAME=${UNAME-`uname 2>/dev/null`}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1019 case X$UNAME in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1020 *-DOS) lt_cv_sys_path_separator=';' ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1021 *) lt_cv_sys_path_separator=':' ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1022 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1023 PATH_SEPARATOR=$lt_cv_sys_path_separator
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1024 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1025 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1026
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1027 # _LT_AC_PROG_ECHO_BACKSLASH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1028 # --------------------------
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1029 # Add some code to the start of the generated configure script which
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1030 # will find an echo command which doesn't interpret backslashes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1031 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1032 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1033 [AC_DIVERT_PUSH(NOTICE)])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1034 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1035
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1036 # Check that we are running under the correct shell.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1037 SHELL=${CONFIG_SHELL-/bin/sh}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1038
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1039 case X$ECHO in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1040 X*--fallback-echo)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1041 # Remove one level of quotation (which was required for Make).
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1042 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1043 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1044 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1045
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1046 echo=${ECHO-echo}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1047 if test "X[$]1" = X--no-reexec; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1048 # Discard the --no-reexec flag, and continue.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1049 shift
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1050 elif test "X[$]1" = X--fallback-echo; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1051 # Avoid inline document here, it may be left over
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1052 :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1053 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1054 # Yippee, $echo works!
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1055 :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1056 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1057 # Restart under the correct shell.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1058 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1059 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1060
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1061 if test "X[$]1" = X--fallback-echo; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1062 # used as fallback echo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1063 shift
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1064 cat <<EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1065 $*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1066 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1067 exit 0
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1068 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1069
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1070 # The HP-UX ksh and POSIX shell print the target directory to stdout
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1071 # if CDPATH is set.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1072 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1073
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1074 if test -z "$ECHO"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1075 if test "X${echo_test_string+set}" != Xset; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1076 # find a string as large as possible, as long as the shell can cope with it
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1077 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1078 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1079 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1080 echo_test_string="`eval $cmd`" &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1081 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1082 then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1083 break
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1084 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1085 done
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1086 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1087
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1088 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1089 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1090 test "X$echo_testing_string" = "X$echo_test_string"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1091 :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1092 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1093 # The Solaris, AIX, and Digital Unix default echo programs unquote
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1094 # backslashes. This makes it impossible to quote backslashes using
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1095 # echo "$something" | sed 's/\\/\\\\/g'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1096 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1097 # So, first we look for a working echo in the user's PATH.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1098
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1099 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1100 for dir in $PATH /usr/ucb; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1101 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1102 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1103 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1104 test "X$echo_testing_string" = "X$echo_test_string"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1105 echo="$dir/echo"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1106 break
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1107 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1108 done
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1109 IFS="$save_ifs"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1110
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1111 if test "X$echo" = Xecho; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1112 # We didn't find a better echo, so look for alternatives.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1113 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1114 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1115 test "X$echo_testing_string" = "X$echo_test_string"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1116 # This shell has a builtin print -r that does the trick.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1117 echo='print -r'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1118 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1119 test "X$CONFIG_SHELL" != X/bin/ksh; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1120 # If we have ksh, try running configure again with it.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1121 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1122 export ORIGINAL_CONFIG_SHELL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1123 CONFIG_SHELL=/bin/ksh
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1124 export CONFIG_SHELL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1125 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1126 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1127 # Try using printf.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1128 echo='printf %s\n'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1129 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1130 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1131 test "X$echo_testing_string" = "X$echo_test_string"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1132 # Cool, printf works
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1133 :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1134 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1135 test "X$echo_testing_string" = 'X\t' &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1136 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1137 test "X$echo_testing_string" = "X$echo_test_string"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1138 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1139 export CONFIG_SHELL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1140 SHELL="$CONFIG_SHELL"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1141 export SHELL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1142 echo="$CONFIG_SHELL [$]0 --fallback-echo"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1143 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1144 test "X$echo_testing_string" = 'X\t' &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1145 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1146 test "X$echo_testing_string" = "X$echo_test_string"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1147 echo="$CONFIG_SHELL [$]0 --fallback-echo"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1148 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1149 # maybe with a smaller string...
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1150 prev=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1151
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1152 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1153 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1154 then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1155 break
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1156 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1157 prev="$cmd"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1158 done
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1159
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1160 if test "$prev" != 'sed 50q "[$]0"'; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1161 echo_test_string=`eval $prev`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1162 export echo_test_string
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1163 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1164 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1165 # Oops. We lost completely, so just stick with echo.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1166 echo=echo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1167 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1168 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1169 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1170 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1171 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1172 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1173
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1174 # Copy echo and quote the copy suitably for passing to libtool from
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1175 # the Makefile, instead of quoting the original, which is used later.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1176 ECHO=$echo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1177 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1178 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1179 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1180
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1181 AC_SUBST(ECHO)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1182 AC_DIVERT_POP
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1183 ])# _LT_AC_PROG_ECHO_BACKSLASH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1184
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1185 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1186 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1187 # ------------------------------------------------------------------
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1188 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1189 [if test "$cross_compiling" = yes; then :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1190 [$4]
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1191 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1192 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1193 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1194 lt_status=$lt_dlunknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1195 cat > conftest.$ac_ext <<EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1196 [#line __oline__ "configure"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1197 #include "confdefs.h"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1198
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1199 #if HAVE_DLFCN_H
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1200 #include <dlfcn.h>
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1201 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1202
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1203 #include <stdio.h>
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1204
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1205 #ifdef RTLD_GLOBAL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1206 # define LT_DLGLOBAL RTLD_GLOBAL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1207 #else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1208 # ifdef DL_GLOBAL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1209 # define LT_DLGLOBAL DL_GLOBAL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1210 # else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1211 # define LT_DLGLOBAL 0
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1212 # endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1213 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1214
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1215 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1216 find out it does not work in some platform. */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1217 #ifndef LT_DLLAZY_OR_NOW
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1218 # ifdef RTLD_LAZY
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1219 # define LT_DLLAZY_OR_NOW RTLD_LAZY
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1220 # else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1221 # ifdef DL_LAZY
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1222 # define LT_DLLAZY_OR_NOW DL_LAZY
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1223 # else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1224 # ifdef RTLD_NOW
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1225 # define LT_DLLAZY_OR_NOW RTLD_NOW
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1226 # else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1227 # ifdef DL_NOW
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1228 # define LT_DLLAZY_OR_NOW DL_NOW
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1229 # else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1230 # define LT_DLLAZY_OR_NOW 0
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1231 # endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1232 # endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1233 # endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1234 # endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1235 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1236
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1237 #ifdef __cplusplus
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1238 extern "C" void exit (int);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1239 #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1240
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1241 void fnord() { int i=42;}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1242 int main ()
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1243 {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1244 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1245 int status = $lt_dlunknown;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1246
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1247 if (self)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1248 {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1249 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1250 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1251 /* dlclose (self); */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1252 }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1253
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1254 exit (status);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1255 }]
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1256 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1257 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1258 (./conftest; exit; ) 2>/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1259 lt_status=$?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1260 case x$lt_status in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1261 x$lt_dlno_uscore) $1 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1262 x$lt_dlneed_uscore) $2 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1263 x$lt_unknown|x*) $3 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1264 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1265 else :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1266 # compilation failed
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1267 $3
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1268 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1269 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1270 rm -fr conftest*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1271 ])# _LT_AC_TRY_DLOPEN_SELF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1272
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1273 # AC_LIBTOOL_DLOPEN_SELF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1274 # -------------------
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1275 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1276 [if test "x$enable_dlopen" != xyes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1277 enable_dlopen=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1278 enable_dlopen_self=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1279 enable_dlopen_self_static=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1280 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1281 lt_cv_dlopen=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1282 lt_cv_dlopen_libs=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1283
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1284 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1285 beos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1286 lt_cv_dlopen="load_add_on"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1287 lt_cv_dlopen_libs=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1288 lt_cv_dlopen_self=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1289 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1290
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1291 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1292 lt_cv_dlopen="LoadLibrary"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1293 lt_cv_dlopen_libs=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1294 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1295
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1296 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1297 AC_CHECK_FUNC([shl_load],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1298 [lt_cv_dlopen="shl_load"],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1299 [AC_CHECK_LIB([dld], [shl_load],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1300 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1301 [AC_CHECK_FUNC([dlopen],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1302 [lt_cv_dlopen="dlopen"],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1303 [AC_CHECK_LIB([dl], [dlopen],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1304 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1305 [AC_CHECK_LIB([svld], [dlopen],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1306 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1307 [AC_CHECK_LIB([dld], [dld_link],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1308 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1309 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1310 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1311 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1312 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1313 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1314 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1315 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1316
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1317 if test "x$lt_cv_dlopen" != xno; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1318 enable_dlopen=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1319 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1320 enable_dlopen=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1321 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1322
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1323 case $lt_cv_dlopen in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1324 dlopen)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1325 save_CPPFLAGS="$CPPFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1326 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1327 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1328
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1329 save_LDFLAGS="$LDFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1330 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1331
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1332 save_LIBS="$LIBS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1333 LIBS="$lt_cv_dlopen_libs $LIBS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1334
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1335 AC_CACHE_CHECK([whether a program can dlopen itself],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1336 lt_cv_dlopen_self, [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1337 _LT_AC_TRY_DLOPEN_SELF(
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1338 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1339 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1340 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1341
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1342 if test "x$lt_cv_dlopen_self" = xyes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1343 LDFLAGS="$LDFLAGS $link_static_flag"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1344 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1345 lt_cv_dlopen_self_static, [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1346 _LT_AC_TRY_DLOPEN_SELF(
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1347 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1348 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1349 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1350 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1351
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1352 CPPFLAGS="$save_CPPFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1353 LDFLAGS="$save_LDFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1354 LIBS="$save_LIBS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1355 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1356 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1357
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1358 case $lt_cv_dlopen_self in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1359 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1360 *) enable_dlopen_self=unknown ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1361 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1362
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1363 case $lt_cv_dlopen_self_static in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1364 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1365 *) enable_dlopen_self_static=unknown ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1366 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1367 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1368 ])# AC_LIBTOOL_DLOPEN_SELF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1369
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1370 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1371 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1372 # Sed substitution that helps us do robust quoting. It backslashifies
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1373 # metacharacters that are still active within double-quoted strings.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1374 Xsed='sed -e s/^X//'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1375 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1376
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1377 # Same as above, but do not quote variable references.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1378 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1379
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1380 # Sed substitution to delay expansion of an escaped shell variable in a
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1381 # double_quote_subst'ed string.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1382 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1383
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1384 # Constants:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1385 rm="rm -f"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1386
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1387 # Global variables:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1388 default_ofile=libtool
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1389 can_build_shared=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1390
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1391 # All known linkers require a `.a' archive for static linking (except M$VC,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1392 # which needs '.lib').
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1393 libext=a
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1394 ltmain="$ac_aux_dir/ltmain.sh"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1395 ofile="$default_ofile"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1396 with_gnu_ld="$lt_cv_prog_gnu_ld"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1397 need_locks="$enable_libtool_lock"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1398
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1399 old_CC="$CC"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1400 old_CFLAGS="$CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1401
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1402 # Set sane defaults for various variables
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1403 test -z "$AR" && AR=ar
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1404 test -z "$AR_FLAGS" && AR_FLAGS=cru
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1405 test -z "$AS" && AS=as
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1406 test -z "$CC" && CC=cc
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1407 test -z "$DLLTOOL" && DLLTOOL=dlltool
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1408 test -z "$LD" && LD=ld
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1409 test -z "$LN_S" && LN_S="ln -s"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1410 test -z "$MAGIC_CMD" && MAGIC_CMD=file
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1411 test -z "$NM" && NM=nm
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1412 test -z "$OBJDUMP" && OBJDUMP=objdump
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1413 test -z "$RANLIB" && RANLIB=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1414 test -z "$STRIP" && STRIP=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1415 test -z "$ac_objext" && ac_objext=o
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1416
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1417 if test x"$host" != x"$build"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1418 ac_tool_prefix=${host_alias}-
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1419 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1420 ac_tool_prefix=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1421 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1422
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1423 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1424 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1425 linux-gnu*) ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1426 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1427 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1428
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1429 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1430 aix3*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1431 # AIX sometimes has problems with the GCC collect2 program. For some
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1432 # reason, if we set the COLLECT_NAMES environment variable, the problems
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1433 # vanish in a puff of smoke.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1434 if test "X${COLLECT_NAMES+set}" != Xset; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1435 COLLECT_NAMES=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1436 export COLLECT_NAMES
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1437 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1438 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1439 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1441 # Determine commands to create old-style static archives.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1442 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1443 old_postinstall_cmds='chmod 644 $oldlib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1444 old_postuninstall_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1445
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1446 if test -n "$RANLIB"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1447 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1448 openbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1449 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1450 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1451 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1452 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1453 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1454 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1455 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1456 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1457
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1458 # Allow CC to be a program name with arguments.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1459 set dummy $CC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1460 compiler="[$]2"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1461
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1462 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1463 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1464 AC_MSG_CHECKING([for objdir])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1465 rm -f .libs 2>/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1466 mkdir .libs 2>/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1467 if test -d .libs; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1468 objdir=.libs
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1469 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1470 # MS-DOS does not allow filenames that begin with a dot.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1471 objdir=_libs
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1472 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1473 rmdir .libs 2>/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1474 AC_MSG_RESULT($objdir)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1475 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1476 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1477
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1478
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1479 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1480 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1481 AC_ARG_WITH(pic,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1482 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1483 pic_mode="$withval", pic_mode=default)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1484 test -z "$pic_mode" && pic_mode=default
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1485
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1486 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1487 # in isolation, and that seeing it set (from the cache) indicates that
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1488 # the associated values are set (in the cache) correctly too.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1489 AC_MSG_CHECKING([for $compiler option to produce PIC])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1490 AC_CACHE_VAL(lt_cv_prog_cc_pic,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1491 [ lt_cv_prog_cc_pic=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1492 lt_cv_prog_cc_shlib=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1493 lt_cv_prog_cc_wl=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1494 lt_cv_prog_cc_static=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1495 lt_cv_prog_cc_no_builtin=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1496 lt_cv_prog_cc_can_build_shared=$can_build_shared
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1497
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1498 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1499 lt_cv_prog_cc_wl='-Wl,'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1500 lt_cv_prog_cc_static='-static'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1501
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1502 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1503 aix*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1504 # Below there is a dirty hack to force normal static linking with -ldl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1505 # The problem is because libdl dynamically linked with both libc and
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1506 # libC (AIX C++ library), which obviously doesn't included in libraries
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1507 # list by gcc. This cause undefined symbols with -static flags.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1508 # This hack allows C programs to be linked with "-static -ldl", but
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1509 # not sure about C++ programs.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1510 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1511 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1512 amigaos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1513 # FIXME: we need at least 68020 code to build shared libraries, but
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1514 # adding the `-m68020' flag to GCC prevents building anything better,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1515 # like `-m68040'.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1516 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1517 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1518 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1519 # PIC is the default for these OSes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1520 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1521 darwin* | rhapsody*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1522 # PIC is the default on this platform
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1523 # Common symbols not allowed in MH_DYLIB files
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1524 lt_cv_prog_cc_pic='-fno-common'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1525 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1526 cygwin* | mingw* | pw32* | os2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1527 # This hack is so that the source file can tell whether it is being
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1528 # built for inclusion in a dll (and should export symbols for example).
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1529 lt_cv_prog_cc_pic='-DDLL_EXPORT'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1530 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1531 sysv4*MP*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1532 if test -d /usr/nec; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1533 lt_cv_prog_cc_pic=-Kconform_pic
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1534 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1535 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1536 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1537 lt_cv_prog_cc_pic='-fPIC'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1538 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1539 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1540 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1541 # PORTME Check for PIC flags for the system compiler.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1542 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1543 aix3* | aix4* | aix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1544 lt_cv_prog_cc_wl='-Wl,'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1545 # All AIX code is PIC.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1546 if test "$host_cpu" = ia64; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1547 # AIX 5 now supports IA64 processor
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1548 lt_cv_prog_cc_static='-Bstatic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1549 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1550 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1551 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1552 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1553
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1554 hpux9* | hpux10* | hpux11*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1555 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1556 lt_cv_prog_cc_wl='-Wl,'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1557 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1558 lt_cv_prog_cc_pic='+Z'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1559 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1560
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1561 irix5* | irix6*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1562 lt_cv_prog_cc_wl='-Wl,'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1563 lt_cv_prog_cc_static='-non_shared'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1564 # PIC (with -KPIC) is the default.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1565 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1566
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1567 cygwin* | mingw* | pw32* | os2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1568 # This hack is so that the source file can tell whether it is being
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1569 # built for inclusion in a dll (and should export symbols for example).
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1570 lt_cv_prog_cc_pic='-DDLL_EXPORT'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1571 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1572
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1573 newsos6)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1574 lt_cv_prog_cc_pic='-KPIC'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1575 lt_cv_prog_cc_static='-Bstatic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1576 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1577
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1578 osf3* | osf4* | osf5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1579 # All OSF/1 code is PIC.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1580 lt_cv_prog_cc_wl='-Wl,'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1581 lt_cv_prog_cc_static='-non_shared'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1582 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1583
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1584 sco3.2v5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1585 lt_cv_prog_cc_pic='-Kpic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1586 lt_cv_prog_cc_static='-dn'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1587 lt_cv_prog_cc_shlib='-belf'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1588 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1589
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1590 solaris*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1591 lt_cv_prog_cc_pic='-KPIC'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1592 lt_cv_prog_cc_static='-Bstatic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1593 lt_cv_prog_cc_wl='-Wl,'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1594 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1595
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1596 sunos4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1597 lt_cv_prog_cc_pic='-PIC'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1598 lt_cv_prog_cc_static='-Bstatic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1599 lt_cv_prog_cc_wl='-Qoption ld '
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1600 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1601
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1602 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1603 lt_cv_prog_cc_pic='-KPIC'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1604 lt_cv_prog_cc_static='-Bstatic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1605 if test "x$host_vendor" = xsni; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1606 lt_cv_prog_cc_wl='-LD'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1607 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1608 lt_cv_prog_cc_wl='-Wl,'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1609 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1610 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1611
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1612 uts4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1613 lt_cv_prog_cc_pic='-pic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1614 lt_cv_prog_cc_static='-Bstatic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1615 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1616
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1617 sysv4*MP*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1618 if test -d /usr/nec ;then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1619 lt_cv_prog_cc_pic='-Kconform_pic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1620 lt_cv_prog_cc_static='-Bstatic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1621 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1622 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1623
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1624 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1625 lt_cv_prog_cc_can_build_shared=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1626 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1627 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1628 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1629 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1630 if test -z "$lt_cv_prog_cc_pic"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1631 AC_MSG_RESULT([none])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1632 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1633 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1634
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1635 # Check to make sure the pic_flag actually works.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1636 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1637 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1638 save_CFLAGS="$CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1639 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1640 AC_TRY_COMPILE([], [], [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1641 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1642 hpux9* | hpux10* | hpux11*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1643 # On HP-UX, both CC and GCC only warn that PIC is supported... then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1644 # they create non-PIC objects. So, if there were any warnings, we
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1645 # assume that PIC is not supported.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1646 if test -s conftest.err; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1647 lt_cv_prog_cc_pic_works=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1648 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1649 lt_cv_prog_cc_pic_works=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1650 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1651 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1652 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1653 lt_cv_prog_cc_pic_works=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1654 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1655 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1656 ], [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1657 lt_cv_prog_cc_pic_works=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1658 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1659 CFLAGS="$save_CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1660 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1661
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1662 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1663 lt_cv_prog_cc_pic=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1664 lt_cv_prog_cc_can_build_shared=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1665 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1666 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1667 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1668
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1669 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1670 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1671 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1672 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1673
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1674 # Check for any special shared library compilation flags.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1675 if test -n "$lt_cv_prog_cc_shlib"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1676 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1677 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1678 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1679 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1680 lt_cv_prog_cc_can_build_shared=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1681 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1682 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1683
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1684 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1685 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1686 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1687 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1688 lt_cv_prog_cc_static_works=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1689 save_LDFLAGS="$LDFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1690 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1691 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1692 LDFLAGS="$save_LDFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1693 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1694
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1695 # Belt *and* braces to stop my trousers falling down:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1696 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1697 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1698
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1699 pic_flag="$lt_cv_prog_cc_pic"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1700 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1701 wl="$lt_cv_prog_cc_wl"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1702 link_static_flag="$lt_cv_prog_cc_static"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1703 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1704 can_build_shared="$lt_cv_prog_cc_can_build_shared"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1705 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1706 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1707
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1708
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1709 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1710 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1711 # Check to see if options -o and -c are simultaneously supported by compiler
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1712 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1713 AC_CACHE_VAL([lt_cv_compiler_c_o], [
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1714 $rm -r conftest 2>/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1715 mkdir conftest
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1716 cd conftest
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1717 echo "int some_variable = 0;" > conftest.$ac_ext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1718 mkdir out
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1719 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1720 # that will create temporary files in the current directory regardless of
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1721 # the output directory. Thus, making CWD read-only will cause this test
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1722 # to fail, enabling locking or at least warning the user not to do parallel
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1723 # builds.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1724 chmod -w .
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1725 save_CFLAGS="$CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1726 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1727 compiler_c_o=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1728 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1729 # The compiler can only warn and ignore the option if not recognized
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1730 # So say no if there are warnings
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1731 if test -s out/conftest.err; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1732 lt_cv_compiler_c_o=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1733 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1734 lt_cv_compiler_c_o=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1735 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1736 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1737 # Append any errors to the config.log.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1738 cat out/conftest.err 1>&AC_FD_CC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1739 lt_cv_compiler_c_o=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1740 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1741 CFLAGS="$save_CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1742 chmod u+w .
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1743 $rm conftest* out/*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1744 rmdir out
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1745 cd ..
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1746 rmdir conftest
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1747 $rm -r conftest 2>/dev/null
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
1748 ])
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1749 compiler_c_o=$lt_cv_compiler_c_o
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1750 AC_MSG_RESULT([$compiler_c_o])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1751
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1752 if test x"$compiler_c_o" = x"yes"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1753 # Check to see if we can write to a .lo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1754 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1755 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1756 lt_cv_compiler_o_lo=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1757 save_CFLAGS="$CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1758 CFLAGS="$CFLAGS -c -o conftest.lo"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1759 save_objext="$ac_objext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1760 ac_objext=lo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1761 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1762 # The compiler can only warn and ignore the option if not recognized
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1763 # So say no if there are warnings
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1764 if test -s conftest.err; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1765 lt_cv_compiler_o_lo=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1766 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1767 lt_cv_compiler_o_lo=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1768 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1769 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1770 ac_objext="$save_objext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1771 CFLAGS="$save_CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1772 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1773 compiler_o_lo=$lt_cv_compiler_o_lo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1774 AC_MSG_RESULT([$compiler_o_lo])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1775 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1776 compiler_o_lo=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1777 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1778 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1779 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1780
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1781 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1782 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1783 # Check to see if we can do hard links to lock some files if needed
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1784 hard_links="nottested"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1785 if test "$compiler_c_o" = no && test "$need_locks" != no; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1786 # do not overwrite the value of need_locks provided by the user
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1787 AC_MSG_CHECKING([if we can lock with hard links])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1788 hard_links=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1789 $rm conftest*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1790 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1791 touch conftest.a
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1792 ln conftest.a conftest.b 2>&5 || hard_links=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1793 ln conftest.a conftest.b 2>/dev/null && hard_links=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1794 AC_MSG_RESULT([$hard_links])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1795 if test "$hard_links" = no; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1796 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1797 need_locks=warn
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1798 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1799 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1800 need_locks=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1801 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1802 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1803 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1804
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1805 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1806 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1807 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1808 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1809 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1810 echo "int some_variable = 0;" > conftest.$ac_ext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1811 save_CFLAGS="$CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1812 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1813 compiler_rtti_exceptions=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1814 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1815 # The compiler can only warn and ignore the option if not recognized
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1816 # So say no if there are warnings
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1817 if test -s conftest.err; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1818 compiler_rtti_exceptions=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1819 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1820 compiler_rtti_exceptions=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1821 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1822 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1823 CFLAGS="$save_CFLAGS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1824 AC_MSG_RESULT([$compiler_rtti_exceptions])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1825
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1826 if test "$compiler_rtti_exceptions" = "yes"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1827 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1828 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1829 no_builtin_flag=' -fno-builtin'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1830 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1831 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1832 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1833 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1834
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1835 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1836 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1837 # See if the linker supports building shared libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1838 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1839
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1840 allow_undefined_flag=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1841 no_undefined_flag=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1842 need_lib_prefix=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1843 need_version=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1844 # when you set need_version to no, make sure it does not cause -set_version
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1845 # flags to be left without arguments
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1846 archive_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1847 archive_expsym_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1848 old_archive_from_new_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1849 old_archive_from_expsyms_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1850 export_dynamic_flag_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1851 whole_archive_flag_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1852 thread_safe_flag_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1853 hardcode_into_libs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1854 hardcode_libdir_flag_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1855 hardcode_libdir_separator=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1856 hardcode_direct=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1857 hardcode_minus_L=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1858 hardcode_shlibpath_var=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1859 runpath_var=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1860 link_all_deplibs=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1861 always_export_symbols=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1862 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1863 # include_expsyms should be a list of space-separated symbols to be *always*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1864 # included in the symbol list
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1865 include_expsyms=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1866 # exclude_expsyms can be an egrep regular expression of symbols to exclude
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1867 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1868 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1869 # as well as any symbol that contains `d'.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1870 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1871 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1872 # platforms (ab)use it in PIC code, but their linkers get confused if
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1873 # the symbol is explicitly referenced. Since portable code cannot
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1874 # rely on this symbol name, it's probably fine to never include it in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1875 # preloaded symbol tables.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1876 extract_expsyms_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1877
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1878 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1879 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1880 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1881 # When not using gcc, we currently assume that we are using
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1882 # Microsoft Visual C++.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1883 if test "$GCC" != yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1884 with_gnu_ld=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1885 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1886 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1887 openbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1888 with_gnu_ld=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1889 ;;
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
1890 esac
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1891
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1892 ld_shlibs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1893 if test "$with_gnu_ld" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1894 # If archive_cmds runs LD, not CC, wlarc should be empty
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1895 wlarc='${wl}'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1896
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1897 # See if GNU ld supports shared libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1898 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1899 aix3* | aix4* | aix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1900 # On AIX, the GNU linker is very broken
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1901 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1902 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1903 cat <<EOF 1>&2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1904
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1905 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1906 *** to be unable to reliably create shared libraries on AIX.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1907 *** Therefore, libtool is disabling shared libraries support. If you
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1908 *** really care for shared libraries, you may want to modify your PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1909 *** so that a non-GNU linker is found, and then restart.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1910
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1911 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1912 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1913
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1914 amigaos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1915 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1916 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1917 hardcode_minus_L=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1918
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1919 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1920 # that the semantics of dynamic libraries on AmigaOS, at least up
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1921 # to version 4, is to share data among multiple programs linked
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1922 # with the same dynamic library. Since this doesn't match the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1923 # behavior of shared libraries on other platforms, we can use
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1924 # them.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1925 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1926 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1927
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1928 beos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1929 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1930 allow_undefined_flag=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1931 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1932 # support --undefined. This deserves some investigation. FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1933 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1934 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1935 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1936 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1937 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1938
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1939 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1940 # hardcode_libdir_flag_spec is actually meaningless, as there is
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1941 # no search path for DLLs.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1942 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1943 allow_undefined_flag=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1944 always_export_symbols=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1945
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1946 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1947 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1948 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1949 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1950 else $CC -o impgen impgen.c ; fi)~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1951 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1952
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1953 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1954
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1955 # cygwin and mingw dlls have different entry points and sets of symbols
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1956 # to exclude.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1957 # FIXME: what about values for MSVC?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1958 dll_entry=__cygwin_dll_entry@12
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1959 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1960 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1961 mingw*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1962 # mingw values
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1963 dll_entry=_DllMainCRTStartup@12
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1964 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1965 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1966 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1967
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1968 # mingw and cygwin differ, and it's simplest to just exclude the union
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1969 # of the two symbol sets.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1970 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1971
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1972 # recent cygwin and mingw systems supply a stub DllMain which the user
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1973 # can override, but on older systems we have to supply one (in ltdll.c)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1974 if test "x$lt_cv_need_dllmain" = "xyes"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1975 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1976 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1977 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1978 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1979 ltdll_obj=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1980 ltdll_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1981 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1982
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1983 # Extract the symbol export list from an `--export-all' def file,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1984 # then regenerate the def file from the symbol export list, so that
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1985 # the compiled dll only exports the symbol export list.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1986 # Be careful not to strip the DATA tag left be newer dlltools.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1987 export_symbols_cmds="$ltdll_cmds"'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1988 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1989 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1990
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1991 # If the export-symbols file already is a .def file (1st line
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1992 # is EXPORTS), use it as is.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1993 # If DATA tags from a recent dlltool are present, honour them!
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1994 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1995 cp $export_symbols $output_objdir/$soname-def;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1996 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1997 echo EXPORTS > $output_objdir/$soname-def;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1998 _lt_hint=1;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
1999 cat $export_symbols | while read symbol; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2000 set dummy \$symbol;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2001 case \[$]# in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2002 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2003 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2004 esac;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2005 _lt_hint=`expr 1 + \$_lt_hint`;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2006 done;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2007 fi~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2008 '"$ltdll_cmds"'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2009 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2010 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2011 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2012 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2013 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2014 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2015
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2016 netbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2017 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2018 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2019 wlarc=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2020 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2021 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2022 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2023 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2024 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2025
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2026 solaris* | sysv5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2027 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2028 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2029 cat <<EOF 1>&2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2030
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2031 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2032 *** create shared libraries on Solaris systems. Therefore, libtool
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2033 *** is disabling shared libraries support. We urge you to upgrade GNU
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2034 *** binutils to release 2.9.1 or newer. Another option is to modify
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2035 *** your PATH or compiler configuration so that the native linker is
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2036 *** used, and then restart.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2037
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2038 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2039 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2040 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2041 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2042 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2043 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2044 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2045 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2046
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2047 sunos4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2048 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2049 wlarc=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2050 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2051 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2052 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2053
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2054 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2055 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2056 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2057 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2058 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2059 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2060 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2061 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2062 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2063
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2064 if test "$ld_shlibs" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2065 runpath_var=LD_RUN_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2066 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2067 export_dynamic_flag_spec='${wl}--export-dynamic'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2068 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2069 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2070 # dlltool doesn't understand --whole-archive et. al.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2071 whole_archive_flag_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2072 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2073 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2074 # ancient GNU ld didn't support --whole-archive et. al.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2075 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2076 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2077 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2078 whole_archive_flag_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2079 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2080 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2081 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2082 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2083 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2084 # PORTME fill in a description of your system's linker (not GNU ld)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2085 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2086 aix3*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2087 allow_undefined_flag=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2088 always_export_symbols=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2089 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2090 # Note: this linker hardcodes the directories in LIBPATH if there
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2091 # are no directories specified by -L.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2092 hardcode_minus_L=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2093 if test "$GCC" = yes && test -z "$link_static_flag"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2094 # Neither direct hardcoding nor static linking is supported with a
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2095 # broken collect2.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2096 hardcode_direct=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2097 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2098 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2099
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2100 aix4* | aix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2101 if test "$host_cpu" = ia64; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2102 # On IA64, the linker does run time linking by default, so we don't
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2103 # have to do anything special.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2104 aix_use_runtimelinking=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2105 exp_sym_flag='-Bexport'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2106 no_entry_flag=""
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2107 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2108 aix_use_runtimelinking=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2109
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2110 # Test if we are trying to use run time linking or normal
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2111 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2112 # need to do runtime linking.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2113 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2114 for ld_flag in $LDFLAGS; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2115 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2116 aix_use_runtimelinking=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2117 break
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2118 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2119 done
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2120 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2121
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2122 exp_sym_flag='-bexport'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2123 no_entry_flag='-bnoentry'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2124 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2125
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2126 # When large executables or shared objects are built, AIX ld can
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2127 # have problems creating the table of contents. If linking a library
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2128 # or program results in "error TOC overflow" add -mminimal-toc to
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2129 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2130 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2131
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2132 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2133 archive_cmds=''
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2134 hardcode_libdir_separator=':'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2135 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2136 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2137 collect2name=`${CC} -print-prog-name=collect2`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2138 if test -f "$collect2name" && \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2139 strings "$collect2name" | grep resolve_lib_name >/dev/null
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2140 then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2141 # We have reworked collect2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2142 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2143 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2144 # We have old collect2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2145 hardcode_direct=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2146 # It fails to find uninstalled libraries when the uninstalled
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2147 # path is not listed in the libpath. Setting hardcode_minus_L
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2148 # to unsupported forces relinking
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2149 hardcode_minus_L=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2150 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2151 hardcode_libdir_separator=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2152 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2153 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2154
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2155 shared_flag='-shared'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2156 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2157 # not using gcc
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2158 if test "$host_cpu" = ia64; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2159 shared_flag='${wl}-G'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2160 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2161 if test "$aix_use_runtimelinking" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2162 shared_flag='${wl}-G'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2163 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2164 shared_flag='${wl}-bM:SRE'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2165 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2166 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2167 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2168
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2169 # It seems that -bexpall can do strange things, so it is better to
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2170 # generate a list of symbols to export.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2171 always_export_symbols=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2172 if test "$aix_use_runtimelinking" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2173 # Warning - without using the other runtime loading flags (-brtl),
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2174 # -berok will link without error, but may produce a broken library.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2175 allow_undefined_flag='-berok'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2176 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2177 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2178 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2179 if test "$host_cpu" = ia64; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2180 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2181 allow_undefined_flag="-z nodefs"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2182 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2183 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2184 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2185 # Warning - without using the other run time loading flags,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2186 # -berok will link without error, but may produce a broken library.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2187 allow_undefined_flag='${wl}-berok'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2188 # This is a bit strange, but is similar to how AIX traditionally builds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2189 # it's shared libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2190 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2191 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2192 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2193 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2194
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2195 amigaos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2196 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2197 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2198 hardcode_minus_L=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2199 # see comment about different semantics on the GNU ld section
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2200 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2201 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2202
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2203 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2204 # When not using gcc, we currently assume that we are using
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2205 # Microsoft Visual C++.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2206 # hardcode_libdir_flag_spec is actually meaningless, as there is
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2207 # no search path for DLLs.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2208 hardcode_libdir_flag_spec=' '
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2209 allow_undefined_flag=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2210 # Tell ltmain to make .lib files, not .a files.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2211 libext=lib
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2212 # FIXME: Setting linknames here is a bad hack.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2213 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2214 # The linker will automatically build a .lib file if we build a DLL.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2215 old_archive_from_new_cmds='true'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2216 # FIXME: Should let the user specify the lib program.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2217 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2218 fix_srcfile_path='`cygpath -w "$srcfile"`'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2219 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2220
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2221 darwin* | rhapsody*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2222 case "$host_os" in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2223 rhapsody* | darwin1.[[012]])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2224 allow_undefined_flag='-undefined suppress'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2225 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2226 *) # Darwin 1.3 on
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2227 allow_undefined_flag='-flat_namespace -undefined suppress'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2228 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2229 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2230 # FIXME: Relying on posixy $() will cause problems for
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2231 # cross-compilation, but unfortunately the echo tests do not
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2232 # yet detect zsh echo's removal of \ escapes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2233 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2234 # We need to add '_' to the symbols in $export_symbols first
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2235 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2236 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2237 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2238 whole_archive_flag_spec='-all_load $convenience'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2239 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2240
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2241 freebsd1*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2242 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2243 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2244
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2245 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2246 # support. Future versions do this automatically, but an explicit c++rt0.o
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2247 # does not break anything, and helps significantly (at the cost of a little
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2248 # extra space).
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2249 freebsd2.2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2250 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2251 hardcode_libdir_flag_spec='-R$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2252 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2253 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2254 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2255
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2256 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2257 freebsd2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2258 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2259 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2260 hardcode_minus_L=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2261 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2262 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2263
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2264 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2265 freebsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2266 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2267 hardcode_libdir_flag_spec='-R$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2268 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2269 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2270 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2271
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2272 hpux9* | hpux10* | hpux11*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2273 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2274 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2275 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2276 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2277 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2278 hardcode_libdir_separator=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2279 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2280 hardcode_minus_L=yes # Not in the search PATH, but as the default
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2281 # location of the library.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2282 export_dynamic_flag_spec='${wl}-E'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2283 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2284
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2285 irix5* | irix6*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2286 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2287 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2288 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2289 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2290 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2291 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2292 hardcode_libdir_separator=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2293 link_all_deplibs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2294 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2295
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2296 netbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2297 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2298 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2299 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2300 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2301 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2302 hardcode_libdir_flag_spec='-R$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2303 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2304 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2305 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2306
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2307 newsos6)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2308 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2309 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2310 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2311 hardcode_libdir_separator=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2312 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2313 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2314
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2315 openbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2316 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2317 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2318 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2319 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2320 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2321 export_dynamic_flag_spec='${wl}-E'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2322 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2323 case "$host_os" in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2324 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2325 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2326 hardcode_libdir_flag_spec='-R$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2327 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2328 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2329 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2330 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2331 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2332 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2333 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2334 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2335
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2336 os2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2337 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2338 hardcode_minus_L=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2339 allow_undefined_flag=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2340 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2341 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2342 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2343
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2344 osf3*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2345 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2346 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2347 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2348 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2349 allow_undefined_flag=' -expect_unresolved \*'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2350 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2351 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2352 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2353 hardcode_libdir_separator=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2354 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2355
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2356 osf4* | osf5*) # as osf3* with the addition of -msym flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2357 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2358 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2359 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2360 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2361 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2362 allow_undefined_flag=' -expect_unresolved \*'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2363 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2364 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2365 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2366
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2367 #Both c and cxx compiler support -rpath directly
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2368 hardcode_libdir_flag_spec='-rpath $libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2369 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2370 hardcode_libdir_separator=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2371 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2372
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2373 sco3.2v5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2374 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2375 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2376 runpath_var=LD_RUN_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2377 hardcode_runpath_var=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2378 export_dynamic_flag_spec='${wl}-Bexport'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2379 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2380
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2381 solaris*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2382 # gcc --version < 3.0 without binutils cannot create self contained
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2383 # shared libraries reliably, requiring libgcc.a to resolve some of
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2384 # the object symbols generated in some cases. Libraries that use
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2385 # assert need libgcc.a to resolve __eprintf, for example. Linking
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2386 # a copy of libgcc.a into every shared library to guarantee resolving
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2387 # such symbols causes other problems: According to Tim Van Holder
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2388 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2389 # (to the application) exception stack for one thing.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2390 no_undefined_flag=' -z defs'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2391 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2392 case `$CC --version 2>/dev/null` in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2393 [[12]].*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2394 cat <<EOF 1>&2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2395
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2396 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2397 *** create self contained shared libraries on Solaris systems, without
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2398 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2399 *** -no-undefined support, which will at least allow you to build shared
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2400 *** libraries. However, you may find that when you link such libraries
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2401 *** into an application without using GCC, you have to manually add
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2402 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2403 *** upgrade to a newer version of GCC. Another option is to rebuild your
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2404 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2405
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2406 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2407 no_undefined_flag=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2408 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2409 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2410 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2411 # $CC -shared without GNU ld will not create a library from C++
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2412 # object files and a static libstdc++, better avoid it by now
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2413 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2414 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2415 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2416 hardcode_libdir_flag_spec='-R$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2417 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2418 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2419 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2420 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2421 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2422 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2423 link_all_deplibs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2424 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2425
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2426 sunos4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2427 if test "x$host_vendor" = xsequent; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2428 # Use $CC to link under sequent, because it throws in some extra .o
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2429 # files that make .init and .fini sections work.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2430 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2431 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2432 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2433 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2434 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2435 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2436 hardcode_minus_L=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2437 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2438 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2439
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2440 sysv4)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2441 if test "x$host_vendor" = xsno; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2442 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2443 hardcode_direct=yes # is this really true???
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2444 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2445 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2446 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2447 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2448 runpath_var='LD_RUN_PATH'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2449 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2450 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2451
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2452 sysv4.3*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2453 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2454 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2455 export_dynamic_flag_spec='-Bexport'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2456 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2457
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2458 sysv5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2459 no_undefined_flag=' -z text'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2460 # $CC -shared without GNU ld will not create a library from C++
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2461 # object files and a static libstdc++, better avoid it by now
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2462 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2463 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2464 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2465 hardcode_libdir_flag_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2466 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2467 runpath_var='LD_RUN_PATH'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2468 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2469
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2470 uts4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2471 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2472 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2473 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2474 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2475
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2476 dgux*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2477 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2478 hardcode_libdir_flag_spec='-L$libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2479 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2480 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2481
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2482 sysv4*MP*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2483 if test -d /usr/nec; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2484 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2485 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2486 runpath_var=LD_RUN_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2487 hardcode_runpath_var=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2488 ld_shlibs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2489 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2490 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2491
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2492 sysv4.2uw2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2493 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2494 hardcode_direct=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2495 hardcode_minus_L=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2496 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2497 hardcode_runpath_var=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2498 runpath_var=LD_RUN_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2499 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2500
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2501 sysv5uw7* | unixware7*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2502 no_undefined_flag='${wl}-z ${wl}text'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2503 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2504 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2505 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2506 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2507 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2508 runpath_var='LD_RUN_PATH'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2509 hardcode_shlibpath_var=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2510 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2511
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2512 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2513 ld_shlibs=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2514 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2515 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2516 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2517 AC_MSG_RESULT([$ld_shlibs])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2518 test "$ld_shlibs" = no && can_build_shared=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2519 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2520 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2521
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2522 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2523 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2524 # Check hardcoding attributes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2525 AC_MSG_CHECKING([how to hardcode library paths into programs])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2526 hardcode_action=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2527 if test -n "$hardcode_libdir_flag_spec" || \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2528 test -n "$runpath_var"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2529
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2530 # We can hardcode non-existant directories.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2531 if test "$hardcode_direct" != no &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2532 # If the only mechanism to avoid hardcoding is shlibpath_var, we
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2533 # have to relink, otherwise we might link with an installed library
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2534 # when we should be linking with a yet-to-be-installed one
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2535 ## test "$hardcode_shlibpath_var" != no &&
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2536 test "$hardcode_minus_L" != no; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2537 # Linking always hardcodes the temporary library directory.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2538 hardcode_action=relink
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2539 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2540 # We can link without hardcoding, and we can hardcode nonexisting dirs.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2541 hardcode_action=immediate
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2542 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2543 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2544 # We cannot hardcode anything, or else we can only hardcode existing
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2545 # directories.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2546 hardcode_action=unsupported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2547 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2548 AC_MSG_RESULT([$hardcode_action])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2549 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2550 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2551
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2552 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2553 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2554 striplib=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2555 old_striplib=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2556 AC_MSG_CHECKING([whether stripping libraries is possible])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2557 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2558 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2559 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2560 AC_MSG_RESULT([yes])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2561 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2562 AC_MSG_RESULT([no])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2563 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2564 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2565 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2566
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2567 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2568 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2569
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2570 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2571 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2572 # PORTME Fill in your ld.so characteristics
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2573 AC_MSG_CHECKING([dynamic linker characteristics])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2574 library_names_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2575 libname_spec='lib$name'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2576 soname_spec=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2577 postinstall_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2578 postuninstall_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2579 finish_cmds=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2580 finish_eval=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2581 shlibpath_var=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2582 shlibpath_overrides_runpath=unknown
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2583 version_type=none
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2584 dynamic_linker="$host_os ld.so"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2585 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2586 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2587
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2588 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2589 aix3*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2590 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2591 library_names_spec='${libname}${release}.so$versuffix $libname.a'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2592 shlibpath_var=LIBPATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2593
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2594 # AIX has no versioning support, so we append a major version to the name.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2595 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2596 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2597
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2598 aix4* | aix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2599 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2600 if test "$host_cpu" = ia64; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2601 # AIX 5 supports IA64
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2602 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2603 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2604 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2605 # With GCC up to 2.95.x, collect2 would create an import file
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2606 # for dependence libraries. The import file would start with
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2607 # the line `#! .'. This would cause the generated library to
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2608 # depend on `.', always an invalid library. This was fixed in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2609 # development snapshots of GCC prior to 3.0.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2610 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2611 aix4 | aix4.[[01]] | aix4.[[01]].*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2612 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2613 echo ' yes '
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2614 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2615 :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2616 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2617 can_build_shared=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2618 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2619 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2620 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2621 # AIX (on Power*) has no versioning support, so currently we can
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2622 # not hardcode correct soname into executable. Probably we can
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2623 # add versioning support to collect2, so additional links can
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2624 # be useful in future.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2625 if test "$aix_use_runtimelinking" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2626 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2627 # instead of lib<name>.a to let people know that these are not
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2628 # typical AIX shared libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2629 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2630 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2631 # We preserve .a as extension for shared libraries through AIX4.2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2632 # and later when we are not doing run time linking.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2633 library_names_spec='${libname}${release}.a $libname.a'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2634 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2635 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2636 shlibpath_var=LIBPATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2637 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2638 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2639
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2640 amigaos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2641 library_names_spec='$libname.ixlibrary $libname.a'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2642 # Create ${libname}_ixlibrary.a entries in /sys/libs.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2643 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2644 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2645
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2646 beos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2647 library_names_spec='${libname}.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2648 dynamic_linker="$host_os ld.so"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2649 shlibpath_var=LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2650 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2651
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2652 bsdi4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2653 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2654 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2655 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2656 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2657 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2658 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2659 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2660 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2661 export_dynamic_flag_spec=-rdynamic
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2662 # the default ld.so.conf also contains /usr/contrib/lib and
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2663 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2664 # libtool to hard-code these into programs
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2665 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2666
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2667 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2668 version_type=windows
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2669 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2670 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2671 case $GCC,$host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2672 yes,cygwin*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2673 library_names_spec='$libname.dll.a'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2674 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2675 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2676 dldir=$destdir/`dirname \$dlpath`~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2677 test -d \$dldir || mkdir -p \$dldir~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2678 $install_prog .libs/$dlname \$dldir/$dlname'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2679 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2680 dlpath=$dir/\$dldll~
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2681 $rm \$dlpath'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2682 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2683 yes,mingw*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2684 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2685 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2686 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2687 yes,pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2688 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2689 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2690 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2691 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2692 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2693 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2694 dynamic_linker='Win32 ld.exe'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2695 # FIXME: first we should search . and the directory the executable is in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2696 shlibpath_var=PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2697 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2698
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2699 darwin* | rhapsody*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2700 dynamic_linker="$host_os dyld"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2701 version_type=darwin
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2702 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2703 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2704 # FIXME: Relying on posixy $() will cause problems for
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2705 # cross-compilation, but unfortunately the echo tests do not
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2706 # yet detect zsh echo's removal of \ escapes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2707 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2708 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2709 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2710 shlibpath_var=DYLD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2711 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2712
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2713 freebsd1*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2714 dynamic_linker=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2715 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2716
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2717 freebsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2718 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2719 version_type=freebsd-$objformat
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2720 case $version_type in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2721 freebsd-elf*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2722 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2723 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2724 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2725 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2726 freebsd-*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2727 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2728 need_version=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2729 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2730 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2731 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2732 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2733 freebsd2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2734 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2735 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2736 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2737 shlibpath_overrides_runpath=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2738 hardcode_into_libs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2739 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2740 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2741 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2742
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2743 gnu*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2744 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2745 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2746 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2747 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2748 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2749 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2750 hardcode_into_libs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2751 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2752
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2753 hpux9* | hpux10* | hpux11*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2754 # Give a soname corresponding to the major version so that dld.sl refuses to
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2755 # link against other versions.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2756 dynamic_linker="$host_os dld.sl"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2757 version_type=sunos
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2758 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2759 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2760 shlibpath_var=SHLIB_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2761 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2762 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2763 soname_spec='${libname}${release}.sl$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2764 # HP-UX runs *really* slowly unless shared libraries are mode 555.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2765 postinstall_cmds='chmod 555 $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2766 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2767
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2768 irix5* | irix6*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2769 version_type=irix
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2770 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2771 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2772 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2773 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2774 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2775 irix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2776 libsuff= shlibsuff=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2777 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2778 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2779 case $LD in # libtool.m4 will add one of these switches to LD
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2780 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2781 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2782 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2783 *) libsuff= shlibsuff= libmagic=never-match;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2784 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2785 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2786 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2787 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2788 shlibpath_overrides_runpath=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2789 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2790 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2791 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2792
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2793 # No shared lib support for Linux oldld, aout, or coff.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2794 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2795 dynamic_linker=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2796 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2797
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2798 # This must be Linux ELF.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2799 linux-gnu*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2800 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2801 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2802 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2803 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2804 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2805 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2806 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2807 shlibpath_overrides_runpath=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2808 # This implies no fast_install, which is unacceptable.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2809 # Some rework will be needed to allow for fast_install
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2810 # before this can be enabled.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2811 hardcode_into_libs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2812
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2813 # We used to test for /lib/ld.so.1 and disable shared libraries on
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2814 # powerpc, because MkLinux only supported shared libraries with the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2815 # GNU dynamic linker. Since this was broken with cross compilers,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2816 # most powerpc-linux boxes support dynamic linking these days and
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2817 # people can always --disable-shared, the test was removed, and we
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2818 # assume the GNU/Linux dynamic linker is in use.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2819 dynamic_linker='GNU/Linux ld.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2820 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2821
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2822 netbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2823 version_type=sunos
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2824 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2825 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2826 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2827 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2828 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2829 dynamic_linker='NetBSD (a.out) ld.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2830 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2831 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2832 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2833 dynamic_linker='NetBSD ld.elf_so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2834 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2835 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2836 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2837 hardcode_into_libs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2838 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2839
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2840 newsos6)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2841 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2842 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2843 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2844 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2845 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2846
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2847 openbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2848 version_type=sunos
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2849 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2850 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2851 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2852 case "$host_os" in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2853 openbsd2.[[89]] | openbsd2.[[89]].*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2854 shlibpath_overrides_runpath=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2855 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2856 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2857 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2858 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2859 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2860 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2861 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2862 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2863 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2864 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2865 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2866 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2867
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2868 os2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2869 libname_spec='$name'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2870 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2871 library_names_spec='$libname.dll $libname.a'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2872 dynamic_linker='OS/2 ld.exe'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2873 shlibpath_var=LIBPATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2874 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2875
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2876 osf3* | osf4* | osf5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2877 version_type=osf
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2878 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2879 soname_spec='${libname}${release}.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2880 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2881 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2882 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2883 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2884 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2885
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2886 sco3.2v5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2887 version_type=osf
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2888 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2889 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2890 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2891 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2892
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2893 solaris*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2894 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2895 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2896 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2897 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2898 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2899 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2900 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2901 hardcode_into_libs=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2902 # ldd complains unless libraries are executable
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2903 postinstall_cmds='chmod +x $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2904 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2905
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2906 sunos4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2907 version_type=sunos
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2908 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2909 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2910 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2911 shlibpath_overrides_runpath=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2912 if test "$with_gnu_ld" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2913 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2914 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2915 need_version=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2916 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2917
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2918 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2919 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2920 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2921 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2922 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2923 case $host_vendor in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2924 sni)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2925 shlibpath_overrides_runpath=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2926 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2927 motorola)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2928 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2929 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2930 shlibpath_overrides_runpath=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2931 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2932 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2933 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2934 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2935
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2936 uts4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2937 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2938 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2939 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2940 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2941 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2942
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2943 dgux*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2944 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2945 need_lib_prefix=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2946 need_version=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2947 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2948 soname_spec='${libname}${release}.so$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2949 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2950 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2951
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2952 sysv4*MP*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2953 if test -d /usr/nec ;then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2954 version_type=linux
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2955 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2956 soname_spec='$libname.so.$major'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2957 shlibpath_var=LD_LIBRARY_PATH
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2958 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2959 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2960
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2961 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2962 dynamic_linker=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2963 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2964 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2965 AC_MSG_RESULT([$dynamic_linker])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2966 test "$dynamic_linker" = no && can_build_shared=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2967 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2968 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2969
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2970 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2971 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2972 # Report the final consequences.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2973 AC_MSG_CHECKING([if libtool supports shared libraries])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2974 AC_MSG_RESULT([$can_build_shared])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2975 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2976 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2977
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2978 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2979 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2980 AC_MSG_CHECKING([whether to build shared libraries])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2981 test "$can_build_shared" = "no" && enable_shared=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2982
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2983 # On AIX, shared libraries and static libraries use the same namespace, and
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2984 # are all built from PIC.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2985 case "$host_os" in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2986 aix3*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2987 test "$enable_shared" = yes && enable_static=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2988 if test -n "$RANLIB"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2989 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2990 postinstall_cmds='$RANLIB $lib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2991 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2992 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2993
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2994 aix4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2995 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2996 test "$enable_shared" = yes && enable_static=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2997 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2998 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
2999 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3000 AC_MSG_RESULT([$enable_shared])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3001 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3002 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3003
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3004 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3005 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3006 AC_MSG_CHECKING([whether to build static libraries])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3007 # Make sure either enable_shared or enable_static is yes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3008 test "$enable_shared" = yes || enable_static=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3009 AC_MSG_RESULT([$enable_static])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3010 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3011 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3012
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3013 if test "$hardcode_action" = relink; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3014 # Fast installation is not supported
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3015 enable_fast_install=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3016 elif test "$shlibpath_overrides_runpath" = yes ||
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3017 test "$enable_shared" = no; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3018 # Fast installation is not necessary
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3019 enable_fast_install=needless
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3020 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3021
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3022 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3023 if test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3024 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3025 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3026
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3027 AC_LIBTOOL_DLOPEN_SELF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3028
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3029 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3030 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3031 if test "$enable_shared" = yes && test "$GCC" = yes; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3032 case $archive_cmds in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3033 *'~'*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3034 # FIXME: we may have to deal with multi-command sequences.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3035 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3036 '$CC '*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3037 # Test whether the compiler implicitly links with -lc since on some
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3038 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3039 # to ld, don't add -lc before -lgcc.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3040 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3041 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3042 [$rm conftest*
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3043 echo 'static int dummy;' > conftest.$ac_ext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3044
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3045 if AC_TRY_EVAL(ac_compile); then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3046 soname=conftest
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3047 lib=conftest
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3048 libobjs=conftest.$ac_objext
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3049 deplibs=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3050 wl=$lt_cv_prog_cc_wl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3051 compiler_flags=-v
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3052 linker_flags=-v
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3053 verstring=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3054 output_objdir=.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3055 libname=conftest
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3056 save_allow_undefined_flag=$allow_undefined_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3057 allow_undefined_flag=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3058 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3059 then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3060 lt_cv_archive_cmds_need_lc=no
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3061 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3062 lt_cv_archive_cmds_need_lc=yes
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3063 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3064 allow_undefined_flag=$save_allow_undefined_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3065 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3066 cat conftest.err 1>&5
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3067 fi])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3068 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3069 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3070 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3071 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3072 need_lc=${lt_cv_archive_cmds_need_lc-yes}
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3073 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3074 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3075
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3076 ## FIXME: this should be a separate macro
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3077 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3078 # The second clause should only fire when bootstrapping the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3079 # libtool distribution, otherwise you forgot to ship ltmain.sh
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3080 # with your package, and you will get complaints that there are
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3081 # no rules to generate ltmain.sh.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3082 if test -f "$ltmain"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3083 :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3084 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3085 # If there is no Makefile yet, we rely on a make rule to execute
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3086 # `config.status --recheck' to rerun these tests and create the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3087 # libtool script then.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3088 test -f Makefile && make "$ltmain"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3089 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3090
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3091 if test -f "$ltmain"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3092 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3093 $rm -f "${ofile}T"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3094
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3095 echo creating $ofile
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3096
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3097 # Now quote all the things that may contain metacharacters while being
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3098 # careful not to overquote the AC_SUBSTed values. We take copies of the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3099 # variables and quote the copies for generation of the libtool script.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3100 for var in echo old_CC old_CFLAGS \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3101 AR AR_FLAGS CC LD LN_S NM SHELL \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3102 reload_flag reload_cmds wl \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3103 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3104 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3105 library_names_spec soname_spec \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3106 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3107 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3108 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3109 old_striplib striplib file_magic_cmd export_symbols_cmds \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3110 deplibs_check_method allow_undefined_flag no_undefined_flag \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3111 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3112 global_symbol_to_c_name_address \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3113 hardcode_libdir_flag_spec hardcode_libdir_separator \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3114 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3115 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3116
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3117 case $var in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3118 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3119 old_postinstall_cmds | old_postuninstall_cmds | \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3120 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3121 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3122 postinstall_cmds | postuninstall_cmds | \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3123 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3124 # Double-quote double-evaled strings.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3125 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3126 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3127 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3128 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3129 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3130 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3131 done
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3132
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3133 cat <<__EOF__ > "${ofile}T"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3134 #! $SHELL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3135
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3136 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3137 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3138 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3139 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3140 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3141 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3142 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3143 # This program is free software; you can redistribute it and/or modify
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3144 # it under the terms of the GNU General Public License as published by
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3145 # the Free Software Foundation; either version 2 of the License, or
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3146 # (at your option) any later version.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3147 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3148 # This program is distributed in the hope that it will be useful, but
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3149 # WITHOUT ANY WARRANTY; without even the implied warranty of
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3150 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3151 # General Public License for more details.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3152 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3153 # You should have received a copy of the GNU General Public License
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3154 # along with this program; if not, write to the Free Software
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3155 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3156 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3157 # As a special exception to the GNU General Public License, if you
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3158 # distribute this file as part of a program that contains a
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3159 # configuration script generated by Autoconf, you may include it under
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3160 # the same distribution terms that you use for the rest of that program.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3161
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3162 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3163 Xsed="sed -e s/^X//"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3164
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3165 # The HP-UX ksh and POSIX shell print the target directory to stdout
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3166 # if CDPATH is set.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3167 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3168
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3169 # ### BEGIN LIBTOOL CONFIG
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3170
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3171 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3172
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3173 # Shell to use when invoking shell scripts.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3174 SHELL=$lt_SHELL
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3175
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3176 # Whether or not to build shared libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3177 build_libtool_libs=$enable_shared
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3178
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3179 # Whether or not to build static libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3180 build_old_libs=$enable_static
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3181
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3182 # Whether or not to add -lc for building shared libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3183 build_libtool_need_lc=$need_lc
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3184
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3185 # Whether or not to optimize for fast installation.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3186 fast_install=$enable_fast_install
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3187
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3188 # The host system.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3189 host_alias=$host_alias
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3190 host=$host
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3191
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3192 # An echo program that does not interpret backslashes.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3193 echo=$lt_echo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3194
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3195 # The archiver.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3196 AR=$lt_AR
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3197 AR_FLAGS=$lt_AR_FLAGS
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3198
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3199 # The default C compiler.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3200 CC=$lt_CC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3201
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3202 # Is the compiler the GNU C compiler?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3203 with_gcc=$GCC
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3204
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3205 # The linker used to build libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3206 LD=$lt_LD
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3207
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3208 # Whether we need hard or soft links.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3209 LN_S=$lt_LN_S
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3210
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3211 # A BSD-compatible nm program.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3212 NM=$lt_NM
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3213
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3214 # A symbol stripping program
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3215 STRIP=$STRIP
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3216
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3217 # Used to examine libraries when file_magic_cmd begins "file"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3218 MAGIC_CMD=$MAGIC_CMD
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3219
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3220 # Used on cygwin: DLL creation program.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3221 DLLTOOL="$DLLTOOL"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3222
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3223 # Used on cygwin: object dumper.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3224 OBJDUMP="$OBJDUMP"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3225
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3226 # Used on cygwin: assembler.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3227 AS="$AS"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3228
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3229 # The name of the directory that contains temporary libtool files.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3230 objdir=$objdir
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3231
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3232 # How to create reloadable object files.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3233 reload_flag=$lt_reload_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3234 reload_cmds=$lt_reload_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3235
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3236 # How to pass a linker flag through the compiler.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3237 wl=$lt_wl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3238
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3239 # Object file suffix (normally "o").
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3240 objext="$ac_objext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3241
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3242 # Old archive suffix (normally "a").
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3243 libext="$libext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3244
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3245 # Executable file suffix (normally "").
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3246 exeext="$exeext"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3247
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3248 # Additional compiler flags for building library objects.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3249 pic_flag=$lt_pic_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3250 pic_mode=$pic_mode
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3251
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3252 # Does compiler simultaneously support -c and -o options?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3253 compiler_c_o=$lt_compiler_c_o
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3254
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3255 # Can we write directly to a .lo ?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3256 compiler_o_lo=$lt_compiler_o_lo
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3257
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3258 # Must we lock files when doing compilation ?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3259 need_locks=$lt_need_locks
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3260
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3261 # Do we need the lib prefix for modules?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3262 need_lib_prefix=$need_lib_prefix
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3263
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3264 # Do we need a version for libraries?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3265 need_version=$need_version
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3266
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3267 # Whether dlopen is supported.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3268 dlopen_support=$enable_dlopen
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3269
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3270 # Whether dlopen of programs is supported.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3271 dlopen_self=$enable_dlopen_self
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3272
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3273 # Whether dlopen of statically linked programs is supported.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3274 dlopen_self_static=$enable_dlopen_self_static
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3275
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3276 # Compiler flag to prevent dynamic linking.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3277 link_static_flag=$lt_link_static_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3278
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3279 # Compiler flag to turn off builtin functions.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3280 no_builtin_flag=$lt_no_builtin_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3281
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3282 # Compiler flag to allow reflexive dlopens.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3283 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3284
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3285 # Compiler flag to generate shared objects directly from archives.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3286 whole_archive_flag_spec=$lt_whole_archive_flag_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3287
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3288 # Compiler flag to generate thread-safe objects.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3289 thread_safe_flag_spec=$lt_thread_safe_flag_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3290
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3291 # Library versioning type.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3292 version_type=$version_type
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3293
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3294 # Format of library name prefix.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3295 libname_spec=$lt_libname_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3296
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3297 # List of archive names. First name is the real one, the rest are links.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3298 # The last name is the one that the linker finds with -lNAME.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3299 library_names_spec=$lt_library_names_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3300
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3301 # The coded name of the library, if different from the real name.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3302 soname_spec=$lt_soname_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3303
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3304 # Commands used to build and install an old-style archive.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3305 RANLIB=$lt_RANLIB
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3306 old_archive_cmds=$lt_old_archive_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3307 old_postinstall_cmds=$lt_old_postinstall_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3308 old_postuninstall_cmds=$lt_old_postuninstall_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3309
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3310 # Create an old-style archive from a shared archive.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3311 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3312
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3313 # Create a temporary old-style archive to link instead of a shared archive.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3314 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3315
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3316 # Commands used to build and install a shared archive.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3317 archive_cmds=$lt_archive_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3318 archive_expsym_cmds=$lt_archive_expsym_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3319 postinstall_cmds=$lt_postinstall_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3320 postuninstall_cmds=$lt_postuninstall_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3321
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3322 # Commands to strip libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3323 old_striplib=$lt_old_striplib
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3324 striplib=$lt_striplib
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3325
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3326 # Method to check whether dependent libraries are shared objects.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3327 deplibs_check_method=$lt_deplibs_check_method
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3328
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3329 # Command to use when deplibs_check_method == file_magic.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3330 file_magic_cmd=$lt_file_magic_cmd
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3331
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3332 # Flag that allows shared libraries with undefined symbols to be built.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3333 allow_undefined_flag=$lt_allow_undefined_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3334
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3335 # Flag that forces no undefined symbols.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3336 no_undefined_flag=$lt_no_undefined_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3337
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3338 # Commands used to finish a libtool library installation in a directory.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3339 finish_cmds=$lt_finish_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3340
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3341 # Same as above, but a single script fragment to be evaled but not shown.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3342 finish_eval=$lt_finish_eval
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3343
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3344 # Take the output of nm and produce a listing of raw symbols and C names.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3345 global_symbol_pipe=$lt_global_symbol_pipe
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3346
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3347 # Transform the output of nm in a proper C declaration
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3348 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3349
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3350 # Transform the output of nm in a C name address pair
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3351 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3352
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3353 # This is the shared library runtime path variable.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3354 runpath_var=$runpath_var
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3355
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3356 # This is the shared library path variable.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3357 shlibpath_var=$shlibpath_var
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3358
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3359 # Is shlibpath searched before the hard-coded library search path?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3360 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3361
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3362 # How to hardcode a shared library path into an executable.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3363 hardcode_action=$hardcode_action
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3364
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3365 # Whether we should hardcode library paths into libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3366 hardcode_into_libs=$hardcode_into_libs
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3367
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3368 # Flag to hardcode \$libdir into a binary during linking.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3369 # This must work even if \$libdir does not exist.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3370 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3371
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3372 # Whether we need a single -rpath flag with a separated argument.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3373 hardcode_libdir_separator=$lt_hardcode_libdir_separator
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3374
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3375 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3376 # resulting binary.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3377 hardcode_direct=$hardcode_direct
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3378
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3379 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3380 # resulting binary.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3381 hardcode_minus_L=$hardcode_minus_L
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3382
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3383 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3384 # the resulting binary.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3385 hardcode_shlibpath_var=$hardcode_shlibpath_var
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3386
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3387 # Variables whose values should be saved in libtool wrapper scripts and
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3388 # restored at relink time.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3389 variables_saved_for_relink="$variables_saved_for_relink"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3390
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3391 # Whether libtool must link a program against all its dependency libraries.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3392 link_all_deplibs=$link_all_deplibs
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3393
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3394 # Compile-time system search path for libraries
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3395 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3396
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3397 # Run-time system search path for libraries
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3398 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3399
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3400 # Fix the shell variable \$srcfile for the compiler.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3401 fix_srcfile_path="$fix_srcfile_path"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3402
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3403 # Set to yes if exported symbols are required.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3404 always_export_symbols=$always_export_symbols
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3405
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3406 # The commands to list exported symbols.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3407 export_symbols_cmds=$lt_export_symbols_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3408
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3409 # The commands to extract the exported symbol list from a shared archive.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3410 extract_expsyms_cmds=$lt_extract_expsyms_cmds
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3411
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3412 # Symbols that should not be listed in the preloaded symbols.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3413 exclude_expsyms=$lt_exclude_expsyms
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3414
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3415 # Symbols that must always be exported.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3416 include_expsyms=$lt_include_expsyms
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3417
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3418 # ### END LIBTOOL CONFIG
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3419
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3420 __EOF__
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3421
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3422 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3423 aix3*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3424 cat <<\EOF >> "${ofile}T"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3425
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3426 # AIX sometimes has problems with the GCC collect2 program. For some
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3427 # reason, if we set the COLLECT_NAMES environment variable, the problems
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3428 # vanish in a puff of smoke.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3429 if test "X${COLLECT_NAMES+set}" != Xset; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3430 COLLECT_NAMES=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3431 export COLLECT_NAMES
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3432 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3433 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3434 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3435 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3436
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3437 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3438 cygwin* | mingw* | pw32* | os2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3439 cat <<'EOF' >> "${ofile}T"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3440 # This is a source program that is used to create dlls on Windows
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3441 # Don't remove nor modify the starting and closing comments
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3442 # /* ltdll.c starts here */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3443 # #define WIN32_LEAN_AND_MEAN
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3444 # #include <windows.h>
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3445 # #undef WIN32_LEAN_AND_MEAN
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3446 # #include <stdio.h>
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3447 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3448 # #ifndef __CYGWIN__
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3449 # # ifdef __CYGWIN32__
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3450 # # define __CYGWIN__ __CYGWIN32__
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3451 # # endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3452 # #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3453 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3454 # #ifdef __cplusplus
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3455 # extern "C" {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3456 # #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3457 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3458 # #ifdef __cplusplus
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3459 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3460 # #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3461 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3462 # #ifdef __CYGWIN__
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3463 # #include <cygwin/cygwin_dll.h>
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3464 # DECLARE_CYGWIN_DLL( DllMain );
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3465 # #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3466 # HINSTANCE __hDllInstance_base;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3467 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3468 # BOOL APIENTRY
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3469 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3470 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3471 # __hDllInstance_base = hInst;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3472 # return TRUE;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3473 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3474 # /* ltdll.c ends here */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3475 # This is a source program that is used to create import libraries
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3476 # on Windows for dlls which lack them. Don't remove nor modify the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3477 # starting and closing comments
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3478 # /* impgen.c starts here */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3479 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3480 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3481 # This file is part of GNU libtool.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3482 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3483 # This program is free software; you can redistribute it and/or modify
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3484 # it under the terms of the GNU General Public License as published by
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3485 # the Free Software Foundation; either version 2 of the License, or
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3486 # (at your option) any later version.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3487 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3488 # This program is distributed in the hope that it will be useful,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3489 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3490 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3491 # GNU General Public License for more details.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3492 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3493 # You should have received a copy of the GNU General Public License
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3494 # along with this program; if not, write to the Free Software
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3495 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3496 # */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3497 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3498 # #include <stdio.h> /* for printf() */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3499 # #include <unistd.h> /* for open(), lseek(), read() */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3500 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3501 # #include <string.h> /* for strdup() */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3502 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3503 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3504 # #ifndef O_BINARY
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3505 # #define O_BINARY 0
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3506 # #endif
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3507 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3508 # static unsigned int
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3509 # pe_get16 (fd, offset)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3510 # int fd;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3511 # int offset;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3512 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3513 # unsigned char b[2];
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3514 # lseek (fd, offset, SEEK_SET);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3515 # read (fd, b, 2);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3516 # return b[0] + (b[1]<<8);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3517 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3518 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3519 # static unsigned int
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3520 # pe_get32 (fd, offset)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3521 # int fd;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3522 # int offset;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3523 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3524 # unsigned char b[4];
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3525 # lseek (fd, offset, SEEK_SET);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3526 # read (fd, b, 4);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3527 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3528 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3529 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3530 # static unsigned int
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3531 # pe_as32 (ptr)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3532 # void *ptr;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3533 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3534 # unsigned char *b = ptr;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3535 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3536 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3537 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3538 # int
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3539 # main (argc, argv)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3540 # int argc;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3541 # char *argv[];
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3542 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3543 # int dll;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3544 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3545 # unsigned long export_rva, export_size, nsections, secptr, expptr;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3546 # unsigned long name_rvas, nexp;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3547 # unsigned char *expdata, *erva;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3548 # char *filename, *dll_name;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3549 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3550 # filename = argv[1];
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3551 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3552 # dll = open(filename, O_RDONLY|O_BINARY);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3553 # if (dll < 1)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3554 # return 1;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3555 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3556 # dll_name = filename;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3557 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3558 # for (i=0; filename[i]; i++)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3559 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3560 # dll_name = filename + i +1;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3561 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3562 # pe_header_offset = pe_get32 (dll, 0x3c);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3563 # opthdr_ofs = pe_header_offset + 4 + 20;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3564 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3565 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3566 # if (num_entries < 1) /* no exports */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3567 # return 1;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3568 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3569 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3570 # export_size = pe_get32 (dll, opthdr_ofs + 100);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3571 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3572 # secptr = (pe_header_offset + 4 + 20 +
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3573 # pe_get16 (dll, pe_header_offset + 4 + 16));
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3574 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3575 # expptr = 0;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3576 # for (i = 0; i < nsections; i++)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3577 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3578 # char sname[8];
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3579 # unsigned long secptr1 = secptr + 40 * i;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3580 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3581 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3582 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3583 # lseek(dll, secptr1, SEEK_SET);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3584 # read(dll, sname, 8);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3585 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3586 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3587 # expptr = fptr + (export_rva - vaddr);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3588 # if (export_rva + export_size > vaddr + vsize)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3589 # export_size = vsize - (export_rva - vaddr);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3590 # break;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3591 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3592 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3593 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3594 # expdata = (unsigned char*)malloc(export_size);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3595 # lseek (dll, expptr, SEEK_SET);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3596 # read (dll, expdata, export_size);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3597 # erva = expdata - export_rva;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3598 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3599 # nexp = pe_as32 (expdata+24);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3600 # name_rvas = pe_as32 (expdata+32);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3601 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3602 # printf ("EXPORTS\n");
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3603 # for (i = 0; i<nexp; i++)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3604 # {
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3605 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3606 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3607 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3608 #
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3609 # return 0;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3610 # }
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3611 # /* impgen.c ends here */
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3612
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3613 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3614 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3615 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3616
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3617 # We use sed instead of cat because bash on DJGPP gets confused if
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3618 # if finds mixed CR/LF and LF-only lines. Since sed operates in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3619 # text mode, it properly converts lines to CR/LF. This bash problem
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3620 # is reportedly fixed, but why not run on old versions too?
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3621 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3622
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3623 mv -f "${ofile}T" "$ofile" || \
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3624 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3625 chmod +x "$ofile"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3626 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3627 ##
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3628 ## END FIXME
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3629
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3630 ])# _LT_AC_LTCONFIG_HACK
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3631
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3632 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3633 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3634
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3635 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3636 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3637
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3638 # AC_ENABLE_SHARED - implement the --enable-shared flag
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3639 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3640 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3641 # `yes'.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3642 AC_DEFUN([AC_ENABLE_SHARED],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3643 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3644 AC_ARG_ENABLE(shared,
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3645 changequote(<<, >>)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3646 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3647 changequote([, ])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3648 [p=${PACKAGE-default}
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3649 case $enableval in
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3650 yes) enable_shared=yes ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3651 no) enable_shared=no ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3652 *)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3653 enable_shared=no
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3654 # Look at the argument we got. We use all the common list separators.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3655 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3656 for pkg in $enableval; do
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3657 if test "X$pkg" = "X$p"; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3658 enable_shared=yes
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3659 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3660 done
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3661 IFS="$ac_save_ifs"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3662 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3663 esac],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3664 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3665 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3666
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3667 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3668 AC_DEFUN([AC_DISABLE_SHARED],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3669 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3670 AC_ENABLE_SHARED(no)])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3671
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3672 # AC_ENABLE_STATIC - implement the --enable-static flag
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3673 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3674 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3675 # `yes'.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3676 AC_DEFUN([AC_ENABLE_STATIC],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3677 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3678 AC_ARG_ENABLE(static,
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3679 changequote(<<, >>)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3680 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3681 changequote([, ])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3682 [p=${PACKAGE-default}
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3683 case $enableval in
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3684 yes) enable_static=yes ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3685 no) enable_static=no ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3686 *)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3687 enable_static=no
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3688 # Look at the argument we got. We use all the common list separators.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3690 for pkg in $enableval; do
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3691 if test "X$pkg" = "X$p"; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3692 enable_static=yes
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3693 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3694 done
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3695 IFS="$ac_save_ifs"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3696 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3697 esac],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3698 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3699 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3700
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3701 # AC_DISABLE_STATIC - set the default static flag to --disable-static
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3702 AC_DEFUN([AC_DISABLE_STATIC],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3703 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3704 AC_ENABLE_STATIC(no)])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3705
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3706
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3707 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3708 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3709 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3710 # `yes'.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3711 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3712 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3713 AC_ARG_ENABLE(fast-install,
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3714 changequote(<<, >>)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3715 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3716 changequote([, ])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3717 [p=${PACKAGE-default}
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3718 case $enableval in
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3719 yes) enable_fast_install=yes ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3720 no) enable_fast_install=no ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3721 *)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3722 enable_fast_install=no
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3723 # Look at the argument we got. We use all the common list separators.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3725 for pkg in $enableval; do
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3726 if test "X$pkg" = "X$p"; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3727 enable_fast_install=yes
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3728 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3729 done
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3730 IFS="$ac_save_ifs"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3731 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3732 esac],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3733 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3734 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3735
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3736 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3737 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3738 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3739 AC_ENABLE_FAST_INSTALL(no)])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3740
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3741 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3742 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3743 # Where MODE is either `yes' or `no'. If omitted, it defaults to
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3744 # `both'.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3745 AC_DEFUN([AC_LIBTOOL_PICMODE],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3746 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3747 pic_mode=ifelse($#,1,$1,default)])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3748
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3749
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3750 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3751 AC_DEFUN([AC_PATH_TOOL_PREFIX],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3752 [AC_MSG_CHECKING([for $1])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3753 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3754 [case $MAGIC_CMD in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3755 /*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3756 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3757 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3758 ?:/*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3759 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3760 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3761 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3762 ac_save_MAGIC_CMD="$MAGIC_CMD"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3763 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3764 dnl $ac_dummy forces splitting on constant user-supplied paths.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3765 dnl POSIX.2 word splitting is done only on the output of word expansions,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3766 dnl not every word. This closes a longstanding sh security hole.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3767 ac_dummy="ifelse([$2], , $PATH, [$2])"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3768 for ac_dir in $ac_dummy; do
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3769 test -z "$ac_dir" && ac_dir=.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3770 if test -f $ac_dir/$1; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3771 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3772 if test -n "$file_magic_test_file"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3773 case $deplibs_check_method in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3774 "file_magic "*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3775 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3776 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3777 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3778 egrep "$file_magic_regex" > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3779 :
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3780 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3781 cat <<EOF 1>&2
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3782
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3783 *** Warning: the command libtool uses to detect shared libraries,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3784 *** $file_magic_cmd, produces output that libtool cannot recognize.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3785 *** The result is that libtool may fail to recognize shared libraries
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3786 *** as such. This will affect the creation of libtool libraries that
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3787 *** depend on shared libraries, but programs linked with such libtool
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3788 *** libraries will work regardless of this problem. Nevertheless, you
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3789 *** may want to report the problem to your system manager and/or to
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3790 *** bug-libtool@gnu.org
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3791
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3792 EOF
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3793 fi ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3794 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3795 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3796 break
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3797 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3798 done
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3799 IFS="$ac_save_ifs"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3800 MAGIC_CMD="$ac_save_MAGIC_CMD"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3801 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3802 esac])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3803 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3804 if test -n "$MAGIC_CMD"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3805 AC_MSG_RESULT($MAGIC_CMD)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3806 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3807 AC_MSG_RESULT(no)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3808 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3809 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3810
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3811
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3812 # AC_PATH_MAGIC - find a file program which can recognise a shared library
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3813 AC_DEFUN([AC_PATH_MAGIC],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3814 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3815 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3816 if test -z "$lt_cv_path_MAGIC_CMD"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3817 if test -n "$ac_tool_prefix"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3818 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3819 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3820 MAGIC_CMD=:
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3821 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3822 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3823 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3824
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3825
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3826 # AC_PROG_LD - find the path to the GNU or non-GNU linker
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3827 AC_DEFUN([AC_PROG_LD],
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3828 [AC_ARG_WITH(gnu-ld,
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3829 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3830 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3831 AC_REQUIRE([AC_PROG_CC])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3832 AC_REQUIRE([AC_CANONICAL_HOST])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3833 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3834 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3835 ac_prog=ld
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3836 if test "$GCC" = yes; then
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3837 # Check if gcc -print-prog-name=ld gives a path.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3838 AC_MSG_CHECKING([for ld used by GCC])
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3839 case $host in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3840 *-*-mingw*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3841 # gcc leaves a trailing carriage return which upsets mingw
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3842 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3843 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3844 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3845 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3846 case $ac_prog in
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3847 # Accept absolute paths.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3848 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3849 re_direlt='/[[^/]][[^/]]*/\.\./'
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3850 # Canonicalize the path of ld
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3851 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3852 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3853 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3854 done
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3855 test -z "$LD" && LD="$ac_prog"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3856 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3857 "")
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3858 # If it fails, then pretend we aren't using GCC.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3859 ac_prog=ld
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3860 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3861 *)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3862 # If it is relative, then search for the first ld in PATH.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3863 with_gnu_ld=unknown
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3864 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3865 esac
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3866 elif test "$with_gnu_ld" = yes; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3867 AC_MSG_CHECKING([for GNU ld])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3868 else
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3869 AC_MSG_CHECKING([for non-GNU ld])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3870 fi
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3871 AC_CACHE_VAL(lt_cv_path_LD,
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3872 [if test -z "$LD"; then
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3873 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3874 for ac_dir in $PATH; do
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3875 test -z "$ac_dir" && ac_dir=.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3876 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3877 lt_cv_path_LD="$ac_dir/$ac_prog"
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3878 # Check to see if the program is GNU ld. I'd rather use --version,
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3879 # but apparently some GNU ld's only accept -v.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3880 # Break only if it was the GNU/non-GNU ld that we prefer.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3881 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3882 test "$with_gnu_ld" != no && break
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3883 else
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3884 test "$with_gnu_ld" != yes && break
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3885 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3886 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3887 done
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3888 IFS="$ac_save_ifs"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3889 else
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3890 lt_cv_path_LD="$LD" # Let the user override the test with a path.
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3891 fi])
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3892 LD="$lt_cv_path_LD"
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3893 if test -n "$LD"; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3894 AC_MSG_RESULT($LD)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3895 else
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3896 AC_MSG_RESULT(no)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3897 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3898 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3899 AC_PROG_LD_GNU
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3900 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3901
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3902 # AC_PROG_LD_GNU -
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3903 AC_DEFUN([AC_PROG_LD_GNU],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3904 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3905 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3906 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3907 lt_cv_prog_gnu_ld=yes
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3908 else
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3909 lt_cv_prog_gnu_ld=no
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3910 fi])
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3911 with_gnu_ld=$lt_cv_prog_gnu_ld
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3912 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
3913
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3914 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3915 # -- PORTME Some linkers may need a different reload flag.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3916 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3917 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3918 [lt_cv_ld_reload_flag='-r'])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3919 reload_flag=$lt_cv_ld_reload_flag
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3920 test -n "$reload_flag" && reload_flag=" $reload_flag"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3921 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3922
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3923 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3924 # -- PORTME fill in with the dynamic library characteristics
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3925 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3926 [AC_CACHE_CHECK([how to recognise dependant libraries],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3927 lt_cv_deplibs_check_method,
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3928 [lt_cv_file_magic_cmd='$MAGIC_CMD'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3929 lt_cv_file_magic_test_file=
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3930 lt_cv_deplibs_check_method='unknown'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3931 # Need to set the preceding variable on all platforms that support
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3932 # interlibrary dependencies.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3933 # 'none' -- dependencies not supported.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3934 # `unknown' -- same as none, but documents that we really don't know.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3935 # 'pass_all' -- all dependencies passed with no checks.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3936 # 'test_compile' -- check by making test program.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3937 # 'file_magic [[regex]]' -- check by looking for files in library path
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3938 # which responds to the $file_magic_cmd with a given egrep regex.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3939 # If you have `file' or equivalent on your system and you're not sure
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3940 # whether `pass_all' will *always* work, you probably want this one.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3941
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3942 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3943 aix4* | aix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3944 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3945 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3946
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3947 beos*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3948 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3949 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3950
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3951 bsdi4*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3952 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3953 lt_cv_file_magic_cmd='/usr/bin/file -L'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3954 lt_cv_file_magic_test_file=/shlib/libc.so
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3955 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3956
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3957 cygwin* | mingw* | pw32*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3958 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3959 lt_cv_file_magic_cmd='$OBJDUMP -f'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3960 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3961
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3962 darwin* | rhapsody*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3963 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3964 lt_cv_file_magic_cmd='/usr/bin/file -L'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3965 case "$host_os" in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3966 rhapsody* | darwin1.[[012]])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3967 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3968 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3969 *) # Darwin 1.3 on
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3970 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3971 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3972 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3973 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3974
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3975 freebsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3976 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3977 case $host_cpu in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3978 i*86 )
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3979 # Not sure whether the presence of OpenBSD here was a mistake.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3980 # Let's accept both of them until this is cleared up.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3981 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3982 lt_cv_file_magic_cmd=/usr/bin/file
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3983 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3984 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3985 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3986 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3987 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3988 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3989 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3990
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3991 gnu*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3992 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3993 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3994
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3995 hpux10.20*|hpux11*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3996 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3997 lt_cv_file_magic_cmd=/usr/bin/file
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3998 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
3999 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4000
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4001 irix5* | irix6*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4002 case $host_os in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4003 irix5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4004 # this will be overridden with pass_all, but let us keep it just in case
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4005 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4006 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4007 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4008 case $LD in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4009 *-32|*"-32 ") libmagic=32-bit;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4010 *-n32|*"-n32 ") libmagic=N32;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4011 *-64|*"-64 ") libmagic=64-bit;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4012 *) libmagic=never-match;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4013 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4014 # this will be overridden with pass_all, but let us keep it just in case
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4015 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4016 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4017 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4018 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4019 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4020 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4021
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4022 # This must be Linux ELF.
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4023 linux-gnu*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4024 case $host_cpu in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4025 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4026 lt_cv_deplibs_check_method=pass_all ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4027 *)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4028 # glibc up to 2.1.1 does not perform some relocations on ARM
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4029 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4030 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4031 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4032 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4033
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4034 netbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4035 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4036 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4037 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4038 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4039 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4040 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4041
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4042 newos6*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4043 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4044 lt_cv_file_magic_cmd=/usr/bin/file
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4045 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4046 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4047
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4048 openbsd*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4049 lt_cv_file_magic_cmd=/usr/bin/file
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4050 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4051 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4052 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4053 else
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4054 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4055 fi
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4056 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4057
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4058 osf3* | osf4* | osf5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4059 # this will be overridden with pass_all, but let us keep it just in case
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4060 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4061 lt_cv_file_magic_test_file=/shlib/libc.so
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4062 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4063 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4064
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4065 sco3.2v5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4066 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4067 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4068
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4069 solaris*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4070 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4071 lt_cv_file_magic_test_file=/lib/libc.so
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4072 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4073
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4074 sysv5uw[[78]]* | sysv4*uw2*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4075 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4076 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4077
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4078 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4079 case $host_vendor in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4080 motorola)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4081 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4082 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4083 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4084 ncr)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4085 lt_cv_deplibs_check_method=pass_all
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4086 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4087 sequent)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4088 lt_cv_file_magic_cmd='/bin/file'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4089 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4090 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4091 sni)
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4092 lt_cv_file_magic_cmd='/bin/file'
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4093 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4094 lt_cv_file_magic_test_file=/lib/libc.so
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4095 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4096 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4097 ;;
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4098 esac
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4099 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4100 file_magic_cmd=$lt_cv_file_magic_cmd
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4101 deplibs_check_method=$lt_cv_deplibs_check_method
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4102 ])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4103
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4104
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4105 # AC_PROG_NM - find the path to a BSD-compatible name lister
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4106 AC_DEFUN([AC_PROG_NM],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4107 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4108 AC_MSG_CHECKING([for BSD-compatible nm])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4109 AC_CACHE_VAL(lt_cv_path_NM,
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4110 [if test -n "$NM"; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4111 # Let the user override the test.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4112 lt_cv_path_NM="$NM"
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4113 else
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4114 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4115 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4116 test -z "$ac_dir" && ac_dir=.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4117 tmp_nm=$ac_dir/${ac_tool_prefix}nm
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4118 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4119 # Check to see if the nm accepts a BSD-compat flag.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4120 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4121 # nm: unknown option "B" ignored
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4122 # Tru64's nm complains that /dev/null is an invalid object file
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4123 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4124 lt_cv_path_NM="$tmp_nm -B"
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4125 break
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4126 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4127 lt_cv_path_NM="$tmp_nm -p"
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4128 break
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4129 else
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4130 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4131 continue # so that we can try to find one that supports BSD flags
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4132 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4133 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4134 done
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4135 IFS="$ac_save_ifs"
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4136 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4137 fi])
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4138 NM="$lt_cv_path_NM"
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4139 AC_MSG_RESULT([$NM])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4140 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4141
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4142 # AC_CHECK_LIBM - check for math library
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4143 AC_DEFUN([AC_CHECK_LIBM],
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4144 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4145 LIBM=
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4146 case $host in
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4147 *-*-beos* | *-*-cygwin* | *-*-pw32*)
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4148 # These system don't have libm
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4149 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4150 *-ncr-sysv4.3*)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4151 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4152 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4153 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4154 *)
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4155 AC_CHECK_LIB(m, main, LIBM="-lm")
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4156 ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4157 esac
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4158 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4159
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4160 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4161 # the libltdl convenience library and INCLTDL to the include flags for
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4162 # the libltdl header and adds --enable-ltdl-convenience to the
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4163 # configure arguments. Note that LIBLTDL and INCLTDL are not
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4164 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4165 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4166 # with '${top_builddir}/' and INCLTDL will be prefixed with
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4167 # '${top_srcdir}/' (note the single quotes!). If your package is not
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4168 # flat and you're not using automake, define top_builddir and
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4169 # top_srcdir appropriately in the Makefiles.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4170 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4171 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4172 case $enable_ltdl_convenience in
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4173 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4174 "") enable_ltdl_convenience=yes
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4175 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4176 esac
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4177 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4178 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4179 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4180
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4181 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4182 # the libltdl installable library and INCLTDL to the include flags for
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4183 # the libltdl header and adds --enable-ltdl-install to the configure
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4184 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4185 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4186 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4187 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4188 # with '${top_srcdir}/' (note the single quotes!). If your package is
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4189 # not flat and you're not using automake, define top_builddir and
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4190 # top_srcdir appropriately in the Makefiles.
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4191 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4192 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4193 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
73
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4194 AC_CHECK_LIB(ltdl, main,
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4195 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4196 [if test x"$enable_ltdl_install" = xno; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4197 AC_MSG_WARN([libltdl not installed, but installation disabled])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4198 else
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4199 enable_ltdl_install=yes
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4200 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4201 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4202 if test x"$enable_ltdl_install" = x"yes"; then
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4203 ac_configure_args="$ac_configure_args --enable-ltdl-install"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4204 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4205 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4206 else
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4207 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4208 LIBLTDL="-lltdl"
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4209 INCLTDL=
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4210 fi
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4211 ])
72b51548aeca Added libtool stuff.
Ryan C. Gordon <icculus@icculus.org>
parents: 68
diff changeset
4212
440
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4213 # old names
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4214 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4215 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4216 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4217 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4218 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4219 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4220 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4221
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4222 # This is just to silence aclocal about the macro not being used
6d94441c854e Fixed (I hope!) some libtool problems.
Ryan C. Gordon <icculus@icculus.org>
parents: 73
diff changeset
4223 ifelse([AC_DISABLE_FAST_INSTALL])