Add check for Apple cc

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@18423 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2004-01-15 17:20:20 +00:00
parent 9134e5a444
commit 9aba042a40
6 changed files with 162 additions and 53 deletions

View file

@ -1,3 +1,11 @@
2004-01-15 Adam Fedor <fedor@gnu.org>
* configure.ac: Add check for Apple cc
* config.make.in: Add CC_TYPE
* target.make (darwin): Use it instead of OBJC_COMPILER.
* Documentation/machines.texi: Update
Wed Jan 14 18:59:25 2004 Nicola Pero <n.pero@mi.flashnet.it>
* Master/rpm.make: Use PACKAGE_VERSION instead of VERSION.

View file

@ -2,7 +2,7 @@
@setfilename machines.info
@ifclear HOWTO
@c Machine Specific, Darwin 6.x/PowerPC, , (DIR)
@node Machine Specific, Darwin 6.x/PowerPC, , (DIR)
@node Machine Specific
@chapter Machines
@end ifclear
@ -14,17 +14,19 @@ more popular operating systems. Some machines marked with
@menu
* Darwin 6.x/PowerPC::
* Debian/DEC-Alpha::
* Debian/i386::
* Debian/PowerPC::
* Debian/SPARC::
* FreeBSD 4.x::
* FreeBSD 3.x::
* FreeBSD 2.x::
* GNU-Linux/PowerPC::
* Irix 6.5/MIPS::
* MkLinux/PowerPC::
* RedHat/Intel::
* NetBSD::
* Netwinder::
* OpenBSD 3.x::
* OSF/Alpha::
* RedHat/Intel::
* Slackware/Intel::
* Solaris 2.5.1/Sparc::
* Solaris/Sparc::
@ -35,6 +37,7 @@ more popular operating systems. Some machines marked with
* Unixware-2.1.3/Intel::
* Windows with CYGWIN::
* Windows with MinGW::
* Yellowdog/PowerPC::
@end menu
A recommended compiler is listed for each machine, if known. You should try
@ -121,7 +124,7 @@ Make sure to configure gnustep-make with ./configure
@end table
@c -----------------------------------------
@node Debian/DEC-Alpha, FreeBSD 4.x, Darwin 6.x/PowerPC, Machine Specific
@node Debian/DEC-Alpha, Debian/i386, Darwin 6.x/PowerPC, Machine Specific
@section Debian/DEC-Alpha
@table @samp
@ -132,11 +135,59 @@ Unknown
Unknown
@item Special Instructions
Unknown
None
@end table
@c -----------------------------------------
@node FreeBSD 4.x, FreeBSD 3.x, Debian/DEC-Alpha, Machine Specific
@node Debian/i386, Debian/PowerPC, Debian/DEC-Alpha, Machine Specific
@section Debian/i386
Tested on sid.
@table @samp
@item Recommended compiler
Unknown
@item Extra libs needed
Unknown
@item Special Instructions
None
@end table
@c -----------------------------------------
@node Debian/PowerPC, Debian/SPARC, Debian/i386, Machine Specific
@section Debian/PowerPC
Tested on sid.
@table @samp
@item Recommended compiler
Unknown
@item Extra libs needed
Unknown
@item Special Instructions
None
@end table
@c -----------------------------------------
@node Debian/SPARC, FreeBSD 4.x, Debian/PowerPC, Machine Specific
@section Debian/SPARC
Tested on sid.
@table @samp
@item Recommended compiler
Unknown
@item Extra libs needed
Unknown
@item Special Instructions
None
@end table
@c -----------------------------------------
@node FreeBSD 4.x, FreeBSD 3.x, Debian/SPARC, Machine Specific
@section FreeBSD 4.x
@table @samp
@ -202,7 +253,7 @@ flags to configure: @code{CFLAGS="-I/usr/local/include"} and
@end table
@c -----------------------------------------
@node FreeBSD 2.x, GNU-Linux/PowerPC, FreeBSD 3.x, Machine Specific
@node FreeBSD 2.x, Irix 6.5/MIPS, FreeBSD 3.x, Machine Specific
@section FreeBSD 2.x (@emph{Unstable!})
@table @samp
@ -229,22 +280,7 @@ You need to use gmake not make to compile the GNUstep packages.
@end table
@c -----------------------------------------
@node GNU-Linux/PowerPC, Irix 6.5/MIPS, FreeBSD 2.x, Machine Specific
@section GNU-Linux/PowerPC (LinuxPPC, Yellowdog)
@table @samp
@item Recommended compiler
Standard
@item Extra libs needed
Standard (ffcall or libffi)
@item Special Instructions
@end table
@c -----------------------------------------
@node Irix 6.5/MIPS, MkLinux/PowerPC, GNU-Linux/PowerPC, Machine Specific
@node Irix 6.5/MIPS, MkLinux/PowerPC, FreeBSD 2.x, Machine Specific
@section Irix 6.5/MIPS
@table @samp
@ -270,21 +306,20 @@ No libffi-support: Use ffcall
@end table
@c -----------------------------------------
@node MkLinux/PowerPC, RedHat/Intel, Irix 6.5/MIPS, Machine Specific
@node MkLinux/PowerPC, NetBSD, Irix 6.5/MIPS, Machine Specific
@section MkLinux/PowerPC (@emph{Obsolete})
This configuration is no longer being tested, but it may still work.
@table @samp
@item Recommended compiler
egcs-2.90.25 980302 (egcs-1.0.2 prerelease) which comes standard with
DR 3.
gcc 3.x allthough earlier ones should work if you also install gnustep-objc
@item Extra libs needed
None.
@item Special Instructions
Comes with a good version of gcc.
DR3 comes with a good version of gcc.
Seems to compile and install ok, althouth DR3 has an old version of
glibc, which requires some workarounds which should be taken care of in
the configuration. Not completely tested, so some aspects, particular
@ -295,22 +330,7 @@ and glibc library (which has the threads library) and install both.
@end table
@c -----------------------------------------
@node RedHat/Intel, NetBSD, MkLinux/PowerPC, Machine Specific
@section RedHat/Intel
@table @samp
@item Recommended compiler
Standard
@item Extra libs needed
Standard (ffcall or libffi)
@item Special Instructions
None
@end table
@c -----------------------------------------
@node NetBSD, Netwinder, RedHat/Intel, Machine Specific
@node NetBSD, Netwinder, MkLinux/PowerPC, Machine Specific
@section NetBSD
@table @samp
@ -356,7 +376,7 @@ Try reading the README.NetBSD which might work the same on OpenBSD.
@end table
@c -----------------------------------------
@node OSF/Alpha, Slackware/Intel, OpenBSD 3.x, Machine Specific
@node OSF/Alpha, RedHat/Intel, OpenBSD 3.x, Machine Specific
@section OSF Alpha (@emph{Unstable!})
@c Contact: suzukis@file.phys.tohoku.ac.jp
@ -380,7 +400,22 @@ ADDTIONAL_TOOL_LIBS in the GNUmakefile(.preamble).
@end table
@c -----------------------------------------
@node Slackware/Intel, Solaris 2.5.1/Sparc, OSF/Alpha, Machine Specific
@node RedHat/Intel, Slackware/Intel, OSF/Alpha, Machine Specific
@section RedHat/Intel
@table @samp
@item Recommended compiler
Standard
@item Extra libs needed
Standard (ffcall or libffi)
@item Special Instructions
None
@end table
@c -----------------------------------------
@node Slackware/Intel, Solaris 2.5.1/Sparc, RedHat/Intel, Machine Specific
@section Slackware/Intel
@table @samp
@ -664,7 +699,7 @@ shared library (like libtiff) will cause odd and untraceable problems.
See @file{README.Cygwin} for information on compiling.
@c -----------------------------------------
@node Windows with MinGW, , Windows with CYGWIN, Machine Specific
@node Windows with MinGW, Yellowdog/PowerPC, Windows with CYGWIN, Machine Specific
@section Windows with MinGW (@emph{Unstable! As always...})
@table @samp
@ -681,6 +716,21 @@ earlier are very buggy and are not supported.
Native GUI backend is alpha version.
@end table
@c -----------------------------------------
@node Yellowdog/PowerPC, , Windows with MinGW, Machine Specific
@section Yellowdog/PowerPC
@table @samp
@item Recommended compiler
Standard
@item Extra libs needed
Standard (ffcall or libffi)
@item Special Instructions
@end table
@ifclear HOWTO
@include end.texi
@end ifclear

View file

@ -38,6 +38,7 @@ OBJCFLAGS= @OBJCFLAGS@
CPPFLAGS = @CPPFLAGS@
OBJC_NO_IMPORT_FLAGS = @OBJC_NO_IMPORT_FLAGS@
CPP = @CPP@
CC_TYPE = @cc_type@
EXEEXT = @EXEEXT@
OEXT = .@OBJEXT@

41
configure vendored
View file

@ -317,7 +317,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os ac_cv_library_combo CYGWIN RANLIB AR DLLTOOL ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S TAR CHOWN GNUSTEP_ROOT root_prefix MAKEFILES_SUFFIX HOST_INSTALL GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT GNUSTEP_FLATTENED GNUSTEP_MULTI_PLATFORM BACKEND_BUNDLE EGREP objc_threaded ac_cv_objc_threaded AUTO_DEPENDENCIES INCLUDES LIB_DIR OBJCFLAGS OBJC_NO_IMPORT_FLAGS GNUSTEP_STRIP_MAKEFILES GNUSTEP_MOVE_OBSOLETE GNUSTEP_MAKE_VERSION GNUSTEP_MAKE_MAJOR_VERSION GNUSTEP_MAKE_MINOR_VERSION GNUSTEP_MAKE_SUBMINOR_VERSION clean_target_os clean_target_cpu clean_target_vendor LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os ac_cv_library_combo cc_type CYGWIN RANLIB AR DLLTOOL ac_ct_RANLIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S TAR CHOWN GNUSTEP_ROOT root_prefix MAKEFILES_SUFFIX HOST_INSTALL GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT GNUSTEP_FLATTENED GNUSTEP_MULTI_PLATFORM BACKEND_BUNDLE EGREP objc_threaded ac_cv_objc_threaded AUTO_DEPENDENCIES INCLUDES LIB_DIR OBJCFLAGS OBJC_NO_IMPORT_FLAGS GNUSTEP_STRIP_MAKEFILES GNUSTEP_MOVE_OBSOLETE GNUSTEP_MAKE_VERSION GNUSTEP_MAKE_MAJOR_VERSION GNUSTEP_MAKE_MINOR_VERSION GNUSTEP_MAKE_SUBMINOR_VERSION clean_target_os clean_target_cpu clean_target_vendor LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -2548,6 +2548,43 @@ echo "${ECHO_T}$ac_cv_library_combo" >&6
OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
#--------------------------------------------------------------------
# Check if we are using Apple cc
# FIXME: It would be nicer if there was a better way to test this.
#--------------------------------------------------------------------
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -faltivec"
echo "$as_me:$LINENO: checking if we are using the apple compiler" >&5
echo $ECHO_N "checking if we are using the apple compiler... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
int main() {return 0;}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cc_type=apple
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
cc_type=gnu
fi
rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $cc_type" >&5
echo "${ECHO_T}$cc_type" >&6
CFLAGS="$save_CFLAGS"
#--------------------------------------------------------------------
# specific target_os options
#--------------------------------------------------------------------
@ -3323,7 +3360,6 @@ export LD_LIBRARY_PATH
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
@ -5304,6 +5340,7 @@ s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@ac_cv_library_combo@,$ac_cv_library_combo,;t t
s,@cc_type@,$cc_type,;t t
s,@CYGWIN@,$CYGWIN,;t t
s,@RANLIB@,$RANLIB,;t t
s,@AR@,$AR,;t t

View file

@ -59,6 +59,18 @@ AC_MSG_RESULT($ac_cv_library_combo)
OBJC_RUNTIME_LIB=`echo $ac_cv_library_combo | awk -F- '{print $1}'`
#--------------------------------------------------------------------
# Check if we are using Apple cc
# FIXME: It would be nicer if there was a better way to test this.
#--------------------------------------------------------------------
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -faltivec"
AC_MSG_CHECKING([if we are using the apple compiler])
AC_COMPILE_IFELSE([[int main() {return 0;}]], cc_type=apple, cc_type=gnu)
AC_MSG_RESULT($cc_type)
AC_SUBST(cc_type)
CFLAGS="$save_CFLAGS"
#--------------------------------------------------------------------
# specific target_os options
#--------------------------------------------------------------------

View file

@ -227,7 +227,6 @@ endif
ifeq ($(findstring darwin, $(GNUSTEP_TARGET_OS)), darwin)
ifeq ($(OBJC_RUNTIME_LIB), apple)
HAVE_BUNDLES = yes
OBJC_COMPILER = NeXT
# Set flags to ignore the MacOSX headers
ifneq ($(FOUNDATION_LIB), apple)
INTERNAL_OBJCFLAGS += -no-cpp-precomp -nostdinc -I/usr/include
@ -237,13 +236,15 @@ endif
HAVE_SHARED_LIBS = yes
SHARED_LIBEXT = .dylib
ifeq ($(FOUNDATION_LIB), apple)
ifeq ($(CC_TYPE), apple)
# Not sure why, but without -no-cpp-precomp, it doesn't compile
# plain C files.
INTERNAL_CFLAGS += -no-cpp-precomp
# TODO - Check if we can do without -no-cpp-precomp for Objective-C.
INTERNAL_OBJCFLAGS += -no-cpp-precomp
endif
ifeq ($(FOUNDATION_LIB), apple)
ifneq ($(arch),)
ARCH_FLAGS = $(foreach a, $(arch), -arch $(a))
INTERNAL_OBJCFLAGS += $(ARCH_FLAGS)
@ -265,7 +266,7 @@ DYLIB_DEF_FRAMEWORKS += -framework Foundation
endif
ifneq ($(OBJC_COMPILER), NeXT)
ifneq ($(CC_TYPE), apple)
# GNU compiler
SHARED_LD_PREFLAGS += -arch_only ppc -noall_load -read_only_relocs warning \
-flat_namespace -undefined warning
@ -292,7 +293,7 @@ BUNDLE_LD = /usr/bin/ld
BUNDLE_LDFLAGS += -bundle -flat_namespace -undefined suppress /usr/lib/bundle1.o
else
# NeXT Compiler
# Apple Compiler
#DYLIB_EXTRA_FLAGS = -read_only_relocs warning -undefined warning -fno-common
@ -322,7 +323,7 @@ SHARED_CFLAGS += -dynamic
BUNDLE_LD = $(CC)
BUNDLE_LDFLAGS += -bundle -undefined error $(ARCH_FLAGS)
endif # OBJC_COMPILER
endif # CC_TYPE
AFTER_INSTALL_SHARED_LIB_CMD = \
(cd $(LIB_LINK_INSTALL_DIR); \