2331
|
1 dnl Process this file with autoconf to produce a configure script. |
|
2 AC_INIT(pathsearch.c) |
|
3 |
|
4 AC_CANONICAL_HOST |
|
5 if test -z "$host"; then |
|
6 host=unknown |
|
7 fi |
|
8 target_host_type=$host |
|
9 canonical_host_type=$host |
|
10 |
|
11 ### Enable creation of shared libraries. Currently only works with |
|
12 ### gcc on some systems. |
|
13 |
|
14 AC_ARG_ENABLE(shared, |
|
15 [ --shared create shared libraries (not all systems)], |
|
16 [if test $enableval = no; then SHARED_LIBS=false; else SHARED_LIBS=true; fi], |
|
17 SHARED_LIBS=false) |
|
18 AC_SUBST(SHARED_LIBS) |
|
19 |
2676
|
20 CPICFLAG=-fPIC |
|
21 SHLEXT=so |
|
22 SH_LD="$CC" |
|
23 SH_LDFLAGS=-shared |
|
24 case "$canonical_host_type" in |
|
25 *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) |
|
26 SH_LD=ld |
|
27 SH_LDFLAGS=-Bshareable |
|
28 ;; |
|
29 alpha-dec-osf*) |
|
30 CPICFLAG= |
2709
|
31 SH_LDFLAGS="-shared -Xlinker -expect_unresolved -Xlinker '*'" |
2676
|
32 ;; |
|
33 rs6000-ibm-aix* | powerpc-ibm-aix*) |
|
34 CPICFLAG= |
|
35 ;; |
|
36 hppa*-hp-hpux*) |
|
37 SHLEXT=sl |
2707
|
38 SH_LDFLAGS="-shared -fPIC" |
2676
|
39 ;; |
|
40 esac |
2331
|
41 AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) |
|
42 AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) |
2676
|
43 AC_MSG_RESULT([defining SH_LD to be $SH_LD]) |
|
44 AC_MSG_RESULT([defining SH_LDFLAGS to be $SH_LDFLAGS]) |
2331
|
45 AC_SUBST(CPICFLAG) |
|
46 AC_SUBST(SHLEXT) |
2676
|
47 AC_SUBST(SH_LD) |
|
48 AC_SUBST(SH_LDFLAGS) |
2331
|
49 |
|
50 sinclude(common.ac) |
|
51 |
|
52 AC_OUTPUT(Makefile) |