mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-10 08:10:49 +00:00
Various configure/build tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40062 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
116e5f8211
commit
33ed35331b
17 changed files with 73 additions and 119 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
2016-08-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* config/objc-common.g: Darwin patch by David Wetzel
|
||||
* Source/CompatibilityHeaders.make: Delete obsolete file
|
||||
* configure.ac: Check for libdispatch runloop integration functions
|
||||
* Headers/GNUstepBase/GSConfig.h.in: New define for libdispatch
|
||||
* config.mak.in: New define for libdispatch
|
||||
* Tests/base/NSRunLoop/dispatch.m: Use new define
|
||||
* configure: Regenerate
|
||||
* Source/Additions/Makefile.preamble:
|
||||
* Source/GNUmakefile:
|
||||
* Source/Makefile.postamble:
|
||||
* Source/Makefile.preamble:
|
||||
* Source/ObjectiveC2/Makefile.preamble:
|
||||
* Source/unix/Makefile.preamble:
|
||||
* Source/win32/Makefile.preamble:
|
||||
* Tools/Makefile.preamble:
|
||||
* Tools/make_strings/GNUmakefile.preamble:
|
||||
Mostly tweaks for building cleanly non-flattened and removal of a few
|
||||
long deprecated directories/headers.
|
||||
Configuration time change by David Wetzel for building on OSX
|
||||
|
||||
2016-07-27 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Header/Foundation/NSData.h
|
||||
|
|
|
@ -269,6 +269,7 @@ typedef struct {
|
|||
#define GS_USE_MDNS @HAVE_MDNS@
|
||||
#define GS_USE_ICU @HAVE_ICU@
|
||||
#define GS_USE_LIBDISPATCH @HAVE_LIBDISPATCH@
|
||||
#define GS_USE_LIBDISPATCH_RUNLOOP @HAVE_LIBDISPATCH_RUNLOOP@
|
||||
#define GS_HAVE_OBJC_ROOT_CLASS_ATTR @GS_HAVE_OBJC_ROOT_CLASS_ATTR@
|
||||
|
||||
#ifndef __has_include
|
||||
|
|
|
@ -58,7 +58,6 @@ endif
|
|||
ADDITIONAL_CFLAGS =
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
# FIXME - the -I../ is for GSPrivate.h
|
||||
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR) -I../
|
||||
|
||||
# We include the main base Headers if we are building using the base library
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
# -*-makefile-*-
|
||||
# CompatibilityHeaders.make
|
||||
#
|
||||
# Create compatibility headers so that code written before the big header
|
||||
# move will continue to compile (for a while).
|
||||
#
|
||||
# Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
#
|
||||
#
|
||||
# Author: Alexander Malmberg <alexander@malmberg.org>
|
||||
# Date: 2003-07-29
|
||||
#
|
||||
# This file is part of the GNUstep project.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either
|
||||
# version 2 of the License, or (at your option) any later version.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public
|
||||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
# The usage should be fairly obvious. For each pair of OLD_DIR and NEW_DIR,
|
||||
# make a copy and set OLD_DIR, NEW_DIR, and LIST. Note that LIST must be
|
||||
# non-empty; if there are no files for a pair, remove it completely.
|
||||
|
||||
after-install::
|
||||
@echo Installing compatibility headers...
|
||||
|
||||
@OLD_DIR=Foundation; NEW_DIR=GNUstepBase; \
|
||||
LIST="GSXML.h GSMime.h" ;\
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
for I in $$LIST ; do \
|
||||
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done
|
||||
|
||||
@OLD_DIR=gnustep/unicode; NEW_DIR=GNUstepBase/unicode; \
|
||||
LIST="caseconv.h cop.h cyrillic.h latin2.h decomp.h nextstep.h" ;\
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
for I in $$LIST ; do \
|
||||
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I;\
|
||||
done
|
||||
|
||||
@OLD_DIR=gnustep/base; NEW_DIR=GNUstepBase; \
|
||||
LIST="$(GNU_HEADERS)" ;\
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
for I in $$LIST ; do \
|
||||
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done
|
||||
|
||||
|
||||
before-uninstall::
|
||||
-@OLD_DIR=Foundation; NEW_DIR=GNUstepBase; \
|
||||
LIST="GSXML.h GSMime.h" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done;
|
||||
|
||||
-@OLD_DIR=gnustep/unicode; NEW_DIR=GNUstepBase/unicode; \
|
||||
LIST="caseconv.h cop.h cyrillic.h latin2.h decomp.h nextstep.h" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done; \
|
||||
rmdir $(GNUSTEP_HEADERS)/$$OLD_DIR
|
||||
|
||||
-@OLD_DIR=gnustep/base; NEW_DIR=GNUstepBase; \
|
||||
LIST="$(GNU_HEADERS)" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done; \
|
||||
rmdir $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
rmdir $(GNUSTEP_HEADERS)/gnustep
|
|
@ -484,7 +484,6 @@ HEADERS_INSTALL = \
|
|||
GENERATED_HFILES = \
|
||||
dynamic-load.h \
|
||||
$(GNUSTEP_TARGET_DIR)/config.h \
|
||||
$(GNUSTEP_TARGET_DIR)/common.h \
|
||||
$(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h
|
||||
|
||||
|
||||
|
@ -543,4 +542,3 @@ include $(GNUSTEP_MAKEFILES)/resource-set.make
|
|||
|
||||
-include Makefile.postamble
|
||||
|
||||
include CompatibilityHeaders.make
|
||||
|
|
|
@ -55,18 +55,14 @@ after-install::
|
|||
$(GNUSTEP_HEADERS)/ObjectiveC2/objc/$$file ; \
|
||||
done
|
||||
endif
|
||||
# Unfortunately the way the header files are placed in relationship
|
||||
# to the source we must install the GNU header manually
|
||||
# Ayers 2003-07-31: This statement should be reevaluated!
|
||||
after-install::
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/GNUstepBase
|
||||
for file in $(GNUSTEPBASE_HEADERS); do \
|
||||
$(INSTALL_DATA) ../Headers/GNUstepBase/$$file \
|
||||
$(GNUSTEP_HEADERS)/GNUstepBase/$$file ; \
|
||||
done
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/$(GNUSTEP_TARGET_DIR)/GNUstepBase
|
||||
$(INSTALL_DATA) $(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h \
|
||||
$(GNUSTEP_HEADERS)/$(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h
|
||||
$(GNUSTEP_HEADERS)/GNUstepBase/GSConfig.h
|
||||
if [ "$(DESTDIR)" = "" ]; then \
|
||||
services=/etc/services; \
|
||||
if [ "`$(WHOAMI)`" != root ]; then \
|
||||
|
@ -109,6 +105,8 @@ after-clean::
|
|||
|
||||
# Things to do after distcleaning
|
||||
after-distclean::
|
||||
rm -f $(GNUSTEP_TARGET_DIR)/config.h
|
||||
rm -f $(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h
|
||||
# rm -rf $(GNUSTEP_TARGET_DIR)
|
||||
|
||||
# Things to do before checking
|
||||
|
@ -122,23 +120,20 @@ dynamic-load.h: ../config.status
|
|||
cp $(DYNAMIC_LINKER)-load.h dynamic-load.h
|
||||
|
||||
#
|
||||
# The config.h file is specific to a target
|
||||
# The following header files are specific to a target, so to enable multiple
|
||||
# builds in the same directory, we copy them to a target-specific subdirectory
|
||||
# which will be found by the compiler first when compiling for that target
|
||||
#
|
||||
ifneq ($(GNUSTEP_TARGET_DIR),.)
|
||||
$(GNUSTEP_TARGET_DIR)/config.h: ../config.status
|
||||
$(MKDIRS) $(GNUSTEP_TARGET_DIR)
|
||||
-mv $(HEADER_DIR_BASE)/config.h $(GNUSTEP_TARGET_DIR)
|
||||
-cp $(HEADER_DIR_BASE)/config.h $(GNUSTEP_TARGET_DIR)
|
||||
-touch $(GNUSTEP_TARGET_DIR)/config.h
|
||||
|
||||
$(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h: ../config.status
|
||||
$(MKDIRS) $(GNUSTEP_TARGET_DIR)/GNUstepBase
|
||||
-mv $(HEADER_DIR_BASE)/GSConfig.h $(GNUSTEP_TARGET_DIR)/GNUstepBase
|
||||
-cp $(HEADER_DIR_BASE)/GSConfig.h $(GNUSTEP_TARGET_DIR)/GNUstepBase
|
||||
-touch $(GNUSTEP_TARGET_DIR)/GNUstepBase/GSConfig.h
|
||||
|
||||
ifneq ($(GNUSTEP_TARGET_DIR),.)
|
||||
$(GNUSTEP_TARGET_DIR)/common.h: common.h
|
||||
$(MKDIRS) $(GNUSTEP_TARGET_DIR)
|
||||
cp common.h $(GNUSTEP_TARGET_DIR)/common.h
|
||||
-touch $(GNUSTEP_TARGET_DIR)/common.h
|
||||
endif
|
||||
|
||||
#
|
||||
|
|
|
@ -89,8 +89,7 @@ endif
|
|||
|
||||
# Additional directories to be created during installation
|
||||
ADDITIONAL_INSTALL_DIRS = $(GNUSTEP_HEADERS)/Foundation \
|
||||
$(GNUSTEP_HEADERS)/GNUstepBase/unicode \
|
||||
$(GNUSTEP_HEADERS)/$(GNUSTEP_TARGET_DIR)
|
||||
$(GNUSTEP_HEADERS)/GNUstepBase \
|
||||
|
||||
HEADER_DIR_BASE = ../Headers/GNUstepBase
|
||||
HEADER_DIR_FND = ../Headers/Foundation
|
||||
|
|
|
@ -57,7 +57,6 @@ endif
|
|||
ADDITIONAL_CFLAGS =
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
# FIXME - the -I../ is for GSPrivate.h
|
||||
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR) -I../ -I../../Headers
|
||||
|
||||
# Additional LDFLAGS to pass to the linker
|
||||
|
|
|
@ -57,7 +57,7 @@ endif
|
|||
ADDITIONAL_CFLAGS =
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR)
|
||||
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR) -I../
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),gnu)
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../Headers
|
||||
|
|
|
@ -57,7 +57,7 @@ endif
|
|||
ADDITIONAL_CFLAGS =
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR)
|
||||
ADDITIONAL_INCLUDE_DIRS = -I../$(GNUSTEP_TARGET_DIR) -I../
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),gnu)
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../Headers
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#import "ObjectTesting.h"
|
||||
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSThread.h>
|
||||
#import <Foundation/NSTimer.h>
|
||||
#import <Foundation/NSRunLoop.h>
|
||||
#import "../../../Source/config.h"
|
||||
#import "Foundation/NSAutoreleasePool.h"
|
||||
#import "Foundation/NSThread.h"
|
||||
#import "Foundation/NSTimer.h"
|
||||
#import "Foundation/NSRunLoop.h"
|
||||
#import "GNUstepBase/GSConfig.h"
|
||||
|
||||
const NSTimeInterval kDelay = 0.01;
|
||||
|
||||
#if HAVE_DISPATCH_GET_MAIN_QUEUE_HANDLE_NP && HAVE_DISPATCH_MAIN_QUEUE_DRAIN_NP && __has_feature(blocks)
|
||||
#if HAVE_LIBDISPATCH_RUNLOOP && __has_feature(blocks)
|
||||
# define DISPATCH_RL_INTEGRATION 1
|
||||
# ifdef HAVE_DISPATCH_H
|
||||
# include <dispatch.h>
|
||||
|
|
|
@ -49,7 +49,7 @@ endif
|
|||
#ADDITIONAL_CFLAGS +=
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../Source/$(GNUSTEP_TARGET_DIR)
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../Source/$(GNUSTEP_TARGET_DIR) -I../Source/
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),gnu)
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../Headers
|
||||
|
|
|
@ -46,7 +46,7 @@ ADDITIONAL_OBJCFLAGS += $(WARN_FLAGS)
|
|||
#ADDITIONAL_CFLAGS +=
|
||||
|
||||
# Additional include directories the compiler should search
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../Source/$(GNUSTEP_TARGET_DIR)
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../Source/$(GNUSTEP_TARGET_DIR) -I../../Source/
|
||||
|
||||
ifeq ($(FOUNDATION_LIB),gnu)
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../../Headers
|
||||
|
|
|
@ -41,6 +41,7 @@ GNUSTEP_BASE_HAVE_MDNS=@HAVE_MDNS@
|
|||
GNUSTEP_BASE_HAVE_AVAHI=@HAVE_AVAHI@
|
||||
GNUSTEP_BASE_HAVE_ICU=@HAVE_ICU@
|
||||
GNUSTEP_BASE_HAVE_LIBDISPATCH=@HAVE_LIBDISPATCH@
|
||||
GNUSTEP_BASE_HAVE_LIBDISPATCH_RUNLOOP=@HAVE_LIBDISPATCH_RUNLOOP@
|
||||
|
||||
# Default to building only -baseadd
|
||||
# on non *-gnu-* library combos
|
||||
|
|
|
@ -16,13 +16,6 @@
|
|||
#include <objc/hooks.h>
|
||||
#endif
|
||||
|
||||
|
||||
#if HAVE_OBJC_ROOT_CLASS_ATTRIBUTE
|
||||
#define GS_OBJC_ROOT_CLASS __attribute__((objc_root_class))
|
||||
#else
|
||||
#define GS_OBJC_ROOT_CLASS
|
||||
#endif
|
||||
|
||||
/* Provide an implementation of NXConstantString for an old libobjc when
|
||||
built stand-alone without an NXConstantString implementation. */
|
||||
#if !defined(NeXT_RUNTIME) && !defined(__GNUSTEP_RUNTIME__)
|
||||
|
@ -38,6 +31,14 @@
|
|||
@end
|
||||
#endif
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
|
||||
#if HAVE_OBJC_ROOT_CLASS_ATTRIBUTE
|
||||
#define GS_OBJC_ROOT_CLASS __attribute__((objc_root_class))
|
||||
#else
|
||||
#define GS_OBJC_ROOT_CLASS
|
||||
#endif
|
||||
|
||||
/* Provide dummy implementations for NSObject and NSConstantString
|
||||
* for libobjc2 which needs them.
|
||||
*/
|
||||
|
@ -63,3 +64,5 @@ GS_OBJC_ROOT_CLASS @interface NSObject
|
|||
@end
|
||||
@implementation NSConstantString
|
||||
@end
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
|
|
9
configure
vendored
9
configure
vendored
|
@ -632,6 +632,7 @@ WARN_FLAGS
|
|||
LDIR_FLAGS
|
||||
INCLUDE_FLAGS
|
||||
USE_GMP
|
||||
HAVE_LIBDISPATCH_RUNLOOP
|
||||
HAVE_LIBDISPATCH
|
||||
HAVE_ICU
|
||||
ICU_LIBS
|
||||
|
@ -12351,6 +12352,7 @@ $as_echo "no" >&6; };
|
|||
fi
|
||||
|
||||
|
||||
HAVE_LIBDISPATCH_RUNLOOP=0
|
||||
if test $HAVE_LIBDISPATCH = 1; then
|
||||
# We check whether we have a variant of libdispatch that allows runloop
|
||||
# integration
|
||||
|
@ -12366,7 +12368,14 @@ _ACEOF
|
|||
fi
|
||||
done
|
||||
|
||||
if test "$ac_cv_func_dispatch_main_queue_drain_np" = "no"; then
|
||||
HAVE_LIBDISPATCH_RUNLOOP=1
|
||||
fi
|
||||
if test "$ac_cv_func_dispatch_get_main_queue_handle_np" = "no"; then
|
||||
HAVE_LIBDISPATCH_RUNLOOP=1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check GMP for NSDecimal
|
||||
|
|
10
configure.ac
10
configure.ac
|
@ -56,7 +56,7 @@
|
|||
# In addition the values should be substituted into the header file
|
||||
# Headers/GNUstepBase/GSConfig.h.in so that it can define a
|
||||
# preprocessor constant of the form GS_USE_XXX to 1 or 0, providing a
|
||||
# standard mechanism for parts of a paritcvular file to compile to make
|
||||
# standard mechanism for parts of a particular file to compile to make
|
||||
# use of the external code or not.
|
||||
# This file is included by all the base library source code, and may also
|
||||
# be included by code which uses the base library.
|
||||
|
@ -3387,11 +3387,19 @@ if test $enable_libdispatch = yes; then
|
|||
fi
|
||||
AC_SUBST(HAVE_LIBDISPATCH)
|
||||
|
||||
HAVE_LIBDISPATCH_RUNLOOP=0
|
||||
if test $HAVE_LIBDISPATCH = 1; then
|
||||
# We check whether we have a variant of libdispatch that allows runloop
|
||||
# integration
|
||||
AC_CHECK_FUNCS(dispatch_main_queue_drain_np dispatch_get_main_queue_handle_np)
|
||||
if test "$ac_cv_func_dispatch_main_queue_drain_np" = "no"; then
|
||||
HAVE_LIBDISPATCH_RUNLOOP=1
|
||||
fi
|
||||
if test "$ac_cv_func_dispatch_get_main_queue_handle_np" = "no"; then
|
||||
HAVE_LIBDISPATCH_RUNLOOP=1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(HAVE_LIBDISPATCH_RUNLOOP)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check GMP for NSDecimal
|
||||
|
|
Loading…
Reference in a new issue