annotate aclocal.m4 @ 302:9eafb594e353 r21-0b49

Import from CVS: tag r21-0b49
author cvs
date Mon, 13 Aug 2007 10:40:49 +0200
parents 8efd647ea9ca
children aabb7f5b1c81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
1 dnl aclocal.m4 --- Dynamically linked library support for XEmacs
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
2 dnl Copyright (C) 1998 Free Software Foundation, Inc.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
3 dnl Author: William Perry <wmperry@aventail.com>
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
4 dnl This file is part of XEmacs
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
5
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
6 AC_DEFUN(XE_MAKE_SHAREDLIB, [
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
7 dll_ld="ld"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
8 dll_lflags="-shared"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
9 dll_cflags="-r"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
10 dll_oflags="-o "
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
11
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
12 AC_MSG_CHECKING(how to build a shared library)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
13 case `uname -rs` in
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
14 UNIX_SV*|UNIX_System_V*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
15 dll_lflags="-G"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
16 dll_cflags=-Kpic
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
17 dll_ld="ld"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
18 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
19 BSD/OS*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
20 dll_cflags=
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
21 dll_lflags="-r"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
22 dll_ld="shlicc2"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
23 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
24 FreeBSD*2*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
25 dll_lflags="-Bshareable"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
26 dll_cflags="-fPIC -DPIC"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
27 dll_ld=ld
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
28 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
29 SunOS*4.*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
30 dll_cflags="-P"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
31 dll_lflags="-dp -assert pure-text -assert nodefinitions"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
32 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
33 SunOS*5.*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
34 dll_ld="cc"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
35 dll_cflags="-KPIC"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
36 dll_lflags="-G"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
37 dll_oflags="-W0,-y-o -W0,-y"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
38 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
39 IRIX*5.*|IRIX*6.*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
40 dll_cflags="-KPIC"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
41 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
42 OSF1*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
43 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
44 HP-UX*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
45 dll_ld="ld"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
46 dll_lflags="-b"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
47 dll_cflags="+z"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
48 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
49 SCO_SV*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
50 dll_ld="ld"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
51 dll_lflags="-G"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
52 dll_cflags="-Kpic"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
53 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
54 AIX*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
55 dll_lflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:\${@:.ell=.exp} -b noentry -lc"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
56 dll_ld="ld"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
57 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
58 *)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
59 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
60 esac
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
61
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
62 if test "$GCC" = "yes" ; then
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
63 dll_cflags="-fPIC"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
64 case `uname -rs` in
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
65 SunOS*5.*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
66 dll_ld="ld"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
67 dll_oflags="-o "
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
68 dll_lflags="-G"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
69 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
70 SCO_SV*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
71 dll_ld="ld"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
72 dll_lflags="-G"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
73 dll_cflags="-b elf"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
74 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
75 FreeBSD*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
76 dll_cflags="-DDLSYM_NEEDS_UNDERSCORE -DPIC -fPIC"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
77 dll_lflags="-Bshareable"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
78 dll_ld=ld
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
79 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
80 BSD/OS*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
81 dll_cflags=
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
82 dll_lflags="-r"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
83 dll_ld="shlicc2"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
84 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
85 UNIX_SV*)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
86 dll_cflags="-fPIC"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
87 ;;
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
88 *)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
89 dll_ld="$CC"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
90 dll_lflags="-shared"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
91 esac
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
92 fi
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
93
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
94 AC_MSG_RESULT("lflags: $dll_lflags cflags: $dll_cflags")
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
95 AC_SUBST(dll_ld)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
96 AC_SUBST(dll_cflags)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
97 AC_SUBST(dll_oflags)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
98 AC_SUBST(dll_lflags)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
99 ])dnl