Permalink
Browse files

Allow for configurable iconv include and library locations.

This should help to fix the build on OpenBSD.
  • Loading branch information...
1 parent f79d3d7 commit ab1cbc51f69101676412ab60021f7313f103b8be @mkilian mkilian committed Aug 26, 2009
Showing with 21 additions and 0 deletions.
  1. +2 −0 base.buildinfo.in
  2. +19 −0 configure.ac
View
@@ -1 +1,3 @@
+extra-lib-dirs: @ICONV_LIB_DIRS@
extra-libraries: @EXTRA_LIBS@
+include-dirs: @ICONV_INCLUDE_DIRS@
View
@@ -32,6 +32,25 @@ AC_CHECK_FUNCS([lstat])
AC_CHECK_FUNCS([getclock getrusage times])
AC_CHECK_FUNCS([_chsize ftruncate])
+dnl--------------------------------------------------------------------
+dnl * Deal with arguments telling us iconv is somewhere odd
+dnl--------------------------------------------------------------------
+
+AC_ARG_WITH([iconv-includes],
+ [AC_HELP_STRING([--with-iconv-includes],
+ [directory containing iconv.h])],
+ [ICONV_INCLUDE_DIRS=$withval; CPPFLAGS="-I$withval"],
+ [ICONV_INCLUDE_DIRS=])
+
+AC_ARG_WITH([iconv-libraries],
+ [AC_HELP_STRING([--with-iconv-libraries],
+ [directory containing iconv library])],
+ [ICONV_LIB_DIRS=$withval; LDFLAGS="-L$withval"],
+ [ICONV_LIB_DIRS=])
+
+AC_SUBST(ICONV_INCLUDE_DIRS)
+AC_SUBST(ICONV_LIB_DIRS)
+
# map standard C types and ISO types to Haskell types
FPTOOLS_CHECK_HTYPE(char)
FPTOOLS_CHECK_HTYPE(signed char)

0 comments on commit ab1cbc5

Please sign in to comment.