[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: questions about GNUstep
From: |
Richard Dale |
Subject: |
Re: questions about GNUstep |
Date: |
Wed, 21 Nov 2001 22:11:17 +0000 |
On Wednesday 21 November 2001 8:46 pm, e.sammer wrote:
> 2. The Makefiles package
>
> I was curious as to why the NeXT / Apple makefiles were kept the same.
> What I mean is with many projects using the GNU "autotools" (autoconf,
> automake, aclocal, m4, etc.) it would seems a viable option for the
> GNUstep build system. I am also aware that this is probably done to
> maintain makefile compatibility with NeXT, WO, and (older) MOSX Server
> projects, but providing a simple shell or perl conversion script might
> also do the trick. In theory, this is what is being done for nibs, so it
> wouldn't seem _too_ nutty to convert the makefiles as well. The main
> reason for this question is cleanliness of the build system. Not that
> the makefiles don't work, but having a set of m4 macros for the GNU
> autotools could greatly improve overall usability, as well as centralize
> configuration of a source tree. This would also allow easier integration
> into different Linux / Unix IDEs as many of them use these tools in the
> background. The autotools provide a standardized way of system arch
> detection, header testing, library testing, program existence, compiler
> sanity checks, and other flexible options that make them prime for this
> kind of development. Also, with many other projects using the
> "<appname>-config" style shell scripts to centralize the location of
> CFLAGS and linker args (see gtk, glib, imlib, xmms, libxml, etc.) it
> seems to be gaining much wider acceptance.
I've recently checked some Qt/KDE Objective-C bindings into the KDE cvs. The
KDE project uses automake/autoconf, so he is my effort to make Objective-C
work with them. The macro KDE_CHECK_GNUSTEP assumes that the enviroment
variables in GNUstep.sh are present, and sets up an appropriate include and
library path to pass to the configure script. I'm not a autoconf expert, and
this is the best I could manage - any suggestions for improvements are very
welcome. I've just searched on google for 'AC_PROG_OBJC', and can't find
anything - surely someone has already implemented this?
-- Richard
AC_DEFUN(AC_PROG_OBJC,
AC_MSG_CHECKING(for an Objective-C compiler - not implemented yet)
)
dnl
dnl Check whether we support Objective-C
dnl
AC_DEFUN(KDE_CHECK_GNUSTEP,
[
AC_MSG_CHECKING(if objective-c enabled)
AC_ARG_ENABLE(objc,
[ --enable-objc enable objective-c build],
[if test "$enableval" = yes; then
enable_objc=yes
fi],
enable_objc=no)
AC_MSG_RESULT($enable_objc)
OBJCDIRS=
if test "$enable_objc" = "yes"; then
AC_MSG_CHECKING(for gnustep system root)
if test -z $GNUSTEP_SYSTEM_ROOT ; then
GNUSTEPLIBDIR=
GNUSTEPINCDIRS=
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT($GNUSTEP_SYSTEM_ROOT)
AC_MSG_CHECKING(for gnustep-base library)
GNUSTEPLIBDIR=`find $GNUSTEP_SYSTEM_ROOT/Libraries -name
libgnustep-base.so | sed 's,libgnustep-base.so,,'|head -n 1`
AC_MSG_RESULT($GNUSTEPLIBDIR)
AC_MSG_CHECKING(for gnustep includes)
GNUSTEPINCDIRS="-I$GNUSTEP_SYSTEM_ROOT/Headers \
-I$GNUSTEP_SYSTEM_ROOT/Headers/gnustep \
-I$GNUSTEP_SYSTEM_ROOT/Headers/$GNUSTEP_HOST_CPU/$GNUSTEP_HOST_OS"
AC_MSG_RESULT($GNUSTEPINCDIRS)
OBJCDIRS="qtobjc kdeobjc"
AC_PROG_OBJC
fi
fi
AC_SUBST(OBJCDIRS)
AC_SUBST(GNUSTEPLIBDIR)
AC_SUBST(GNUSTEPINCDIRS)
])
KDE_CHECK_GNUSTEP
...and in the Makefile.am's:
OBJC = $(CXX)
OBJCFLAGS = $(CXXFLAGS) -fgnu-runtime -fconstant-string-class=NSConstantString