/***************************************************************************
 * #define HAVE_READLINE
 *
 * To add builtin support for the readline library.  Also make sure that the 
 * include and lib settings are correct for your readline library installation.
 * This currently only effects the FvwmConsole module.
 ***************************************************************************/
/*#define HAVE_READLINE */

/***************************************************************************
 * #define HAVE_PERL5002
 *
 * If you have perl 5.002 or later and
 * use alternative command editor.
 *
 ***************************************************************************/
#define HAVE_PERL5002


BINDIR = $(FVWMDIR)
FVWM_SRCDIR = ../.. 
#include "../../Fvwm.tmpl"

DESTDIR = 

LOCAL_LIBRARIES = $(FVWM_LIBS) $(XLIB)

PROGRAMS = FvwmConsole FvwmConsoleC 
CCOPTIONS = -Wall

SRCS1 = FvwmConsole.c 
OBJS1 = FvwmConsole.o 

ComplexProgramTarget_1(FvwmConsole,$(LOCAL_LIBRARIES),)

#ifdef HAVE_READLINE
ADD_INCLUDE = -I/usr/local/include
ADD_LIB = -lreadline -ltermcap
EXTRA_DEFINES = -DHAVE_READLINE
#endif


SRCS2 = FvwmConsoleC.c getline.c
OBJS2 = FvwmConsoleC.o getline.o

AllTarget(FvwmConsoleC)
NormalProgramTarget(FvwmConsoleC,$(OBJS2),,$(ADD_LIB),)
InstallProgram(FvwmConsoleC,$(FVWMDIR))

#ifdef HAVE_PERL5002
install:: FvwmConsoleC.pl
	/bin/sh changepath.sh

InstallProgram(FvwmConsoleC.pl,$(FVWMDIR))
InstallManPage(FvwmConsoleC.pl,$(MANDIR))
#endif



