[Ocfs2-tools-devel] Re: ocfs2-tools: configure.in patch fix

Joel Becker Joel.Becker at oracle.com
Thu Sep 21 14:24:05 PDT 2006


On Thu, Sep 21, 2006 at 02:13:39PM -0700, Sunil Mushran wrote:
> ocfs2-tools:
> 
> Added checks for ncurses and readline in configure.in so as to detect
> the missing libs during configure.
> 
> signed-off-by: smushran <sunil.mushran at oracle.com>

	Assuming it works on sles9/rhel4, I'm sob as well.

Joel
 
> Patch attached.

> ocfs2-tools:
> 
> Added checks for ncurses and readline in configure.in so as to detect
> the missing libs during configure.
> 
> signed-off-by: smushran <sunil.mushran at oracle.com>
> 
> Index: ocfs2-tools/configure.in
> ===================================================================
> --- ocfs2-tools.orig/configure.in	2006-08-21 15:16:06.221258000 -0700
> +++ ocfs2-tools/configure.in	2006-09-21 14:01:25.470930000 -0700
> @@ -97,6 +97,25 @@ AC_CHECK_HEADER(uuid/uuid.h, :,
>    AC_MSG_ERROR([Unable to find uuid headers]))
>  AC_SUBST(UUID_LIBS)
>  
> +NCURSES_LIBS=
> +AC_CHECK_LIB(ncurses, tgetstr, NCURSES_LIBS=-lncurses)
> +if test "x$NCURSES_LIBS" = "x"; then
> +  AC_MSG_ERROR([Unable to find ncurses library])
> +fi
> +AC_SUBST(NCURSES_LIBS)
> +
> +saved_LDFLAGS="$LDFLAGS"
> +LDFLAGS="$LDFLAGS -lncurses"
> +READLINE_LIBS=
> +AC_CHECK_LIB(readline, readline, READLINE_LIBS=-lreadline)
> +if test "x$READLINE_LIBS" = "x"; then
> +  AC_MSG_ERROR([Unable to find readline library])
> +fi
> +AC_CHECK_HEADER(readline/readline.h, :,
> +  AC_MSG_ERROR([Unable to find readline headers]))
> +AC_SUBST(READLINE_LIBS)
> +LDFLAGS="$saved_LDFLAGS"
> +
>  AC_MSG_CHECKING(for debug executables)
>  AC_ARG_ENABLE(debugexe, [  --enable-debugexe=[yes/no]     Enable debug executables for library source files [default=no]],,enable_debugexe=no)
>  OCFS2_DEBUG_EXE=
> Index: ocfs2-tools/Config.make.in
> ===================================================================
> --- ocfs2-tools.orig/Config.make.in	2006-09-20 17:38:49.753833000 -0700
> +++ ocfs2-tools/Config.make.in	2006-09-21 14:03:14.482489000 -0700
> @@ -51,6 +51,8 @@ LDFLAGS = @LDFLAGS@ 
>  COM_ERR_CFLAGS = @COM_ERR_CFLAGS@
>  COM_ERR_LIBS = @COM_ERR_LIBS@
>  UUID_LIBS = @UUID_LIBS@
> +READLINE_LIBS = @READLINE_LIBS@
> +NCURSES_LIBS = @NCURSES_LIBS@
>  
>  GLIB_CFLAGS = @GLIB_CFLAGS@
>  GLIB_LIBS = @GLIB_LIBS@
> Index: ocfs2-tools/debugfs.ocfs2/Makefile
> ===================================================================
> --- ocfs2-tools.orig/debugfs.ocfs2/Makefile	2006-02-16 16:32:54.191920000 -0800
> +++ ocfs2-tools/debugfs.ocfs2/Makefile	2006-09-21 14:02:14.052636000 -0700
> @@ -44,6 +44,6 @@ dist-subdircreate:
>  	$(TOPDIR)/mkinstalldirs $(DIST_DIR)/include
>  
>  debugfs.ocfs2: $(OBJS)
> -	$(LINK) $(GLIB_LIBS) $(LIBOCFS2_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) -lreadline -lncurses
> +	$(LINK) $(GLIB_LIBS) $(LIBOCFS2_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(READLINE_LIBS) $(NCURSES_LIBS)
>  
>  include $(TOPDIR)/Postamble.make


-- 

Life's Little Instruction Book #314

	"Never underestimate the power of forgiveness."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list