]> granicus.if.org Git - postgis/commitdiff
Added support for mixed libiconv/iconv
authorSandro Santilli <strk@keybit.net>
Fri, 16 Dec 2005 16:47:24 +0000 (16:47 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 16 Dec 2005 16:47:24 +0000 (16:47 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2226 b70326c6-7e19-0410-871a-916f4a2858ee

Makefile.config.in
configure.in
loader/Makefile

index 5c9049250c0922376612948d4238593ef2609aa7..68d1a1c0ba7857325968eca1fb2d99b2176b2ba6 100644 (file)
@@ -67,6 +67,7 @@ AUTOCACHE_BBOX=1
 # to support UTF-8 output.
 #
 USE_ICONV=@USE_ICONV@
+ICONV_LDFLAGS=@ICONV_LDFLAGS@
 
 #
 # PGSQL
index f55a8d9e0d17f473283a5f6f4f10adbe56883484..052623c5eefb9808262a9a182e9172a7ed534b49 100644 (file)
@@ -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])
 
index 2aede61fa7bab862cbb3a7e527ca8f3742c3e599..145eba0b27a48b50a9e466100ae0b0a1287ebc77 100644 (file)
@@ -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)