8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

Editline changes:

o got a FB-compliant makefile
 o uses configure
 o eventually compiles on SINIX-Z
This commit is contained in:
eku 2003-03-12 12:39:58 +00:00
parent 6545a8fae5
commit 6cbd82fea8
9 changed files with 119 additions and 23 deletions

View File

@ -0,0 +1,72 @@
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# You may obtain a copy of the Licence at
# http://www.gnu.org/licences/lgpl.html
#
# As a special exception this file can also be included in modules
# with other source code as long as that source code has been
# released under an Open Source Initiative certificed licence.
# More information about OSI certification can be found at:
# http://www.opensource.org
#
# This module is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public Licence for more details.
#
# This module was created by members of the firebird development
# team. All individual contributions remain the Copyright (C) of
# those individuals and all rights are reserved. Contributors to
# this file are either listed below or can be obtained from a CVS
# history command.
#
# Created by: Erik Kunze <Erik.Kunze@philosys.de>
#
# Contributor(s):
#
#
# $Id: Makefile.in.extern.editline,v 1.1 2003-03-12 12:39:56 eku Exp $
#
ROOT=..
ObjModuleName=editline
## Set your options:
## -DANSI_ARROWS ANSI arrows keys work like emacs.
## -DHIDE Make static functions static (non debug).
## -DHIST_SIZE=n History size.
## -DUNIQUE_HISTORY Don't save command if same as last one.
## -DDO_SIGTSTP Send SIGTSTP on "suspend" key
CFLAGS:= -DANSI_ARROWS -DHIDE -DHIST_SIZE=100 -DUNIQUE_HISTORY -DSYS_UNIX
include $(ROOT)/gen/make.platform
include $(ROOT)/gen/make.rules
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
EDITLINE_Files = editline.c complete.c sysunix.c
EDITLINE_Sources = $(addprefix extern/editline/, $(EDITLINE_Files))
EDITLINE_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(EDITLINE_Sources))))
AllObjects = $(EDITLINE_Objects)
Dependencies = $(AllObjects:.o=.d)
.PHONY: libeditline
libeditline : $(LIB)/libeditline.a
$(LIB)/libeditline.a: $(EDITLINE_Objects)
-$(RM) $@
$(AR) $@ $^
-$(RANLIB) $@
$(CHMOD_6) $@
include $(ROOT)/gen/make.shared.targets
-include $(Dependencies)

View File

@ -27,7 +27,7 @@
# Contributor(s): # Contributor(s):
# #
# #
# $Id: Makefile.in.firebird,v 1.29 2003-03-05 16:19:08 brodsom Exp $ # $Id: Makefile.in.firebird,v 1.30 2003-03-12 12:39:56 eku Exp $
# #
ROOT=.. ROOT=..
@ -183,13 +183,13 @@ jrd/build_no.h : misc/writeBuildNum.sh
# #
EXTERNAL_LIBRARIES= EXTERNAL_LIBRARIES=
ifeq ($(EDITLINE_FLG),Y) ifeq ($(EDITLINE_FLG),Y)
EXTERNAL_LIBRARIES:= $(EXTERNAL_LIBRARIES) $(LIBEDIT_A) EXTERNAL_LIBRARIES:= $(EXTERNAL_LIBRARIES) $(LIBEDITLINE_A)
endif endif
external_libraries: $(EXTERNAL_LIBRARIES) external_libraries: $(EXTERNAL_LIBRARIES)
$(LIBEDIT_A): $(LIBEDITLINE_A):
$(MAKE) -C $(SRC_ROOT)/extern/editline $(MAKE) -f $(MAKE_ROOT)/Makefile.extern.editline
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------

View File

@ -26,7 +26,7 @@
# Contributor(s): # Contributor(s):
# #
# #
# $Id: make.defaults,v 1.17 2003-03-05 15:49:07 brodsom Exp $ # $Id: make.defaults,v 1.18 2003-03-12 12:39:56 eku Exp $
# #
@ -131,7 +131,7 @@ LIBFBINTL_SO = $(FIREBIRD)/intl/libfbintl.$(SHRLIB_EXT)
LIBFBCOMMON_A = $(LIB)/libfbcommon.a LIBFBCOMMON_A = $(LIB)/libfbcommon.a
LIBFBSTATIC_A = $(LIB)/libfbstatic.a LIBFBSTATIC_A = $(LIB)/libfbstatic.a
LIBEDIT_A = $(LIB)/libedit.a LIBEDITLINE_A = $(LIB)/libeditline.a
ifdef UseSharedLibraries ifdef UseSharedLibraries
LIBGDS_LA = $(LIBGDS_SO) LIBGDS_LA = $(LIBGDS_SO)

View File

@ -1,4 +1,4 @@
dnl $Id: configure.in,v 1.128 2003-03-12 11:57:54 skidder Exp $ dnl $Id: configure.in,v 1.129 2003-03-12 12:39:54 eku Exp $
dnl ############################# INITIALISATION ############################### dnl ############################# INITIALISATION ###############################
@ -100,7 +100,7 @@ case "$target" in
PLATFORM="SINIX-Z" PLATFORM="SINIX-Z"
AC_DEFINE(SINIXZ) AC_DEFINE(SINIXZ)
LOCK_MANAGER_FLG=N LOCK_MANAGER_FLG=N
EDITLINE_FLG=N EDITLINE_FLG=Y
SHRLIB_EXT=so SHRLIB_EXT=so
;; ;;
@ -290,9 +290,10 @@ AC_CHECK_HEADERS(stdlib.h)
AC_CHECK_HEADERS(string.h) AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(signal.h) AC_CHECK_HEADERS(signal.h)
if test "$EDITLINE_FLG" = "Y"; then if test "$EDITLINE_FLG" = "Y"; then
AC_CHECK_HEADERS(termio.h termios.h)
AC_HEADER_DIRENT
AC_DEFINE(HAVE_EDITLINE_H) AC_DEFINE(HAVE_EDITLINE_H)
fi fi
AC_CHECK_HEADERS(pwd.h)
AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(varargs.h) AC_CHECK_HEADERS(varargs.h)
AC_CHECK_HEADERS(crypt.h) AC_CHECK_HEADERS(crypt.h)
@ -314,7 +315,7 @@ AC_CHECK_LIB(crypt, main)
AC_CHECK_LIB(curses, main) AC_CHECK_LIB(curses, main)
dnl AC_CHECK_LIB(termcap, main) dnl AC_CHECK_LIB(termcap, main)
if test "$EDITLINE_FLG" = "Y"; then if test "$EDITLINE_FLG" = "Y"; then
AC_SUBST(EDITLINE_A, -ledit) AC_SUBST(EDITLINE_A, -leditline)
fi fi
AC_CHECK_LIB(stdc++, main,,, $LIBS) AC_CHECK_LIB(stdc++, main,,, $LIBS)
@ -379,6 +380,7 @@ if test "$ac_cv_func_getmntent" = "yes"; then
[AC_DEFINE(GETMNTENT_TAKES_TWO_ARGUMENTS) AC_MSG_RESULT(yes)], [AC_DEFINE(GETMNTENT_TAKES_TWO_ARGUMENTS) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)]) [AC_MSG_RESULT(no)])
fi fi
AC_CHECK_FUNCS(tcgetattr strdup)
dnl Check for other things dnl Check for other things
@ -687,6 +689,8 @@ mkdir -p gen/libfbembed/common/classes
mkdir -p gen/libfbembed/common/config mkdir -p gen/libfbembed/common/config
mkdir -p gen/RPM/RPMS/i686 mkdir -p gen/RPM/RPMS/i686
mkdir -p gen/RPM/BUILD mkdir -p gen/RPM/BUILD
mkdir -p gen/editline/extern/editline
]) ])
@ -769,6 +773,7 @@ gen/Makefile.embed.gpre:${MAKE_SRC_DIR}/Makefile.in.embed.gpre
src/v5_examples/Makefile:${MAKE_SRC_DIR}/Makefile.in.example5 src/v5_examples/Makefile:${MAKE_SRC_DIR}/Makefile.in.example5
gen/Makefile.install:src/install/arch-specific/${MAKEFILE_PREFIX}/Makefile.in gen/Makefile.install:src/install/arch-specific/${MAKEFILE_PREFIX}/Makefile.in
Makefile:Makefile.in Makefile:Makefile.in
gen/Makefile.extern.editline:${MAKE_SRC_DIR}/Makefile.in.extern.editline
) )

View File

@ -1,11 +1,11 @@
/* $Revision: 1.1 $ /* $Revision: 1.2 $
** **
** History and file completion functions for editline library. ** History and file completion functions for editline library.
*/ */
#include "editline.h" #include "editline.h"
#if defined(NEED_STRDUP) #ifndef HAVE_STRDUP
/* /*
** Return an allocated copy of a string. ** Return an allocated copy of a string.
*/ */
@ -19,7 +19,7 @@ strdup(p)
(void)strcpy(new, p); (void)strcpy(new, p);
return new; return new;
} }
#endif /* defined(NEED_STRDUP) */ #endif /* !HAVE_STRDUP */
/* /*
** strcmp-like sorting predicate for qsort. ** strcmp-like sorting predicate for qsort.

View File

@ -1,12 +1,15 @@
/* $Revision: 1.1 $ /* $Revision: 1.2 $
** **
** Internal header file for editline library. ** Internal header file for editline library.
*/ */
#include "gen/autoconfig.h"
#include <stdio.h> #include <stdio.h>
#if defined(HAVE_STDLIB) #if defined(HAVE_STDLIB_H)
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#endif /* defined(HAVE_STDLIB) */ #endif /* defined(HAVE_STDLIB_H) */
#if defined(SYS_UNIX) #if defined(SYS_UNIX)
#include "unix.h" #include "unix.h"
#endif /* defined(SYS_UNIX) */ #endif /* defined(SYS_UNIX) */
@ -63,7 +66,7 @@ extern int rl_list_possib();
extern void rl_ttyset(); extern void rl_ttyset();
extern void rl_add_slash(); extern void rl_add_slash();
#if !defined(HAVE_STDLIB) #if !defined(HAVE_STDLIB_H)
extern char *getenv(); extern char *getenv();
extern char *malloc(); extern char *malloc();
extern char *realloc(); extern char *realloc();
@ -76,4 +79,4 @@ extern char *strdup();
extern int strcmp(); extern int strcmp();
extern int strlen(); extern int strlen();
extern int strncmp(); extern int strncmp();
#endif /* !defined(HAVE_STDLIB) */ #endif /* !defined(HAVE_STDLIB_H) */

View File

@ -1,4 +1,4 @@
/* $Revision: 1.1 $ /* $Revision: 1.2 $
** **
** Editline system header file for Unix. ** Editline system header file for Unix.
*/ */
@ -9,13 +9,13 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#if defined(USE_DIRENT) #ifdef HAVE_DIRENT_H
#include <dirent.h> #include <dirent.h>
typedef struct dirent DIRENTRY; typedef struct dirent DIRENTRY;
#else #else
#include <sys/dir.h> #include <sys/dir.h>
typedef struct direct DIRENTRY; typedef struct direct DIRENTRY;
#endif /* defined(USE_DIRENT) */ #endif /* HAVE_DIRENT_H */
#if !defined(S_ISDIR) #if !defined(S_ISDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)

View File

@ -98,6 +98,12 @@
#define HAVE_STRING_H #define HAVE_STRING_H
#define HAVE_SIGNAL_H #define HAVE_SIGNAL_H
#undef HAVE_EDITLINE_H #undef HAVE_EDITLINE_H
#undef HAVE_TERMIO_H
#undef HAVE_TERMIOS_H
#undef HAVE_DIRENT_H
#undef HAVE_SYS_NDIR_H
#undef HAVE_SYS_DIR_H
#undef HAVE_NDIR_H
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
#undef HAVE_VARARGS_H #undef HAVE_VARARGS_H
#undef HAVE_VFORK_H #undef HAVE_VFORK_H
@ -153,6 +159,8 @@
#undef HAVE_SETMNTENT #undef HAVE_SETMNTENT
#undef HAVE_GETMNTENT #undef HAVE_GETMNTENT
#undef GETMNTENT_TAKES_TWO_ARGUMENTS #undef GETMNTENT_TAKES_TWO_ARGUMENTS
#undef HAVE_TCGETATTR
#define HAVE_STRDUP
/* Types */ /* Types */

View File

@ -1,4 +1,4 @@
#ident "$Id: config.h.in,v 1.72 2003-02-20 06:36:40 eku Exp $" #ident "$Id: config.h.in,v 1.73 2003-03-12 12:39:58 eku Exp $"
/* /*
* 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports: * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:
@ -46,6 +46,12 @@
#undef HAVE_STDLIB_H #undef HAVE_STDLIB_H
#undef HAVE_STRING_H #undef HAVE_STRING_H
#undef HAVE_SIGNAL_H #undef HAVE_SIGNAL_H
#undef HAVE_TERMIO_H
#undef HAVE_TERMIOS_H
#undef HAVE_DIRENT_H
#undef HAVE_SYS_NDIR_H
#undef HAVE_SYS_DIR_H
#undef HAVE_NDIR_H
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
#undef HAVE_VARARGS_H #undef HAVE_VARARGS_H
#undef HAVE_VFORK_H #undef HAVE_VFORK_H
@ -101,6 +107,8 @@
#undef HAVE_SETMNTENT #undef HAVE_SETMNTENT
#undef HAVE_GETMNTENT #undef HAVE_GETMNTENT
#undef GETMNTENT_TAKES_TWO_ARGUMENTS #undef GETMNTENT_TAKES_TWO_ARGUMENTS
#undef HAVE_TCGETATTR
#undef HAVE_STRDUP
/* Types */ /* Types */