summaryrefslogtreecommitdiff
blob: efbeb3417a3932e6295b4407fbfd2a7754adb5a0 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
* Remove Darwin cruft, remove some Solaris misdetection crap, add
  AM_ICONV instead of weird iconv check that not suprisingly fails on
  Darwin.

--- fish-1.23.1/configure.ac
+++ fish-1.23.1/configure.ac
@@ -91,45 +91,6 @@
 
 
 #
-# Detect directories which may contain additional headers, libraries
-# and commands. This needs to be done early - before Autoconf starts
-# to mess with CFLAGS and all the other environemnt variables.
-#
-# This mostly helps OS X users, since fink usually installs out of
-# tree and doesn't update CFLAGS.
-#
-
-for i in /usr/pkg /sw /opt /opt/local; do
-
-	AC_MSG_CHECKING([for $i/include include directory])
-	if test -d $i/include; then
-		AC_MSG_RESULT(yes)
-		CPPFLAGS="$CPPFLAGS -I$i/include/"
-		CFLAGS="$CFLAGS -I$i/include/"
-	else
-	AC_MSG_RESULT(no)
-	fi
-
-	AC_MSG_CHECKING([for $i/lib library directory])
-	if test -d $i/lib; then
-		AC_MSG_RESULT(yes)
-		LDFLAGS="$LDFLAGS -L$i/lib/ -R$i/lib/"
-	else
-		AC_MSG_RESULT(no)
-	fi
-
-	AC_MSG_CHECKING([for $i/bin command directory])
-	if test -d $i/bin; then
-		AC_MSG_RESULT(yes)
-		optbindirs="$optbindirs $i/bin"
-	else
-		AC_MSG_RESULT(no)
-	fi
-
-done
-
-
-#
 # Tell autoconf to create config.h header 
 #
 AC_CONFIG_HEADERS(config.h)
@@ -153,10 +114,7 @@
 # Set up various programs needed for install
 #
 
-# Here we look for c99 before cc as Sun Studio compiler supports c99
-# through the c99 binary.
-
-AC_PROG_CC([gcc c99 cc])
+AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_INSTALL
 
@@ -419,12 +477,9 @@
 	AC_SEARCH_LIBS( gettext, intl,,)
 fi
 
-# Check for libiconv_open if we can't find iconv_open. Silly OS X does
-# weird macro magic for the sole purpose of amusing me.
-AC_SEARCH_LIBS( iconv_open, iconv, , [AC_SEARCH_LIBS( libiconv_open, iconv, , [AC_MSG_ERROR([Could not find an iconv implementation, needed to build fish])] )] )
-
-LIBS_FISH=$LIBS
-LIBS=$LIBS_COMMON
+AM_ICONV
+LIBS_FISH="$LIBS $LIBICONV"
+LIBS="$LIBS_COMMON $LIBICONV"
 
 #
 # Check for libraries needed by fish_indent. 
@@ -504,7 +504,6 @@
 if test x$local_gettext != xno; then 
 	AC_SEARCH_LIBS( gettext, intl,,)
 fi
-AC_SEARCH_LIBS( iconv_open, iconv, , [AC_MSG_ERROR([Could not find an iconv implementation, needed to build fish])] )
 LIBS_FISH_PAGER=$LIBS
 LIBS=$LIBS_COMMON
 
@@ -516,7 +516,6 @@
 if test x$local_gettext != xno; then 
 	AC_SEARCH_LIBS( gettext, intl,,)
 fi
-AC_SEARCH_LIBS( iconv_open, iconv, , [AC_MSG_ERROR([Could not find an iconv implementation, needed to build fish])] )
 LIBS_FISHD=$LIBS
 LIBS=$LIBS_COMMON