ports/net/wireshark/files/patch-configure
Joe Marcus Clarke f8b1406eae Fix some build issues when using glib12.
Reported by:	pointyhat via pav
2007-07-07 19:08:41 +00:00

223 lines
8.3 KiB
Text

--- configure.orig Thu Jul 5 15:26:25 2007
+++ configure Sat Jul 7 14:38:55 2007
@@ -21771,7 +21771,7 @@ echo $ECHO_N "checking whether we should
# Check whether --enable-warnings-as-errors was given.
if test "${enable_warnings_as_errors+set}" = set; then
enableval=$enable_warnings_as_errors;
- if test "x$GCC" = "xyes" -a "x$enableval" == "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
+ if test "x$GCC" = "xyes" -a "x$enableval" = "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
with_warnings_as_errors="yes"
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
@@ -23308,6 +23308,7 @@ echo $ECHO_N "checking for GLIB - versio
else
GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
+ GLIB_LIBS="-liconv $GLIB_LIBS"
glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
@@ -23318,7 +23319,8 @@ echo $ECHO_N "checking for GLIB - versio
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$GLIB_LIBS $LIBS"
+ LIBS="$GLIB_LIBS -liconv $LIBS"
+ LIBS="$GLIB_LIBS -liconv $LIBS"
rm -f conf.glibtest
if test "$cross_compiling" = yes; then
echo $ac_n "cross compiling; assumed OK... $ac_c"
@@ -24211,7 +24213,7 @@ echo $ECHO_N "checking whether GLib supp
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
-LIBS="$GLIB_LIBS $LIBS"
+LIBS="$GLIB_LIBS -liconv $LIBS"
if test "$cross_compiling" = yes; then
echo $ac_n "cross compiling; assumed OK... $ac_c"
ac_cv_glib_supports_modules=yes
@@ -27249,19 +27251,19 @@ echo "${ECHO_T}yes" >&6; }
wireshark_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$lua_dir/include"
wireshark_save_LIBS="$LIBS"
- LIBS="$LIBS -L$lua_dir/lib -llua -lm"
+ LIBS="$LIBS -L$lua_dir/lib /liblua.a -lm"
wireshark_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$lua_dir/lib"
else
#
# The user specified no directory in which liblua resides,
- # so just add "-llua -lliblua" to the used libs.
+ # so just add "/liblua.a -lliblua" to the used libs.
#
wireshark_save_CFLAGS="$CFLAGS"
wireshark_save_CPPFLAGS="$CPPFLAGS"
wireshark_save_LDFLAGS="$LDFLAGS"
wireshark_save_LIBS="$LIBS"
- LIBS="$LIBS -llua -lm"
+ LIBS="$LIBS /liblua.a -lm"
fi
#
@@ -27411,7 +27413,7 @@ else
-for ac_header in lua5.1/lua.h lua5.1/lualib.h lua5.1/lauxlib.h
+for ac_header in lua/lua.h lua/lualib.h lua/lauxlib.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -27548,11 +27550,11 @@ _ACEOF
if test "x$lua_dir" != "x"
then
- LUA_INCLUDES="-I$lua_dir/include/lua5.1"
+ LUA_INCLUDES="-I$lua_dir/include/lua"
else
- # we found lua5.1/lua.h, but we don't know which include dir contains it
- { { echo "$as_me:$LINENO: error: Header file lua.h was found as lua5.1/lua.h but we can't use it. Please set the PATH for the --with-lua configure parameter. \n probably it is /usr." >&5
-echo "$as_me: error: Header file lua.h was found as lua5.1/lua.h but we can't use it. Please set the PATH for the --with-lua configure parameter. \n probably it is /usr." >&2;}
+ # we found lua/lua.h, but we don't know which include dir contains it
+ { { echo "$as_me:$LINENO: error: Header file lua.h was found as lua/lua.h but we can't use it. Please set the PATH for the --with-lua configure parameter. \n probably it is /usr." >&5
+echo "$as_me: error: Header file lua.h was found as lua/lua.h but we can't use it. Please set the PATH for the --with-lua configure parameter. \n probably it is /usr." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -27612,13 +27614,13 @@ done
# against libm.
LIBS="$LIBS $LUA_LIBS -lm"
- { echo "$as_me:$LINENO: checking for lua_call in -llua" >&5
-echo $ECHO_N "checking for lua_call in -llua... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for lua_call in /liblua.a" >&5
+echo $ECHO_N "checking for lua_call in /liblua.a... $ECHO_C" >&6; }
if test "${ac_cv_lib_lua_lua_call+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-llua $LIBS"
+LIBS="/liblua.a $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -27682,23 +27684,23 @@ if test $ac_cv_lib_lua_lua_call = yes; t
# the beginning of CFLAGS, CPPFLAGS,
# LDFLAGS, and LIBS.
#
- LUA_LIBS="-L$lua_dir/lib -llua -lm"
+ LUA_LIBS="-L$lua_dir/lib /liblua.a -lm"
LUA_INCLUDES="-I$lua_dir/include"
else
- LUA_LIBS="-llua -lm"
+ LUA_LIBS="/liblua.a -lm"
LUA_INCLUDES=""
fi
#
# we got lua, now look for lualib
#
- { echo "$as_me:$LINENO: checking for luaL_openlib in -llualib" >&5
-echo $ECHO_N "checking for luaL_openlib in -llualib... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for luaL_openlib in /liblua.alib" >&5
+echo $ECHO_N "checking for luaL_openlib in /liblua.alib... $ECHO_C" >&6; }
if test "${ac_cv_lib_lualib_luaL_openlib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-llualib $LIBS"
+LIBS="/liblua.alib $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -27758,7 +27760,7 @@ if test $ac_cv_lib_lualib_luaL_openlib =
#
# we have 5.0
#
- LUA_LIBS="$LUA_LIBS -llualib"
+ LUA_LIBS="$LUA_LIBS /liblua.alib"
else
@@ -27769,13 +27771,13 @@ else
LIBS="$wireshark_save_LIBS $LUA_LIBS"
- { echo "$as_me:$LINENO: checking for luaL_register in -llua" >&5
-echo $ECHO_N "checking for luaL_register in -llua... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for luaL_register in /liblua.a" >&5
+echo $ECHO_N "checking for luaL_register in /liblua.a... $ECHO_C" >&6; }
if test "${ac_cv_lib_lua_luaL_register+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-llua $LIBS"
+LIBS="/liblua.a $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -27881,15 +27883,15 @@ else
# We could not find the libs, maybe we have version number in the lib name
#
- LIBS="$wireshark_save_LIBS -llua5.1 -lm"
+ LIBS="$wireshark_save_LIBS /liblua.a -lm"
- { echo "$as_me:$LINENO: checking for luaL_register in -llua5.1" >&5
-echo $ECHO_N "checking for luaL_register in -llua5.1... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking for luaL_register in /liblua.a" >&5
+echo $ECHO_N "checking for luaL_register in /liblua.a... $ECHO_C" >&6; }
if test "${ac_cv_lib_lua5_1_luaL_register+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-llua5.1 $LIBS"
+LIBS="/liblua.a $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -27954,7 +27956,7 @@ cat >>confdefs.h <<\_ACEOF
#define HAVE_LUA_5_1 1
_ACEOF
- LUA_LIBS=" -llua5.1 -lm"
+ LUA_LIBS=" /liblua.a -lm"
else
@@ -30140,7 +30142,7 @@ echo "${ECHO_T}yes" >&6; }
#
CFLAGS="$CFLAGS -I$krb5_dir/include"
CPPFLAGS="$CPPFLAGS -I$krb5_dir/include"
- ac_heimdal_version=`grep heimdal $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*heimdal.*$/HEIMDAL/'`
+ ac_heimdal_version=`grep heimdal $krb5_dir/include/krb5.h | head -n 1 | tr "[:lower:]" "[:upper:]" sed 's/^.*heimdal.*$/HEIMDAL/'`
ac_mit_version=`grep 'Massachusetts Institute of Technology' $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*Massachusetts Institute of Technology.*$/MIT/'`
ac_krb5_version="$ac_heimdal_version$ac_mit_version"
if test "x$ac_krb5_version" = "xHEIMDAL"
@@ -30199,7 +30201,7 @@ fi
if test -x "$KRB5_CONFIG"
then
- KRB5_FLAGS=`"$KRB5_CONFIG" --cflags`
+ KRB5_FLAGS=`"$KRB5_CONFIG" --cflags | sed -e 's/@INCLUDE_des@//g'`
KRB5_LIBS=`"$KRB5_CONFIG" --libs`
CFLAGS="$CFLAGS $KRB5_FLAGS"
CPPFLAGS="$CPPFLAGS $KRB5_FLAGS"
@@ -31974,7 +31976,7 @@ fi
ac_save_LIBS="$LIBS"
-LIBS="$GLIB_LIBS $LIBS"
+LIBS="$GLIB_LIBS -liconv $LIBS"
G_ASCII_STRTOULL_C=""
G_ASCII_STRTOULL_O=""
G_ASCII_STRTOULL_LO=""
@@ -33019,7 +33021,7 @@ fi
#
# The plugin dissectors reside in ./plugins/PROTO/
#
-PLUGIN_LIBS="-L../../epan -lwireshark $GLIB_LIBS"
+PLUGIN_LIBS="-L../../epan -lwireshark -liconv $GLIB_LIBS"
#