Tidy up Makefile: double negative condition check si not good.

PR:		23504
Submitted by:	Giorgos Keramidas <keramida@westgate.gr>

remove xpg4 hack and process it through autoconf.
This commit is contained in:
FUJISHIMA Satsuki 2001-09-22 21:56:21 +00:00
parent 524f2c482c
commit c1c1b2fca0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=48090
4 changed files with 20 additions and 62 deletions

View File

@ -16,11 +16,11 @@ MAINTAINER= ports@FreeBSD.org
USE_AUTOCONF= yes
USE_GMAKE= yes
CONFIGURE_TARGET= ${MACHINE_ARCH}--freebsd
.if !defined(WITHOUT_X11)
.if defined(WITHOUT_X11)
CONFIGURE_ARGS= --with-x=no --with-pop
.else
CONFIGURE_ARGS= --with-x-toolkit --with-pop
USE_XLIB= yes
.else
CONFIGURE_ARGS= --with-x=no --with-pop
.endif
MAKE_ENV= INSTALL_SCRIPT="${INSTALL_SCRIPT}"
@ -28,16 +28,6 @@ MAN1= emacs.1 etags.1 ctags.1
PLIST_SUB= EMACS_VER=20.7 EMACS_ARCH=${CONFIGURE_TARGET}
#WRKSRC= ${WRKDIR}/emacs-20.7
.if defined(WITH_XPG4)
CONFIGURE_ARGS+= --with-xpg4
.endif
pre-fetch:
.if !defined(WITH_XPG4)
@${ECHO_MSG} "NOTE: You can have international locale library support "
@${ECHO_MSG} "by adding \"WITH_XPG4=yes\" to argument of make."
.endif
pre-build:
${RM} -rf ${WRKSRC}/info/*

View File

@ -1,26 +1,6 @@
--- src/s/freebsd.h.orig Tue May 2 21:29:10 2000
+++ src/s/freebsd.h Sat Jul 1 20:17:45 2000
@@ -41,8 +41,18 @@
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
+/* Use XPG4 Library for FreeBSD */
+#define LIBS_XPG
+#if (__FreeBSD_version >= 220000 && __FreeBSD_version < 400020) \
+ || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500005)
+#ifdef USE_XPG
+#undef LIBS_XPG
+#define LIBS_XPG -lxpg4
+#endif
+#endif
+
#define LIBS_DEBUG
-#define LIBS_SYSTEM -lutil
+#define LIBS_SYSTEM -lutil LIBS_XPG
#if __FreeBSD_version < 400000
#define LIBS_TERMCAP -ltermcap
#endif
@@ -56,9 +66,16 @@
+++ src/s/freebsd.h Sun Sep 23 05:30:49 2001
@@ -56,9 +56,16 @@
#ifdef __ELF__
#define LD_SWITCH_SYSTEM

View File

@ -1,16 +1,6 @@
--- configure.in.orig Tue Jun 6 00:42:49 2000
+++ configure.in Sat Jul 1 20:46:31 2000
@@ -42,6 +42,9 @@
AC_ARG_WITH(hesiod,
[ --with-hesiod support Hesiod to get the POP server host],
[AC_DEFINE(HESIOD)])
+AC_ARG_WITH(xpg4,
+[ --with-xpg4 support XPG4 library on FreeBSD system],
+[AC_DEFINE(USE_XPG)])
dnl This should be the last --with option, because --with-x is
dnl added later on when we find the path of X, and it's best to
dnl keep them together visually.
@@ -147,6 +150,15 @@
+++ configure.in Sun Sep 23 06:53:04 2001
@@ -147,6 +147,15 @@
machine='' opsys='' unported=no
case "${canonical}" in
@ -26,7 +16,7 @@
## NetBSD ports
*-*-netbsd* )
opsys=netbsd
@@ -958,7 +970,6 @@
@@ -958,7 +967,6 @@
;;
*-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
*-386bsd* ) opsys=386bsd ;;
@ -34,7 +24,7 @@
*-nextstep* ) opsys=nextstep ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
@@ -1639,7 +1650,7 @@
@@ -1639,7 +1647,7 @@
rename closedir mkdir rmdir sysinfo \
random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
@ -43,3 +33,11 @@
# UNIX98 PTYs.
AC_CHECK_FUNCS(grantpt)
@@ -1656,6 +1664,7 @@
# Solaris requires -lintl if you want strerror (which calls dgettext)
# to return localized messages.
AC_CHECK_LIB(intl, dgettext)
+AC_CHECK_LIB(xpg4, _xpg4_setrunelocale)
AC_MSG_CHECKING(whether localtime caches TZ)
AC_CACHE_VAL(emacs_cv_localtime_cache,

View File

@ -1,16 +1,6 @@
--- src/config.in.orig Mon Jun 26 19:06:49 2000
+++ src/config.in Mon Jun 26 19:07:38 2000
@@ -118,6 +118,9 @@
/* Define to support using a Hesiod database to find the POP server. */
#undef HESIOD
+/* Define to support using a XPG4 library on FreeBSD system. */
+#undef USE_XPG
+
/* Some things figured out by the configure script, grouped as they are in
configure.in. */
#ifndef _ALL_SOURCE /* suppress warning if this is pre-defined */
@@ -236,6 +239,7 @@
--- src/config.in.orig Sat May 20 23:58:21 2000
+++ src/config.in Sun Sep 23 05:33:27 2001
@@ -236,6 +236,7 @@
#undef HAVE_STRFTIME
#undef HAVE_GRANTPT
#undef HAVE_GETPT