All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: fix compile issue with gdbm and --enable-lib64 warnnings
@ 2010-04-09  3:48 Wenming Zhang
  2010-04-20  4:57 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Wenming Zhang @ 2010-04-09  3:48 UTC (permalink / raw)
  To: xfs; +Cc: Wenming Zhang

fix couldn't be compiled with gdbm lib issue
and clear warnings while configure with  --enable-lib64 

Signed-off-by: Wenming Zhang <wezhang@redhat.com>
---
 configure.in |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/configure.in b/configure.in
index 45b7fd1..92e2711 100644
--- a/configure.in
+++ b/configure.in
@@ -10,6 +10,7 @@ AC_HEADER_STDC
 			errno.h			\
 			malloc.h		\
 			uuid.h			\
+			gdbm.h			\
 			uuid/uuid.h		\
 			sys/uuid.h		\
 			sys/file.h		\
@@ -44,6 +45,12 @@ in
 		;;
 	*)
 		AC_MULTILIB($enable_lib64)
+		AC_ARG_ENABLE([lib64], [AS_HELP_STRING([--enable-lib64],
+                			[enable lib64 support (default is no)])],
+				[enable_lib64=$withval],
+				[enable_lib64=no]
+		)
+
 		AC_PACKAGE_NEED_XFS_XFS_H
 		AC_PACKAGE_WANT_LIBXFS_H
 		AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
-- 
1.6.2.5

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfstests: fix compile issue with gdbm and --enable-lib64 warnnings
  2010-04-09  3:48 [PATCH] xfstests: fix compile issue with gdbm and --enable-lib64 warnnings Wenming Zhang
@ 2010-04-20  4:57 ` Dave Chinner
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2010-04-20  4:57 UTC (permalink / raw)
  To: Wenming Zhang; +Cc: xfs

On Fri, Apr 09, 2010 at 11:48:02AM +0800, Wenming Zhang wrote:
> fix couldn't be compiled with gdbm lib issue
> and clear warnings while configure with  --enable-lib64 
> 
> Signed-off-by: Wenming Zhang <wezhang@redhat.com>
> ---
>  configure.in |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/configure.in b/configure.in
> index 45b7fd1..92e2711 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -10,6 +10,7 @@ AC_HEADER_STDC
>  			errno.h			\
>  			malloc.h		\
>  			uuid.h			\
> +			gdbm.h			\
>  			uuid/uuid.h		\
>  			sys/uuid.h		\
>  			sys/file.h		\

I'm not sure why this is needed - we don't directly include gdbm.h.
We check for gdbm/ndbm.h (or gdbm-ndbm.h on debian in a a patch
I have), the presence of which implies that gdbm.h exists on the
system.

Even if it is necessary to check for this, the check needs to go
into the GDBM package checks (m4/package_gdbmdev.m4) to
enable/disable the have_db variable so that it simply isn't used if
it is not present.


> @@ -44,6 +45,12 @@ in
>  		;;
>  	*)
>  		AC_MULTILIB($enable_lib64)
> +		AC_ARG_ENABLE([lib64], [AS_HELP_STRING([--enable-lib64],
> +                			[enable lib64 support (default is no)])],
> +				[enable_lib64=$withval],
> +				[enable_lib64=no]
> +		)
> +

I don't think this is right - yes, it will suppress the warning,
but I don't think it works correctly. The argument needs to be enabled
and evaluated before it is used, and IIRC the AC_ARG_ENABLE result
is put into $enableval not $withval.

So shouldn't it be something like this (untested):

		AC_ARG_ENABLE(lib64,
			AS_HELP_STRING([--enable-lib64],
				[enable lib64 support (default=no)]
			enable_lib64=$enableval,
			enable_lib64=no)
		AC_SUBST(enable_lib64)
		AC_MULTILIB($enable_lib64)

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-20  4:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09  3:48 [PATCH] xfstests: fix compile issue with gdbm and --enable-lib64 warnnings Wenming Zhang
2010-04-20  4:57 ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.