1997-09-16 01:07:48 +00:00
|
|
|
AC_INIT(application.make)
|
|
|
|
|
|
|
|
#
|
|
|
|
# configure.in
|
|
|
|
#
|
|
|
|
# Copyright (C) 1997 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Author: Scott Christley <scottc@net-community.com>
|
1997-10-25 03:53:00 +00:00
|
|
|
# Ovidiu Predescu <ovidiu@net-community.com>
|
1997-09-16 01:07:48 +00:00
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Makefile Package.
|
|
|
|
#
|
|
|
|
# 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,
|
|
|
|
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
1997-10-03 21:12:56 +00:00
|
|
|
AC_CONFIG_HEADER(config.h)
|
|
|
|
|
1997-09-16 01:07:48 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# The GNUstep root directory.
|
1997-09-22 22:49:02 +00:00
|
|
|
# The user should have the GNUSTEP_SYSTEM_ROOT environment variable
|
|
|
|
# defined, but if not then we have a global default.
|
1997-09-16 01:07:48 +00:00
|
|
|
#--------------------------------------------------------------------
|
1997-09-22 22:49:02 +00:00
|
|
|
AC_PREFIX_DEFAULT(`if test "x$GNUSTEP_SYSTEM_ROOT" = "x"; then
|
1999-01-02 18:29:44 +00:00
|
|
|
GNUSTEP_SYSTEM_ROOT=/usr/GNUstep ;
|
|
|
|
echo $GNUSTEP_SYSTEM_ROOT ;
|
1997-09-16 01:07:48 +00:00
|
|
|
else
|
1997-09-22 22:49:02 +00:00
|
|
|
echo $GNUSTEP_SYSTEM_ROOT ;
|
1997-09-16 01:07:48 +00:00
|
|
|
fi`)
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Determine the host, build, and target systems
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
1998-12-07 16:54:26 +00:00
|
|
|
EXEEXT=
|
|
|
|
if test "$program_suffix" != "NONE"; then
|
|
|
|
EXEEXT=$program_suffix
|
|
|
|
fi
|
|
|
|
AC_SUBST(EXEEXT)
|
1998-12-07 16:23:04 +00:00
|
|
|
|
1997-09-16 01:07:48 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find the binary and compile tools
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_RANLIB
|
1997-10-03 22:02:27 +00:00
|
|
|
|
1997-10-03 21:12:56 +00:00
|
|
|
AC_PROG_INSTALL
|
1997-10-03 22:02:27 +00:00
|
|
|
# HOST_INSTALL is the name of the install program in config.make so set it up
|
|
|
|
# to point to the install-sh script in the GNUstep tree if no system install is
|
|
|
|
# found.
|
|
|
|
AC_SUBST(HOST_INSTALL)
|
|
|
|
if test "$INSTALL" = "$ac_install_sh"; then
|
|
|
|
HOST_INSTALL=$prefix/Makefiles/$INSTALL
|
|
|
|
else
|
|
|
|
HOST_INSTALL=$INSTALL
|
|
|
|
fi
|
|
|
|
|
1997-09-16 01:07:48 +00:00
|
|
|
AC_LN_S
|
|
|
|
|
1997-09-18 01:36:07 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find for X windows
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_PATH_X
|
|
|
|
X_INCLUDE=""
|
|
|
|
if test -n "$x_includes"; then
|
|
|
|
X_INCLUDE="-I$x_includes"
|
|
|
|
fi
|
|
|
|
X_LIBS=""
|
|
|
|
if test -n "$x_libraries"; then
|
|
|
|
X_LIBS="-L$x_libraries"
|
|
|
|
fi
|
1997-10-13 19:38:12 +00:00
|
|
|
if test -r $x_includes/X11/DPS; then
|
|
|
|
X_INCLUDE="$X_INCLUDE -I$x_includes/X11"
|
|
|
|
fi
|
1997-09-18 01:36:07 +00:00
|
|
|
|
1999-03-02 05:04:42 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find for DPS
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH(dps_library,
|
|
|
|
[ --with-dps-library=DIR DPS library file are in DIR], ,
|
|
|
|
with_dps_library=)
|
|
|
|
AC_ARG_WITH(dps_include,
|
|
|
|
[ --with-dps-include=DIR DPS include files are in DIR], ,
|
|
|
|
with_dps_include=)
|
|
|
|
|
|
|
|
# Add the target header file directory as an include path so that the
|
|
|
|
# check for dpsNXargs.h below looks at the appropriate target includes
|
|
|
|
ORIG_CPPFLAGS=${CPPFLAGS}
|
|
|
|
if test -n "$with_dps_include"; then
|
|
|
|
X_INCLUDE="$X_INCLUDE -I$with_dps_include"
|
|
|
|
if test -n "$with_dps_lib"; then
|
|
|
|
X_LIBS="$X_LIBS -L$with_dps_lib"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
CPPFLAGS="${CPPFLAGS} ${X_INCLUDE}"
|
|
|
|
|
|
|
|
# We care about this header file on the target not host system
|
|
|
|
AC_HAVE_HEADERS(DPS/dpsclient.h, DPS_DEFINE=' -DHAVE_DPS_CLIENT_H=1',
|
|
|
|
DPS_DEFINE=' -DHAVE_DPS_CLIENT_H=0')
|
|
|
|
AC_HAVE_HEADERS(DPS/dpsNXargs.h,
|
|
|
|
DPS_DEFINE="$DPS_DEFINE -DHAVE_DPS_DPSNXARGS=1",
|
|
|
|
DPS_DEFINE="$DPS_DEFINE -DHAVE_DPS_DPSNXARGS=0")
|
|
|
|
|
|
|
|
# Restore back to the original
|
|
|
|
CPPFLAGS=${ORIG_CPPFLAGS}
|
|
|
|
|
|
|
|
AC_SUBST(DPS_DEFINE)
|
1997-09-18 01:36:07 +00:00
|
|
|
AC_SUBST(X_INCLUDE)
|
|
|
|
AC_SUBST(X_LIBS)
|
|
|
|
|
1997-10-03 21:12:56 +00:00
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HAVE_HEADERS(sys/param.h sys/file.h dir.h string.h stdlib.h sys/types.h dnl
|
|
|
|
sys/stat.h sys/errno.h)
|
|
|
|
|
1999-02-25 17:54:19 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find for JPEG
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH(jpeg_library,
|
1999-02-26 18:34:52 +00:00
|
|
|
[ --with-jpeg-library=DIR JPEG library file are in DIR], ,
|
1999-02-25 17:54:19 +00:00
|
|
|
with_jpeg_library=/usr/local/lib)
|
|
|
|
AC_ARG_WITH(jpeg_includes,
|
|
|
|
[ --with-jpeg-include=DIR JPEG include files are in DIR], ,
|
|
|
|
with_jpeg_include=/usr/local/include)
|
|
|
|
|
|
|
|
AC_DEFUN(AC_CHECK_JPEGLIB,
|
1999-03-04 22:44:30 +00:00
|
|
|
[jpeg_check_lib_save_header=${CPPFLAGS}
|
|
|
|
CPPFLAGS="-L$1 -I$2 ${CPPFLAGS}"
|
1999-02-25 17:54:19 +00:00
|
|
|
|
|
|
|
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
|
|
|
|
jpeg_ok=yes,
|
1999-03-04 22:44:30 +00:00
|
|
|
jpeg_ok=no)
|
1999-02-25 17:54:19 +00:00
|
|
|
if test "$jpeg_ok" = yes; then
|
1999-03-03 07:31:51 +00:00
|
|
|
AC_MSG_CHECKING([for jpeglib.h])
|
1999-02-25 17:54:19 +00:00
|
|
|
AC_TRY_CPP([#include <stdio.h>
|
|
|
|
#undef PACKAGE
|
|
|
|
#undef VERSION
|
1999-03-03 07:31:51 +00:00
|
|
|
#undef HAVE_STDLIB_H
|
1999-02-25 17:54:19 +00:00
|
|
|
#include <jpeglib.h>],
|
|
|
|
jpeg_ok=yes,
|
|
|
|
jpeg_ok=no)
|
|
|
|
AC_MSG_RESULT($jpeg_ok)
|
|
|
|
|
|
|
|
if test "$jpeg_ok" = yes; then
|
|
|
|
JPEG_LIB="-L$1"
|
|
|
|
export JPEG_LIB
|
|
|
|
JPEG_INCLUDE="-I$2"
|
|
|
|
export JPEG_INCLUDE
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
CPPFLAGS="${jpeg_check_lib_save_header}"])
|
|
|
|
|
|
|
|
if test "x$JPEG_LIB" = x; then
|
|
|
|
AC_CHECK_JPEGLIB(${with_jpeg_library}, ${with_jpeg_include})
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(JPEG_LIB)
|
|
|
|
AC_SUBST(JPEG_INCLUDE)
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Find for TIFF
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH(tiff_library,
|
|
|
|
[ --with-tiff-library=DIR TIFF library file are in DIR], ,
|
|
|
|
with_tiff_library=/usr/local/lib)
|
|
|
|
AC_ARG_WITH(tiff_includes,
|
|
|
|
[ --with-tiff-include=DIR TIFF include files are in DIR], ,
|
|
|
|
with_tiff_include=/usr/local/include)
|
|
|
|
|
|
|
|
AC_DEFUN(AC_CHECK_TIFFLIB,
|
1999-03-04 22:44:30 +00:00
|
|
|
[tiff_check_lib_save_header=${CPPFLAGS}
|
1999-03-04 23:59:44 +00:00
|
|
|
tiff_check_lib_save_libs=${LIBS}
|
1999-03-04 22:44:30 +00:00
|
|
|
CPPFLAGS="-L$1 ${JPEG_LIB} -I$2 ${JPEG_INCLUDE} ${CPPFLAGS}"
|
1999-02-25 17:54:19 +00:00
|
|
|
|
1999-03-04 23:59:44 +00:00
|
|
|
AC_MSG_CHECKING(for -ltiff without -ljpeg)
|
|
|
|
LIBS="-ltiff -lm $LIBS"
|
|
|
|
AC_TRY_LINK([char TIFFReadScanline();], [TIFFReadScanline()],
|
|
|
|
jpeg_notneeded=yes,
|
|
|
|
jpeg_notneeded=no)
|
|
|
|
AC_MSG_RESULT($jpeg_notneeded)
|
|
|
|
LIBS=${tiff_check_lib_save_libs}
|
|
|
|
JPEG=
|
|
|
|
if test "$jpeg_notneeded" = no; then
|
|
|
|
JPEG=-ljpeg
|
|
|
|
fi
|
1999-02-25 17:54:19 +00:00
|
|
|
AC_CHECK_LIB(tiff, TIFFReadScanline,
|
|
|
|
tiff_ok=yes,
|
|
|
|
tiff_ok=no
|
1999-03-04 22:44:30 +00:00
|
|
|
AC_MSG_WARN(Cannot find libtiff)
|
|
|
|
echo "* The GUI library reqiures the TIFF library"
|
|
|
|
echo "* Use --with-tiff-library to specify the tiff library"
|
|
|
|
echo "* directory if it is not in the usual place(s)"
|
1999-03-04 23:59:44 +00:00
|
|
|
echo "* You may also have to specify --with-jpeg-library if the jpeg"
|
|
|
|
echo "* Library is needed by tiff"
|
1999-03-04 22:44:30 +00:00
|
|
|
if test "x$CONFIGURING_CORE_LIBRARIES" != x; then
|
|
|
|
AC_MSG_ERROR(You must have proper libraries installed to compile core)
|
|
|
|
fi,
|
1999-03-04 23:59:44 +00:00
|
|
|
$JPEG -lm)
|
1999-02-25 17:54:19 +00:00
|
|
|
if test "$tiff_ok" = yes; then
|
|
|
|
AC_CHECK_HEADER(tiffio.h,
|
|
|
|
tiff_ok=yes,
|
|
|
|
tiff_ok=no)
|
|
|
|
if test "$tiff_ok" = yes; then
|
|
|
|
TIFF_LIB="-L$1"
|
|
|
|
export TIFF_LIB
|
|
|
|
TIFF_INCLUDE="-I$2"
|
|
|
|
export TIFF_INCLUDE
|
|
|
|
else
|
1999-03-04 22:44:30 +00:00
|
|
|
AC_MSG_WARN(Cannot find libtiff header tiffio)
|
|
|
|
echo "* The GUI library requres the TIFF library"
|
|
|
|
echo "* Use --with-tiff-include to specify the tiff header directory"
|
|
|
|
echo "* if it is not in the usual place(s)"
|
|
|
|
if test "x$CONFIGURING_CORE_LIBRARIES" != x; then
|
|
|
|
AC_MSG_ERROR(You must have proper libraries installed to compile core)
|
|
|
|
fi
|
1999-02-25 17:54:19 +00:00
|
|
|
fi
|
|
|
|
fi
|
1999-03-04 23:59:44 +00:00
|
|
|
CPPFLAGS="${tiff_check_lib_save_header}"])
|
1999-02-25 17:54:19 +00:00
|
|
|
|
|
|
|
if test "x$TIFF_LIB" = x; then
|
|
|
|
AC_CHECK_TIFFLIB(${with_tiff_library}, ${with_tiff_include})
|
|
|
|
fi
|
|
|
|
|
1999-03-04 22:44:30 +00:00
|
|
|
AC_SUBST(JPEG)
|
1999-02-25 17:54:19 +00:00
|
|
|
AC_SUBST(TIFF_LIB)
|
|
|
|
AC_SUBST(TIFF_INCLUDE)
|
1998-09-03 18:50:11 +00:00
|
|
|
|
1997-10-02 01:29:16 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Setup the library combination
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_ARG_WITH(library-combo,[
|
|
|
|
--with-library-combo
|
1998-05-28 06:56:11 +00:00
|
|
|
Define the default library combinations that will be used when you
|
|
|
|
type 'make'. You can still change the library combination at runtime
|
|
|
|
by specifying the 'library_combo' make variable. For example:
|
1997-10-02 01:29:16 +00:00
|
|
|
|
1997-10-29 16:27:45 +00:00
|
|
|
$ make library_combo=nx-pdo-nx-nil
|
1997-10-02 01:29:16 +00:00
|
|
|
],
|
|
|
|
ac_cv_library_combo=$withval,
|
1998-11-25 21:06:09 +00:00
|
|
|
ac_cv_library_combo=$ac_cv_library_combo
|
1997-10-02 01:29:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if test "$ac_cv_library_combo" = ""; then
|
1997-10-03 21:12:56 +00:00
|
|
|
if test $host_os = nextstep4; then
|
1997-10-29 16:27:45 +00:00
|
|
|
ac_cv_library_combo=nx-nx-nx-nil
|
1997-10-03 21:12:56 +00:00
|
|
|
else
|
1997-10-30 22:43:44 +00:00
|
|
|
ac_cv_library_combo=gnu-gnu-gnu-xdps
|
1997-10-03 21:12:56 +00:00
|
|
|
fi
|
1997-10-02 01:29:16 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST(ac_cv_library_combo)
|
|
|
|
|
1998-09-03 14:35:49 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check if libobjc was compiled with thread support.
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
AC_MSG_CHECKING(whether objc has thread support)
|
|
|
|
saved_LIBS="$LIBS"
|
1998-11-11 23:05:50 +00:00
|
|
|
objc_thread_lib=""
|
|
|
|
if test $host_os = linux-gnu; then
|
|
|
|
LIBS="-lobjc -lpthread"
|
|
|
|
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-lpthread",
|
|
|
|
objc_threaded="", objc_threaded="-lpthread")
|
|
|
|
if test x"$objc_threaded" = x""; then
|
|
|
|
LIBS="-lobjc -lpcthread"
|
|
|
|
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-lpcthread",
|
|
|
|
objc_threaded="", objc_threaded="-lpcthread")
|
|
|
|
fi
|
1998-09-03 14:35:49 +00:00
|
|
|
else
|
1998-11-11 23:05:50 +00:00
|
|
|
LIBS="-lobjc $LIBS"
|
|
|
|
AC_TRY_RUN([#include "config_thread.m"], objc_threaded="-lthread",
|
|
|
|
objc_threaded="", objc_threaded="-lthread")
|
|
|
|
fi
|
|
|
|
LIBS="$saved_LIBS"
|
|
|
|
if test x"$objc_threaded" = x""; then
|
1998-09-03 14:35:49 +00:00
|
|
|
AC_MSG_RESULT(no)
|
1998-11-11 23:05:50 +00:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
1998-09-03 14:35:49 +00:00
|
|
|
fi
|
1998-12-15 19:20:50 +00:00
|
|
|
ac_cv_objc_threaded=$objc_threaded
|
1998-09-03 14:35:49 +00:00
|
|
|
AC_SUBST(objc_threaded)
|
1998-12-15 19:20:50 +00:00
|
|
|
AC_SUBST(ac_cv_objc_threaded)
|
1998-09-03 14:35:49 +00:00
|
|
|
|
1999-02-23 05:20:40 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Record the version
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
. ../Version
|
|
|
|
AC_SUBST(GNUSTEP_VERSION)
|
|
|
|
AC_SUBST(GNUSTEP_MAJOR_VERSION)
|
|
|
|
AC_SUBST(GNUSTEP_MINOR_VERSION)
|
|
|
|
|
1997-09-16 01:07:48 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Produce the output files
|
|
|
|
#--------------------------------------------------------------------
|
1999-02-18 06:22:33 +00:00
|
|
|
AC_OUTPUT(config.h config.make openapp debugapp opentool GNUmakefile
|
1998-04-06 03:01:59 +00:00
|
|
|
GNUstep.sh GNUstep.csh,
|
1999-02-18 06:22:33 +00:00
|
|
|
chmod a+x openapp debugapp opentool)
|