Remove iconv/libiconv checks from *NIX builds: GLIB-2 provides iconv replacements.
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 18 Jul 2008 12:11:08 +0000 (12:11 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 18 Jul 2008 12:11:08 +0000 (12:11 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25765 f5534014-38df-0310-8fa8-9805f1628bb7

CMakeLists.txt
Makefile.am
README.bsd
aclocal-fallback/iconv.m4 [deleted file]
cmake/modules/FindGLIB2.cmake
cmakeconfig.h.in
configure.in
epan/Makefile.am

index 918e03bd5385759f07e3a5444a767555016a98e1..27a2828f00c46214efe83e161612d3e00afbaf7f 100644 (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("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)
 check_function_exists("inet_ntop"        HAVE_INET_NTOP_PROTO)
 check_function_exists("issetugid"        HAVE_ISSETUGID) 
 check_function_exists("mmap"             HAVE_MMAP)
index 832b95c2d4863f28e6c2fd816f0cc86dca035e74..e2bbee0df792b1b30363798fc1368f31fe641086 100644 (file)
@@ -316,7 +316,6 @@ wireshark_LDADD = \
        $(plugin_ldadd)                 \
        @PCRE_LIBS@                     \
        @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ @FRAMEWORKS@ \
        $(plugin_ldadd)                 \
        @PCRE_LIBS@                     \
        @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ @FRAMEWORKS@ \
-       @LIBICONV@                      \
        @LIBGCRYPT_LIBS@                \
        @LIBGNUTLS_LIBS@                \
        @LIBSMI_LDFLAGS@                \
        @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@                    \
        @GLIB_LIBS@ -lm                 \
        @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@    \
        @FRAMEWORKS@                    \
-       @LIBICONV@                      \
        @LIBGCRYPT_LIBS@                \
        @LIBGNUTLS_LIBS@                \
        @LIBSMI_LDFLAGS@
        @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@                    \
        @GLIB_LIBS@ -lm                 \
        @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@    \
        @FRAMEWORKS@                    \
-       @LIBICONV@                      \
        @LIBGCRYPT_LIBS@                \
        @LIBGNUTLS_LIBS@                \
        @LIBSMI_LDFLAGS@
        @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@ \
        @PCRE_LIBS@                     \
        @GLIB_LIBS@ -lm                 \
        @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ \
-       @LIBICONV@                      \
        @LIBGCRYPT_LIBS@                \
        @LIBGNUTLS_LIBS@                \
        @LIBSMI_LDFLAGS@
        @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/glib.m4 \
        aclocal-fallback/gtk-2.0.m4 \
        aclocal-fallback/gtk.m4 \
-       aclocal-fallback/iconv.m4 \
        aclocal-flags           \
        adns_dll.dep            \
        adns_dll.rc             \
        aclocal-flags           \
        adns_dll.dep            \
        adns_dll.rc             \
index 073c5c402a64ccb42687c21d2f6b389d1601d45f..e12f0e0b741564075a338f1fd4f03669a0d5cf62 100644 (file)
@@ -22,7 +22,6 @@ Install the latest versions of the following programs before compiling:
     glitz
     gtk2 / gtk+2
     jpeg
     glitz
     gtk2 / gtk+2
     jpeg
-    libiconv
     pango
     pkgconfig
     png
     pango
     pkgconfig
     png
diff --git a/aclocal-fallback/iconv.m4 b/aclocal-fallback/iconv.m4
deleted file mode 100644 (file)
index 6484f56..0000000
+++ /dev/null
@@ -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)
-])
-
index 19d4f8e87f53528c5206d15fc0f3be1e91b6398e..9869861e78a59fb805c7f32445e28af82b961e50 100644 (file)
@@ -168,34 +168,6 @@ else (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS)
   endif (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
   ##
 
   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}
   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)
 
     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)
   if (GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
      set(GLIB2_FOUND TRUE)
   endif (GLIB2_INCLUDE_DIRS AND GLIB2_LIBRARIES)
index 463769ed785f6ae8153ac52b98247a80017d31a1..f8bf51a8d6467d5264d58b7eadfb90796b2b61de 100644 (file)
@@ -39,9 +39,6 @@
 /* Define to use heimdal kerberos */
 #cmakedefine HAVE_HEIMDAL_KERBEROS 1
 
 /* 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
 
 /* Define if inet_ntop() prototype exists */
 #cmakedefine HAVE_INET_NTOP_PROTO 1
 
 /* HTML viewer, e.g. mozilla */
 #cmakedefine HTML_VIEWER
 
 /* 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
 /* 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
index 3a72f3163cd1735fd50b30756055f616466dc214..245e1560b2ea9c06aadcb64957b2332136aa61c9 100644 (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)
 
 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)
 dnl SSL Check
 SSL_LIBS=''
 AC_MSG_CHECKING(whether to use SSL library)
index 577a1dbccd54bae009da49008b5d57bd92cf1d39..a070bb87484fc97bf5c1bbc1c9d897cf48c5cab2 100644 (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@ \
        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 \
        @SSL_LIBS@ @LIBSMI_LDFLAGS@ -lm
 libwireshark_la_DEPENDENCIES = \
        @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ libwireshark_generated.la \