Remove iconv/libiconv checks from *NIX builds: GLIB-2 provides iconv replacements.

svn path=/trunk/; revision=25765
This commit is contained in:
Jeff Morriss 2008-07-18 12:11:08 +00:00
parent 2e78900982
commit 86e10880c9
8 changed files with 1 additions and 122 deletions

View File

@ -162,7 +162,6 @@ include(CheckFunctionExists)
check_function_exists("chown" HAVE_CHOWN)
check_function_exists("gethostbyname2" HAVE_GETHOSTBYNAME2)
check_function_exists("getprotobynumber" HAVE_GETPROTOBYNUMBER)
check_function_exists("iconv" HAVE_ICONV)
check_function_exists("inet_ntop" HAVE_INET_NTOP_PROTO)
check_function_exists("issetugid" HAVE_ISSETUGID)
check_function_exists("mmap" HAVE_MMAP)

View File

@ -316,7 +316,6 @@ wireshark_LDADD = \
$(plugin_ldadd) \
@PCRE_LIBS@ \
@PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ @FRAMEWORKS@ \
@LIBICONV@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@ \
@ -346,7 +345,6 @@ tshark_LDADD = \
@GLIB_LIBS@ -lm \
@PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ \
@FRAMEWORKS@ \
@LIBICONV@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
@ -375,7 +373,6 @@ rawshark_LDADD = \
@GLIB_LIBS@ -lm \
@PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ \
@FRAMEWORKS@ \
@LIBICONV@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
@ -431,7 +428,6 @@ dftest_LDADD = \
@PCRE_LIBS@ \
@GLIB_LIBS@ -lm \
@PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ \
@LIBICONV@ \
@LIBGCRYPT_LIBS@ \
@LIBGNUTLS_LIBS@ \
@LIBSMI_LDFLAGS@
@ -564,7 +560,6 @@ EXTRA_DIST = \
aclocal-fallback/glib.m4 \
aclocal-fallback/gtk-2.0.m4 \
aclocal-fallback/gtk.m4 \
aclocal-fallback/iconv.m4 \
aclocal-flags \
adns_dll.dep \
adns_dll.rc \

View File

@ -22,7 +22,6 @@ Install the latest versions of the following programs before compiling:
glitz
gtk2 / gtk+2
jpeg
libiconv
pango
pkgconfig
png

View File

@ -1,72 +0,0 @@
dnl Copied from: http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html
# iconv.m4 serial AM2
dnl From Bruno Haible.
AC_DEFUN([AM_ICONV],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
AC_ARG_WITH([libiconv-prefix],
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
done
])
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
LIBS="$am_save_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-
}[$]am_cv_proto_iconv)
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
LIBICONV="-liconv"
fi
AC_SUBST(LIBICONV)
])

View File

@ -168,34 +168,6 @@ else (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS)
endif (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
##
## libiconv
find_path(LIBICONV_INCLUDE_DIR
NAMES
iconv.h
PATHS
/opt/gnome/include/glib-2.0
/usr/include/glib-2.0
/usr/local/include/glib-2.0
/opt/local/include/glib-2.0
/sw/include/glib-2.0
)
find_library(LIBICONV_LIBRARY
NAMES
iconv
PATHS
/opt/gnome/lib
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
if (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
set(LIBICONV_FOUND TRUE)
endif (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
##
set(GLIB2_INCLUDE_DIRS
${GLIB_INCLUDE_DIR}
${GLIBCONFIG_INCLUDE_DIR}
@ -219,11 +191,6 @@ else (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS)
set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBINTL_INCLUDE_DIR})
endif (LIBINTL_FOUND)
if (LIBICONV_FOUND)
set(GLIB2_LIBRARIES ${GLIB2_LIBRARIES} ${LIBICONV_LIBRARY})
set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS} ${LIBICONV_INCLUDE_DIR})
endif (LIBICONV_FOUND)
if (GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
set(GLIB2_FOUND TRUE)
endif (GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)

View File

@ -39,9 +39,6 @@
/* Define to use heimdal kerberos */
#cmakedefine HAVE_HEIMDAL_KERBEROS 1
/* Define if you have the iconv() function. */
#cmakedefine HAVE_ICONV 1
/* Define if inet_ntop() prototype exists */
#cmakedefine HAVE_INET_NTOP_PROTO 1
@ -227,9 +224,6 @@
/* HTML viewer, e.g. mozilla */
#cmakedefine HTML_VIEWER
/* Define as const if the declaration of iconv() needs const. */
#cmakedefine ICONV_CONST 1
/* Define if <inttypes.h> defines PRI[doxu]64 macros */
/* Note: always defines PRI[doxu]64 macros so inttypes.h becomes useless.*/
#cmakedefine INTTYPES_H_DEFINES_FORMATS 1

View File

@ -1129,9 +1129,6 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sy
AC_CHECK_HEADERS(netinet/in.h)
AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
dnl iconv check
AM_ICONV
dnl SSL Check
SSL_LIBS=''
AC_MSG_CHECKING(whether to use SSL library)

View File

@ -128,7 +128,7 @@ libwireshark_la_LIBADD = \
dfilter/libdfilter.la dissectors/libcleandissectors.la \
dissectors/libdissectors.la dissectors/libasndissectors.la \
dissectors/libpidldissectors.la $(wslua_lib) @SOCKET_LIBS@ @NSL_LIBS@ \
@ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ \
@ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ @KRB5_LIBS@ \
@SSL_LIBS@ @LIBSMI_LDFLAGS@ -lm
libwireshark_la_DEPENDENCIES = \
@INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la \