From Albert Chin: fix for the following:

The PCRE test in acinclude.m4 and epan/acinclude.m4 don't work
	if PCRE exists in a non-system directory.  The problem is that
	LDFLAGS and LIBS are set incorrectly.  LIBS shouldn't contain -L
	arguments.

svn path=/trunk/; revision=9309
This commit is contained in:
Guy Harris 2003-12-17 02:36:56 +00:00
parent 653af411dd
commit 8b7cf57054
2 changed files with 22 additions and 14 deletions

View File

@ -2,7 +2,7 @@ dnl Macros that test for specific features.
dnl This file is part of the Autoconf packaging for Ethereal.
dnl Copyright (C) 1998-2000 by Gerald Combs.
dnl
dnl $Id: acinclude.m4,v 1.64 2003/12/16 22:55:28 guy Exp $
dnl $Id: acinclude.m4,v 1.65 2003/12/17 02:36:56 guy Exp $
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -536,7 +536,9 @@ AC_DEFUN(AC_ETHEREAL_LIBPCRE_CHECK,
ethereal_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$pcre_dir/include"
ethereal_save_LIBS="$LIBS"
PCRE_LIBS="-L$pcre_dir/lib -lpcre"
LIBS="$LIBS -lpcre"
ethereal_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$pcre_dir/lib"
fi
#
@ -587,8 +589,8 @@ AC_DEFUN(AC_ETHEREAL_LIBPCRE_CHECK,
then
#
# Put the "-I" and "-L" flags for pcre at
# the beginning of CFLAGS, CPPFLAGS, and
# LIBS.
# the beginning of CFLAGS, CPPFLAGS,
# LDFLAGS, and LIBS.
#
PCRE_LIBS="-L$pcre_dir/lib -lpcre $ethereal_save_LIBS"
else
@ -600,12 +602,14 @@ AC_DEFUN(AC_ETHEREAL_LIBPCRE_CHECK,
then
#
# Restore the versions of CFLAGS, CPPFLAGS,
# and LIBS before we added the "-with-pcre="
# directory, as we didn't actually find
# pcre there.
# LDFLAGS, and LIBS before we added the
# "--with-pcre=" directory, as we didn't
# actually find pcre there.
#
CFLAGS="$ethereal_save_CFLAGS"
CPPFLAGS="$ethereal_save_CPPFLAGS"
LDFLAGS="$ethereal_save_LDFLAGS"
LIBS="$ethereal_save_LIBS"
PCRE_LIBS=""
fi
want_pcre=no

View File

@ -2,7 +2,7 @@ dnl Macros that test for specific features.
dnl This file is part of the Autoconf packaging for Ethereal.
dnl Copyright (C) 1998-2000 by Gerald Combs.
dnl
dnl $Id: acinclude.m4,v 1.4 2003/12/06 16:35:18 gram Exp $
dnl $Id: acinclude.m4,v 1.5 2003/12/17 02:36:56 guy Exp $
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -207,7 +207,9 @@ AC_DEFUN(AC_ETHEREAL_LIBPCRE_CHECK,
ethereal_save_CPPLAGS="$CPPLAGS"
CPPFLAGS="$CPPFLAGS -I$pcre_dir/include"
ethereal_save_LIBS="$LIBS"
PCRE_LIBS="-L$pcre_dir/lib -lpcre"
LIBS="$LIBS -lpcre"
ethereal_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$pcre_dir/lib"
fi
#
@ -258,8 +260,8 @@ AC_DEFUN(AC_ETHEREAL_LIBPCRE_CHECK,
then
#
# Put the "-I" and "-L" flags for pcre at
# the beginning of CFLAGS, CPPFLAGS, and
# LIBS.
# the beginning of CFLAGS, CPPFLAGS,
# LDFLAGS, and LIBS.
#
PCRE_LIBS="-L$pcre_dir/lib -lpcre $ethereal_save_LIBS"
else
@ -271,12 +273,14 @@ AC_DEFUN(AC_ETHEREAL_LIBPCRE_CHECK,
then
#
# Restore the versions of CFLAGS, CPPFLAGS,
# and LIBS before we added the "-with-pcre="
# directory, as we didn't actually find
# pcre there.
# LDFLAGS, and LIBS before we added the
# "--with-pcre=" directory, as we didn't
# actually find pcre there.
#
CFLAGS="$ethereal_save_CFLAGS"
CPPFLAGS="$ethereal_save_CPPLAGS"
LDFLAGS="$ethereal_save_LDFLAGS"
LIBS="$ethereal_save_LIBS"
PCRE_LIBS=""
fi
want_pcre=no