summaryrefslogtreecommitdiff
path: root/archivers/arj/patches/patch-ab
blob: 6ef28fc6c67d8ceaab926de8184b50750f866d50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
$NetBSD: patch-ab,v 1.5 2005/01/16 16:57:12 tv Exp $

--- gnu/configure.in.orig	2004-04-17 07:28:06.000000000 -0400
+++ gnu/configure.in
@@ -12,13 +12,23 @@ dnl Installation script (let it be, temp
 AC_PROG_INSTALL([e:/os2apps/autoconf/install-sh])
 
 dnl Configuration parameters
-AC_CONFIG_HEADER([../c_defs.h:config.h.in])
+AC_CONFIG_HEADER([c_defs.h:config.h.in])
 
 dnl Checks for the canonical system name
 AC_CANONICAL_HOST
 
 dnl Checks for programs.
 AC_PROG_CC
+AC_DEFUN(AC_PROG_LD_GNU,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  ac_cv_prog_gnu_ld=yes
+else
+  ac_cv_prog_gnu_ld=no
+fi])
+])
+AC_PROG_LD_GNU
 
 dnl Checks for header files.
 AC_HEADER_STDC
@@ -36,6 +46,7 @@ AC_FUNC_SETVBUF_REVERSED
 AC_TYPE_SIGNAL
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([getcwd min max mkdir mkdtemp rmdir fcloseall strcasecmp setpriority strdup strerror strstr strupr strlwr strtol strtoul])
+AC_SEARCH_LIBS([dlsym], [dl])
 
 dnl Platform-specific tuning
 PROG_EXT=
@@ -57,6 +68,11 @@ linux*)
         DLL_FLAGS="-shared -export-dynamic"
         LD_STRIP="gnu/stripgcc.lnk"
 	;;
+interix3*)
+	# not ELF
+	DLL_FLAGS="-shared"
+	DLL_CFLAGS=""
+	;;
 *qnx*)
 	AC_DEFINE(ELF_EXECUTABLES)
         DLL_FLAGS="-shared -fPIC"
@@ -68,7 +84,9 @@ linux*)
         CFLAGS="-DSUNOS -D_UNIX"
         DLL_FLAGS="-shared -fPIC"
         DLL_CFLAGS="-shared -fPIC"
+	if test X"$ac_cv_prog_gnu_ld" = X"yes"; then
         LD_STRIP="gnu/stripgcc.lnk"
+	fi
 	;;
 os2*)
 	PROG_EXT=".exe"
@@ -115,7 +133,7 @@ dnl Initial setup
 
 test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
 AC_SUBST(CONFIG_SHELL)
-
+AC_OUTPUT(makefile.gnu:makefile.in)
 AC_MSG_CHECKING([if dynamic C library may be used])
 AC_ARG_ENABLE(libc,
 [  --disable-libc          Disable linking with dynamic C library],