From: Sandro Santilli Date: Fri, 16 Dec 2005 16:47:24 +0000 (+0000) Subject: Added support for mixed libiconv/iconv X-Git-Tag: pgis_1_1_0~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58a5c34a08502ea72b16768230e922cbecbfa704;p=postgis Added support for mixed libiconv/iconv git-svn-id: http://svn.osgeo.org/postgis/trunk@2226 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/Makefile.config.in b/Makefile.config.in index 5c9049250..68d1a1c0b 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -67,6 +67,7 @@ AUTOCACHE_BBOX=1 # to support UTF-8 output. # USE_ICONV=@USE_ICONV@ +ICONV_LDFLAGS=@ICONV_LDFLAGS@ # # PGSQL diff --git a/configure.in b/configure.in index f55a8d9e0..052623c5e 100644 --- a/configure.in +++ b/configure.in @@ -22,6 +22,8 @@ dnl dnl iconv support (might fail in case of non-default iconv installation) dnl AC_SUBST(USE_ICONV) +AC_SUBST(ICONV_LDFLAGS) +ICONV_LDFLAGS= USE_ICONV=1 AC_ARG_WITH(iconv, [ --without-iconv disable unicode support], @@ -31,10 +33,15 @@ AC_ARG_WITH(iconv, ) if test "$USE_ICONV" = 1; then - AC_CHECK_LIB(c, iconv_open, + AC_CHECK_LIB(iconv, iconv_open, USE_ICONV=1 + ICONV_LDFLAGS=-liconv , - USE_ICONV=0 + AC_CHECK_LIB(iconv, iconv_open, + USE_ICONV=1 + , + USE_ICONV=0 + ) ) fi @@ -472,7 +479,7 @@ fi if test $USE_PROJ -gt 0; then AC_MSG_RESULT([ PROJ: dir=$PROJ_DIR]) fi -AC_MSG_RESULT([ ICONV: $USE_ICONV]) +AC_MSG_RESULT([ ICONV: $USE_ICONV $ICONV_LDFLAGS]) dnl AC_MSG_RESULT([ FLEX: path=$FLEX]) dnl AC_MSG_RESULT([ YACC: path=$YACC]) diff --git a/loader/Makefile b/loader/Makefile index 2aede61fa..145eba0b2 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -10,6 +10,7 @@ OBJS = shpopen.o dbfopen.o getopt.o ifeq ($(USE_ICONV),1) override CFLAGS += -DUSE_ICONV + override LDFLAGS += $(ICONV_LDFLAGS) endif override CFLAGS := -g -Wall -I.. $(CFLAGS) -DUSE_VERSION=$(USE_VERSION)