aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-01-31 02:57:06 +1000
committerGravatar axel <axel@liljencrantz.se>2006-01-31 02:57:06 +1000
commitc8a36c98893419835770016b7f82976bcc24dc4f (patch)
treeb78fa7d1d631db039d498d9dc9a8d66fad23996c /configure.ac
parent521d09b6d0264aaac17b9359ebcb1a0cb6ca8906 (diff)
Autoconf tweaks to make library detection more robust
darcs-hash:20060130165706-ac50b-e7685a85f07811815fb01ac3b79609ea7f0a7786.gz
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac50
1 files changed, 31 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index fe654b29..32eba6af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,17 +1,39 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(fish,1.20.1,fish-users@lists.sf.net)
+for i in /usr/pkg /sw; do
+
+ AC_MSG_CHECKING([for $i/include include directory])
+ if test -d $i/include; then
+ AC_MSG_RESULT(yes)
+ CPPFLAGS="$CPPFLAGS -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
+done
+
# If needed, run autoheader automatically
+AC_MSG_CHECKING([if autoheader needs to be run])
if test ! -f ./config.h.in -o config.h.in -ot configure.ac; then
+ AC_MSG_RESULT([yes])
if which autoheader >/dev/null; then
- echo running autoheader...
+ AC_MSG_NOTICE([running autoheader])
autoheader
else
- echo Could not find the autoheader program in your path.
- echo This program is needed because the configure.ac file has been modified.
- echo Please install it and try again.
- exit 1
+ AC_MSG_ERROR( [cannot find the autoheader program in your path.
+This program is needed because the configure.ac file has been modified.
+Please install it and try again.])
fi
+else
+ AC_MSG_RESULT([no])
fi
# Tell autoconf to create config.h header
@@ -26,10 +48,9 @@ AC_PROG_INSTALL
AC_CHECK_PROG( has_doxygen, [doxygen], "true")
if ! test $has_doxygen = "true"; then
- echo Could not find the Doxygen program in your path.
- echo This program is needed to build fish.
- echo Please install it and try again.
- exit 1
+ AC_MSG_ERROR( [cannot find the Doxygen program in your path.
+This program is needed to build fish.
+Please install it and try again.])
fi
# Check for seq program. If missing, install fallback shellscript implementation
@@ -93,10 +114,6 @@ AC_SUBST( [LOCALEDIR], [$datadir/locale])
# See if Linux procfs is present
AC_CHECK_FILES([/proc/self/stat])
-# See if NetBSD pkgsrc is installed
-AC_CHECK_FILE([/usr/pkg/lib],[AC_SUBST(LIBDIR,[-L/usr/pkg/lib\ -R/usr/pkg/lib])])
-AC_CHECK_FILE([/usr/pkg/include],[AC_SUBST(INCLUDEDIR,[-I/usr/pkg/include])])
-
# Check for RLIMIT_AS in sys/resource.h.
AC_MSG_CHECKING([for RLIMIT_AS in sys/resource.h])
AC_TRY_COMPILE([#include <sys/resource.h>],
@@ -187,12 +204,7 @@ else
fi
# Check if we have ncurses, and use it rather than curses if possible.
-AC_CHECK_HEADERS([ncurses.h],[AC_SUBST(CURSESLIB,[ncurses]) AC_DEFINE(HAVE_NCURSES_H)],[AC_SUBST(CURSESLIB,[curses])])
-
-# Force use of ncurses if it is avialable via NetBSD pkgsrc. This is an
-# ugly kludge to force NetBSD to use ncurses, since NetBSDs own version
-# does not properly support terminfo.
-AC_CHECK_FILE([/usr/pkg/include/ncurses.h],[AC_SUBST(CURSESLIB,[ncurses]) AC_DEFINE(HAVE_NCURSES_H)])
+AC_SEARCH_LIBS( setupterm, [ncurses curses], [ AC_MSG_NOTICE([Found curses implementation])], [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish])] )
AC_CONFIG_FILES([Makefile fish.spec doc_src/fish.1 doc_src/Doxyfile init/fish init/fish_interactive.fish init/fish_complete.fish seq])
AC_OUTPUT