summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/charset/charcnv.c (renamed from source4/lib/charcnv.c)0
-rw-r--r--source4/lib/charset/config.m4 (renamed from source4/lib/iconv.m4)21
-rw-r--r--source4/lib/charset/config.mk10
-rw-r--r--source4/lib/charset/iconv.c (renamed from source4/lib/iconv.c)0
4 files changed, 20 insertions, 11 deletions
diff --git a/source4/lib/charcnv.c b/source4/lib/charset/charcnv.c
index e632790155..e632790155 100644
--- a/source4/lib/charcnv.c
+++ b/source4/lib/charset/charcnv.c
diff --git a/source4/lib/iconv.m4 b/source4/lib/charset/config.m4
index 282fa69b2d..9812c356ff 100644
--- a/source4/lib/iconv.m4
+++ b/source4/lib/charset/config.m4
@@ -26,19 +26,18 @@ for i in $LOOK_DIRS ; do
dnl Try to find iconv(3)
jm_ICONV($i)
+ TMP_ICONV_LIBS="$LIBS"
+
CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ export LDFLAGS LIBS CPPFLAGS
+
if test -n "$ICONV_FOUND" ; then
- LDFLAGS=$save_LDFLAGS
- LIB_ADD_DIR(LDFLAGS, "$i/lib")
- CFLAGS_ADD_DIR(CPPFLAGS, "$i/include")
- LIBS="$save_LIBS $LIBS"
- ICONV_LOCATION=$i
- export LDFLAGS LIBS CPPFLAGS
+ LIB_ADD_DIR(ICONV_LDFLAGS, $i/lib)
+ CFLAGS_ADD_DIR(ICONV_CPPFLAGS, $i/include)
+ ICONV_LIBS="$TMP_ICONV_LIBS"
break
- else
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
- export LDFLAGS LIBS CPPFLAGS
fi
done
@@ -63,4 +62,4 @@ if test x"$ICONV_FOUND" = x"no" -o x"$samba_cv_HAVE_NATIVE_ICONV" != x"yes" ; th
Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility!])
fi
-SMB_SUBSYSTEM(CHARSET,lib/iconv.o,lib/charcnv.o,[${TMP_CHARSET_LIBS}])
+SMB_EXT_LIB(ICONV,[${ICONV_LIBS}],[${ICONV_CFLAGS}],[${ICONV_CPPFLAGS}],[${ICONV_LDFLAGS}])
diff --git a/source4/lib/charset/config.mk b/source4/lib/charset/config.mk
new file mode 100644
index 0000000000..6b0fe02b72
--- /dev/null
+++ b/source4/lib/charset/config.mk
@@ -0,0 +1,10 @@
+################################################
+# Start SUBSYSTEM CHARSET
+[SUBSYSTEM::CHARSET]
+INIT_OBJ_FILES = \
+ lib/charset/iconv.o
+ADD_OBJ_FILES = \
+ lib/charset/charcnv.o
+REQUIRED_SUBSYSTEMS = EXT_LIB_ICONV
+# End SUBSYSTEM CHARSET
+################################################
diff --git a/source4/lib/iconv.c b/source4/lib/charset/iconv.c
index df590444e5..df590444e5 100644
--- a/source4/lib/iconv.c
+++ b/source4/lib/charset/iconv.c