comparison aclocal.m4 @ 265:8efd647ea9ca r20-5b31

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