mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
794 lines
18 KiB
Plaintext
794 lines
18 KiB
Plaintext
dnl
|
|
dnl Window Maker autoconf input.
|
|
dnl
|
|
dnl Process with: aclocal; autoconf; automake
|
|
dnl
|
|
dnl
|
|
dnl Shared library generation stuff taken from configure script from zlib
|
|
dnl
|
|
|
|
|
|
AC_INIT(src/WindowMaker.h)
|
|
|
|
AM_INIT_AUTOMAKE(WindowMaker, 0.50.0)
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
dnl configure/build bundled libraries
|
|
dnl ===================================
|
|
AC_CONFIG_SUBDIRS(libPropList)
|
|
|
|
|
|
AM_CONFIG_HEADER(src/config.h)
|
|
|
|
|
|
dnl Checks for host/os name
|
|
dnl =======================
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
dnl Checks for programs.
|
|
dnl ===================
|
|
AC_ISC_POSIX
|
|
AC_PROG_CC
|
|
AC_PROG_MAKE_SET
|
|
#AC_PROG_RANLIB
|
|
AC_PROG_INSTALL
|
|
AC_PROG_LN_S
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
|
|
dnl Checks for library functions.
|
|
dnl ============================
|
|
dnl not used anywhere
|
|
dnl AC_FUNC_MEMCMP
|
|
AC_TYPE_SIGNAL
|
|
AC_FUNC_VPRINTF
|
|
AC_FUNC_ALLOCA
|
|
AC_CHECK_FUNCS(gethostname gettimeofday select poll strerror strncasecmp setpgid)
|
|
|
|
if test "$ac_cv_func_gettimeofday" != yes; then
|
|
echo "The gettimeofday() system call is not available in your system"
|
|
echo "but it is required by Window Maker. Sorry."
|
|
exit 1
|
|
fi
|
|
|
|
if test "x$CPP_PATH" = x; then
|
|
AC_PATH_PROG(CPP_PATH, cpp, notfound,
|
|
/lib:/usr/bin:/bin:/usr/lib:/usr/ccs/lib:$PATH)
|
|
fi
|
|
|
|
dnl
|
|
dnl Tell stupid Solaris cpp that the files it will process have C++ like syntax
|
|
dnl RedHat 5.x is broken too, so it won't make a symlink from cpp to the
|
|
dnl standard locations
|
|
dnl
|
|
if test "$CPP_PATH" = "/usr/ccs/lib/cpp" -o "$CPP_PATH" = "notfound" ; then
|
|
if test "$GCC" = "yes"; then
|
|
CPP_PATH="gcc -E -x c"
|
|
else
|
|
if test "$CPP_PATH" = "/usr/ccs/lib/cpp"; then
|
|
CPP_PATH="$CPP_PATH -B"
|
|
else
|
|
echo "cpp, the C preprocessor was not found in your system."
|
|
echo "Create a symbolic link from it to /lib/cpp and rerun configure"
|
|
exit
|
|
fi
|
|
fi
|
|
fi
|
|
AC_DEFINE_UNQUOTED(CPP_PATH, "$CPP_PATH")
|
|
|
|
dnl gettext
|
|
dnl =======
|
|
|
|
|
|
dnl AM_GNU_GETTEXT
|
|
|
|
|
|
|
|
INTLIBS=""
|
|
|
|
|
|
AC_CHECK_FUNC(gettext, [HAVEGETTEXT="yes"],
|
|
AC_CHECK_LIB(intl, gettext, [INTLIBS="-lintl" HAVEGETTEXT="yes"],
|
|
INTLIBS="" ))
|
|
|
|
AC_CHECK_PROG(XGETTEXT, xgettext, xgettext)
|
|
|
|
if test "$XGETTEXT" != ""; then
|
|
if $XGETTEXT --help 2>&1 | grep illegal >/dev/null ; then
|
|
echo "xgettext isn't GNU version"
|
|
XGETTEXT=""
|
|
fi
|
|
fi
|
|
|
|
if test "$LINGUAS" != ""; then
|
|
if test "$XGETTEXT" != "" -a "$HAVEGETTEXT" != ""; then
|
|
I18N="-DI18N"
|
|
PO=""
|
|
# if test "$LINGUAS" = ""; then
|
|
# ling=` (cd src/po; /bin/ls *.po) `
|
|
# for l in $ling; do
|
|
# lcode=`basename $l .po`
|
|
# LINGUAS="$LINGUAS $lcode"
|
|
# done
|
|
# fi
|
|
echo "xgettext and gettext() exist; will build i18n support for $LINGUAS"
|
|
else
|
|
I18N=""
|
|
LINGUAS=""
|
|
PO=""
|
|
echo "xgettext and libintl.a don't both exist; will not build i18n support"
|
|
fi
|
|
else
|
|
INTLIBS=""
|
|
MOFILES=""
|
|
WPMOFILES=""
|
|
PO=""
|
|
fi
|
|
|
|
|
|
dnl The Tower of Babel
|
|
dnl ==================
|
|
|
|
dnl List of supported locales
|
|
dnl -------------------------
|
|
supported_locales="cs de es fr gl it ja ko nl no pt ru se tr fi hr el pl ro"
|
|
supported_wprefs_locales="pt hr fr ko ja"
|
|
|
|
for lang in $LINGUAS; do
|
|
ok=0
|
|
for l in $supported_locales; do
|
|
if test "$l" = "$lang"; then
|
|
ok=1
|
|
break
|
|
fi
|
|
done
|
|
if test "$ok" = 1; then
|
|
MOFILES="$MOFILES $lang.mo"
|
|
else
|
|
echo "Locale $lang is not supported."
|
|
fi
|
|
ok=0
|
|
for l in $supported_wprefs_locales; do
|
|
if test "$l" = "$lang"; then
|
|
ok=1
|
|
break
|
|
fi
|
|
done
|
|
if test "$ok" = 1; then
|
|
WPMOFILES="$WPMOFILES $lang.mo"
|
|
fi
|
|
done
|
|
|
|
|
|
dnl Kanji Characters support
|
|
dnl ========================
|
|
I18n=no
|
|
AC_ARG_ENABLE(kanji,
|
|
[ --enable-kanji multibyte character support (kanji, Korean etc.)],,
|
|
enable_kanji=no)
|
|
|
|
if test "$enable_kanji" = yes; then
|
|
I18N_MB="#define I18N_MB"
|
|
case $host_os in
|
|
freebsd*)
|
|
AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]);;
|
|
*)
|
|
;;
|
|
esac
|
|
else
|
|
I18N_MB="#undef I18N_MB"
|
|
fi
|
|
AC_SUBST(I18N_MB)
|
|
|
|
|
|
dnl XKB keyboard language status
|
|
dnl ============================
|
|
AC_ARG_ENABLE(modelock,
|
|
[ --enable-modelock XKB keyboard language status support],
|
|
X_CFLAGS="$X_CFLAGS -DXKB_MODELOCK",)
|
|
|
|
|
|
|
|
dnl Added by Oliver - Support for NLSDIR option, Hi Oliver!
|
|
dnl ===========================================
|
|
AC_ARG_WITH(nlsdir,
|
|
[ --with-nlsdir=PATH specify where the locale stuff should go ])
|
|
|
|
if test "x$NLSDIR" = "x"; then
|
|
if test "x$with_nlsdir" != "x"; then
|
|
NLSDIR=$with_nlsdir
|
|
else
|
|
NLSDIR='$(prefix)/lib/locale'
|
|
fi
|
|
fi
|
|
|
|
|
|
AC_SUBST(I18N)
|
|
AC_SUBST(INTLIBS)
|
|
AC_SUBST(NLSDIR)
|
|
AC_SUBST(MOFILES)
|
|
AC_SUBST(WPMOFILES)
|
|
|
|
|
|
|
|
dnl Support for various hint things
|
|
dnl ===============================
|
|
|
|
|
|
AC_ARG_ENABLE(gnome,
|
|
[ --enable-gnome enable stuff needed for GNOME ],
|
|
[if test x$enableval = xyes; then
|
|
AC_DEFINE(GNOME_STUFF)
|
|
gnome_on=yes
|
|
fi])
|
|
|
|
|
|
AC_ARG_ENABLE(kde,
|
|
[ --enable-kde enable support for KDE window manager (kwm) hints ],
|
|
[if test x$enableval = xyes; then
|
|
AC_DEFINE(KWM_HINTS)
|
|
kde_on=yes
|
|
fi])
|
|
|
|
|
|
dnl
|
|
dnl Disable some stuff that are duplicated in kde
|
|
dnl ---------------------------------------------
|
|
LITE=
|
|
AC_ARG_ENABLE(lite,
|
|
[ --enable-lite disable stuff duplicated in KDE/GNOME ],
|
|
[if test x$enableval = xyes; then
|
|
LITE=-DLITE
|
|
fi])
|
|
AC_SUBST(LITE)
|
|
|
|
|
|
dnl ===========================================
|
|
dnl Stuff that uses X
|
|
dnl ===========================================
|
|
|
|
AC_PATH_XTRA
|
|
|
|
XCFLAGS="$X_CFLAGS"
|
|
|
|
XLFLAGS="$X_LIBS"
|
|
|
|
XLIBS="$X_EXTRA_LIBS -lX11"
|
|
|
|
dnl Decide which locale function to use, setlocale() or _Xsetlocale()
|
|
dnl by MANOME Tomonori
|
|
dnl ===========================================
|
|
AC_CHECK_LIB(X11, _Xsetlocale, [X_LOCALE="-DX_LOCALE"],, $XLFLAGS $XLIBS)
|
|
AC_SUBST(X_LOCALE)
|
|
|
|
|
|
dnl Shape support
|
|
dnl =============
|
|
shape=yes
|
|
AC_ARG_ENABLE(shape,
|
|
[ --disable-shape disable shaped window extension support],
|
|
shape=$enableval, shape=yes)
|
|
|
|
added_xext=no
|
|
|
|
if test "$shape" = yes; then
|
|
AC_CHECK_LIB(Xext, XShapeSelectInput, [XLIBS="-lXext $XLIBS"
|
|
added_xext=yes SHAPE=-DSHAPE], shape=no, $XLFLAGS $XLIBS)
|
|
fi
|
|
|
|
AC_SUBST(SHAPE)
|
|
|
|
|
|
dnl MIT-SHM support
|
|
dnl ===============
|
|
shm=yes
|
|
AC_ARG_ENABLE(shm,
|
|
[ --disable-shm disable usage of MIT-SHM extension],
|
|
shm=$enableval, shm=yes)
|
|
|
|
if test "$shm" = yes; then
|
|
AC_CHECK_LIB(Xext, XShmAttach, ok=yes, ok=no, $XLFLAGS $XLIBS)
|
|
|
|
if test "$ok" = yes; then
|
|
AC_CHECK_FUNC(shmget, ok=yes, ok=no)
|
|
fi
|
|
|
|
if test "$ok" = yes; then
|
|
if test "$added_xext" = no; then
|
|
XLIBS="-lXext $XLIBS"
|
|
fi
|
|
XSHM=-DXSHM
|
|
fi
|
|
fi
|
|
|
|
AC_SUBST(XSHM)
|
|
|
|
|
|
dnl R6 Style Session Management Support
|
|
dnl ===================================
|
|
|
|
#
|
|
#
|
|
#AC_DEFINE(R6SM)
|
|
#AC_SUBST(XSMPLIBS)
|
|
#
|
|
|
|
dnl ==============================================
|
|
dnl Graphic Format Libraries
|
|
dnl ==============================================
|
|
|
|
|
|
dnl
|
|
dnl Specify paths to look for graphic format libraries
|
|
dnl ==================================================
|
|
GFXLIBS=""
|
|
AC_ARG_WITH(gfx-libs,
|
|
[ --with-gfx-libs pass compiler flags to look for gfx libraries],
|
|
[GFXLFLAGS=$withval], [GFXLFLAGS=""])
|
|
|
|
AC_ARG_WITH(gfx-incs,
|
|
[ --with-gfx-incs pass compiler flags to look for gfx header files],
|
|
[GFXFLAGS="$withval" GFX_INC_PATH=$withval],
|
|
[GFXFLAGS="" GFX_INC_PATH=""])
|
|
|
|
|
|
|
|
|
|
dnl XPM Support
|
|
dnl ===========
|
|
xpm=yes
|
|
AC_ARG_ENABLE(xpm,
|
|
[ --disable-xpm disable use of XPM pixmaps through libXpm],
|
|
xpm=$enableval, xpm=yes)
|
|
|
|
if test "$xpm" = yes; then
|
|
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
|
|
my_libok=yes, my_libok=no,
|
|
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS)
|
|
|
|
if test "$my_libok" = yes; then
|
|
my_old_cppflags=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
|
|
AC_CHECK_HEADER(X11/xpm.h,
|
|
[GFXFLAGS="$GFXFLAGS -DUSE_XPM" GFXLIBS="$GFXLIBS -lXpm"
|
|
supported_gfx="XPM"], supported_gfx="XPM (builtin)")
|
|
CPPFLAGS=$my_old_cppflags
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(XLIBS)
|
|
AC_SUBST(XCFLAGS)
|
|
AC_SUBST(XLFLAGS)
|
|
|
|
AC_SUBST(X_EXTRA_LIBS)
|
|
|
|
dnl ===============================================
|
|
dnl End of stuff that uses X
|
|
dnl ===============================================
|
|
|
|
|
|
dnl PNG Support
|
|
dnl ===========
|
|
png=yes
|
|
AC_ARG_ENABLE(png,
|
|
[ --disable-png disable PNG support through libpng],
|
|
png=$enableval, png=yes, png=no)
|
|
|
|
|
|
if test "$png" = yes ; then
|
|
AC_CHECK_LIB(png, png_get_valid, my_libok=yes, my_libok=no,
|
|
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS -lz -lm)
|
|
|
|
if test "$my_libok" = yes; then
|
|
my_old_cppflags=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
|
|
AC_CHECK_HEADER(png.h,
|
|
[GFXLIBS="$GFXLIBS -lpng -lz" GFXFLAGS="$GFXFLAGS -DUSE_PNG"
|
|
supported_gfx="$supported_gfx PNG"], )
|
|
CPPFLAGS=$my_old_cppflags
|
|
fi
|
|
fi
|
|
|
|
|
|
dnl JPEG Support
|
|
dnl ============
|
|
jpeg=yes
|
|
AC_ARG_ENABLE(jpeg,
|
|
[ --disable-jpeg disable JPEG support through libjpeg],
|
|
jpeg=$enableval, jpeg=yes, jpeg=no)
|
|
|
|
if test "$jpeg" = yes; then
|
|
AC_CHECK_LIB(jpeg, jpeg_destroy_compress, my_libok=yes, my_libok=no,
|
|
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS)
|
|
|
|
if test "$my_libok" = yes; then
|
|
my_old_cppflags=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
|
|
AC_TRY_CPP(jpeglib.h,
|
|
[GFXLIBS="$GFXLIBS -ljpeg" GFXFLAGS="$GFXFLAGS -DUSE_JPEG"
|
|
supported_gfx="$supported_gfx JPEG"], jpeg_not_found=yes)
|
|
CPPFLAGS=$my_old_cppflags
|
|
fi
|
|
fi
|
|
|
|
|
|
dnl GIF Support
|
|
dnl ============
|
|
dnl
|
|
dnl giflib uses dangerous function naming... (namespace clashing)
|
|
dnl
|
|
gif=yes
|
|
AC_ARG_ENABLE(gif,
|
|
[ --disable-gif disable GIF support through libgif or libungif],
|
|
gif=$enableval, gif=yes, gif=no)
|
|
|
|
if test "$gif" = yes; then
|
|
retry=no
|
|
AC_CHECK_LIB(ungif, DGifOpenFileName,
|
|
[my_libok=yes my_libname=ungif],
|
|
[retry=yes my_libok=no],
|
|
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS)
|
|
dnl
|
|
dnl libungif is the same thing as libgif for all practical purposes.
|
|
dnl
|
|
if test "$retry" = yes; then
|
|
AC_CHECK_LIB(gif, DGifOpenFileName,
|
|
[my_libok=yes my_libname=gif],
|
|
my_libok=no,
|
|
$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS)
|
|
fi
|
|
|
|
if test "$my_libok" = yes; then
|
|
my_old_cppflags=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
|
|
AC_CHECK_HEADER(gif_lib.h,
|
|
[GFXLIBS="$GFXLIBS -l$my_libname" GFXFLAGS="$GFXFLAGS -DUSE_GIF"
|
|
supported_gfx="$supported_gfx GIF"], )
|
|
CPPFLAGS=$my_old_cppflags
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
dnl TIFF Support
|
|
dnl ============
|
|
AC_ARG_ENABLE(tiff,
|
|
[ --disable-tiff disable use of TIFF images through libtiff],
|
|
tif=$enableval, tif=yes, tif=no)
|
|
|
|
#
|
|
# TIFF can optionally have JPEG and/or zlib support. Must find out
|
|
# when they are supported so that correct library flags are passed during
|
|
# detection and linkage
|
|
#
|
|
#
|
|
# By default use xpm icons if tiff is not found.
|
|
ICONEXT="xpm"
|
|
#
|
|
|
|
if test "$tif" = yes; then
|
|
my_libname=""
|
|
AC_CHECK_LIB(tiff, TIFFGetVersion,
|
|
[my_libok=yes my_libname="-ltiff"], my_libok=no,
|
|
[$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lm])
|
|
dnl
|
|
dnl Retry with zlib
|
|
dnl
|
|
unset ac_cv_lib_tiff_TIFFGetVersion
|
|
if test "$my_libok" = no; then
|
|
AC_CHECK_LIB(tiff, TIFFGetVersion,
|
|
[my_libok=yes my_libname="-ltiff -lz"], my_libok=no,
|
|
[$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lz -lm])
|
|
fi
|
|
|
|
if test "$my_libok" = no; then
|
|
AC_CHECK_LIB(tiff34, TIFFGetVersion,
|
|
[my_libok=yes my_libname="-ltiff34"], my_libok=no,
|
|
[$GFX_INC_PATH $GFXLFLAGS $XLFLAGS $XLIBS $GFXLIBS -lm])
|
|
fi
|
|
|
|
if test "$my_libok" = yes; then
|
|
my_old_cppflags=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS $GFX_INC_PATH $XCFLAGS"
|
|
AC_CHECK_HEADER(tiffio.h,
|
|
[GFXFLAGS="$GFXFLAGS -DUSE_TIFF" GFXLIBS="$my_libname $GFXLIBS"
|
|
ICONEXT="tiff" supported_gfx="$supported_gfx TIFF"], )
|
|
CPPFLAGS=$my_old_cppflags
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(GFXFLAGS)
|
|
AC_SUBST(GFXLFLAGS)
|
|
AC_SUBST(GFXLIBS)
|
|
AC_SUBST(ICONEXT)
|
|
|
|
|
|
dnl ==============================================
|
|
dnl End of Graphic Format Libraries
|
|
dnl ==============================================
|
|
|
|
|
|
dnl Debugging setup
|
|
dnl ===============
|
|
AC_ARG_ENABLE(debug,
|
|
[ --enable-debug enable debugging ],, enable_debug=no)
|
|
|
|
if test "$enable_debug" = yes; then
|
|
DFLAGS="-g -DDEBUG"
|
|
# Efence makes things too slow. Add it by hand in the Makefiles
|
|
# if it is really needed.
|
|
# AC_CHECK_LIB(efence, malloc, LIBS="$LIBS -lefence")
|
|
fi
|
|
AC_SUBST(DFLAGS)
|
|
|
|
|
|
dnl Sound support - Dan
|
|
dnl =============================================
|
|
sound=yes
|
|
AC_ARG_ENABLE(sound,
|
|
[ --disable-sound disable sound support ],
|
|
sound=$enableval, sound=yes)
|
|
if test "$sound" = yes; then
|
|
SOUND="#define WMSOUND"
|
|
else
|
|
SOUND="#undef WMSOUND"
|
|
fi
|
|
AC_SUBST(SOUND)
|
|
|
|
|
|
# AC_PREFIX_PROGRAM(wmaker)
|
|
|
|
if test "${prefix}" = "NONE"; then
|
|
prefix="/usr/local"
|
|
fi
|
|
if test "${exec_prefix}" = "NONE"; then
|
|
exec_prefix='$(prefix)'
|
|
fi
|
|
|
|
dnl Support for PIXMAPDIR option
|
|
dnl ============================
|
|
AC_ARG_WITH(pixmapdir,
|
|
[ --with-pixmapdir=PATH specify where pixmaps are located [DATADIR/pixmaps]])
|
|
|
|
if test "x$with_pixmapdir" != "x"; then
|
|
pixmapdir=$with_pixmapdir
|
|
else
|
|
pixmapdir='$(datadir)/pixmaps'
|
|
fi
|
|
|
|
AC_SUBST(pixmapdir)
|
|
|
|
|
|
dnl Support for GNUSTEP_LOCAL_ROOT, for WPrefs.app
|
|
dnl ==============================================
|
|
|
|
appspath=""
|
|
|
|
AC_ARG_WITH(appspath,
|
|
[ --with-appspath=PATH specify the path of the GNUstep applications
|
|
directory], appspath=$withval )
|
|
|
|
if test "x$appspath" = "x"; then
|
|
gnustepdir='$(prefix)/GNUstep'
|
|
|
|
if test "x$GNUSTEP_LOCAL_ROOT" != "x" ; then
|
|
gnustepdir=`echo "$GNUSTEP_LOCAL_ROOT" | sed -e "s|^${prefix}|prefix|"`
|
|
gnustepdir=`echo $gnustepdir | sed -e 's|^prefix|${prefix}|'`
|
|
fi
|
|
|
|
with_appspath=$gnustepdir/Apps
|
|
fi
|
|
|
|
wprefsdir=$with_appspath/WPrefs.app
|
|
|
|
AC_SUBST(wprefsdir)
|
|
|
|
|
|
|
|
dnl Enable single appicon per wm instance+class combo -cls
|
|
dnl =====================================================
|
|
AC_ARG_ENABLE(single-icon,
|
|
[ --enable-single-icon use single application icon per WM_INSTANCE+WM_CLASS
|
|
],
|
|
if test "$enableval" = yes; then
|
|
REDUCE_APPICONS="#define REDUCE_APPICONS"
|
|
else
|
|
REDUCE_APPICONS="#undef REDUCE_APPICONS"
|
|
fi,
|
|
REDUCE_APPICONS="#undef REDUCE_APPICONS"
|
|
)
|
|
AC_SUBST(REDUCE_APPICONS)
|
|
|
|
|
|
dnl Checks for header files.
|
|
dnl =======================
|
|
dnl AC_HEADER_STDC
|
|
AC_HEADER_SYS_WAIT
|
|
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h\
|
|
libintl.h sys/select.h poll.h)
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
dnl ==============================================================
|
|
AC_DECL_SYS_SIGLIST
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
AC_TYPE_PID_T
|
|
AC_HEADER_TIME
|
|
|
|
|
|
|
|
dnl Shared Library Support (unfinished)
|
|
dnl ===================================
|
|
|
|
enable_shared=no
|
|
#AC_ARG_ENABLE(shared,
|
|
#[ --enable-shared build libraries as shared ], enable_shared=yes,
|
|
# enable_shared=no)
|
|
|
|
if test "$enable_shared" = yes; then
|
|
if test "$GCC" = yes; then
|
|
_CFLAGS="-fPIC"
|
|
LDSHARED='$CC -shared'
|
|
else
|
|
# find system name and corresponding cc options
|
|
case `(uname -sr || echo unknown) 2>/dev/null` in
|
|
SunOS\ 5*)
|
|
_CFLAGS="-fast -xcg89 -KPIC -R."
|
|
LDSHARED='$CC -G';;
|
|
SunOS\ 4*)
|
|
_CFLAGS="-PIC"
|
|
LDSHARED="ld";;
|
|
IRIX*)
|
|
_CFLAGS="-ansi -rpath ."
|
|
LDSHARED='$CC -shared';;
|
|
SCO_SV\ 3.2*)
|
|
_CFLAGS="-dy -KPIC "
|
|
LDSHARED='$CC -dy -KPIC -G';;
|
|
HP-UX*)
|
|
_CFLAGS="+z"
|
|
LDSHARED="ld -b"
|
|
SHAREDLIBS='libz.sl';;
|
|
*)
|
|
_CFLAGS=""
|
|
LDSHARED='$CC -shared';;
|
|
esac
|
|
fi
|
|
|
|
AC_MSG_CHECKING([for shared library support])
|
|
|
|
test=tmptest$$
|
|
cat > $test.c <<EOF
|
|
int hello() { printf("hello\n"); }
|
|
EOF
|
|
|
|
|
|
# we must test in two steps (cc then ld), required at least on SunOS 4.x
|
|
if test "`($CC -c $_CFLAGS $test.c) 2>&1`" = "" &&
|
|
test "`($LDSHARED -o $test.so $test.o) 2>&1`" = ""; then
|
|
CFLAGS="$CFLAGS $_CFLAGS"
|
|
WRASTERLIB='libwraster.so.$(WRASTER_VER)'
|
|
WINGSLIB='libWINGs.so.$(WINGS_VER)'
|
|
AC_MSG_RESULT([yes, building shared])
|
|
else
|
|
LDSHARED='$CC'
|
|
WRASTERLIB='libwraster.a'
|
|
WINGSLIB='libWINGs.a'
|
|
AC_MSG_RESULT([no, building static])
|
|
fi
|
|
rm -f $test.[co] $test.so
|
|
fi
|
|
|
|
#AC_SUBST(WRASTER_VER)
|
|
#AC_SUBST(WINGS_VER)
|
|
#AC_SUBST(WRASTERLIB)
|
|
# AC_SUBST(WINGSLIB)
|
|
# AC_SUBST(LDSHARED)
|
|
|
|
|
|
|
|
dnl
|
|
dnl Nicolai: Program tests for Documentation Section
|
|
dnl =================================================
|
|
dnl DOCTYPES=""
|
|
dnl AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, ,$PATH)
|
|
dnl if test "x$MAKEINFO" != "x" ; then
|
|
dnl DOCTYPES="$DOCTYPES info_doc"
|
|
dnl fi
|
|
dnl AC_CHECK_PROG(TEX, tex, tex, ,$PATH)
|
|
dnl if test "x$TEX" != "x" ; then
|
|
dnl DOCTYPES="$DOCTYPES dvi_doc"
|
|
dnl fi
|
|
dnl AC_CHECK_PROG(DVIPS, dvips, dvips, ,$PATH)
|
|
dnl if test "x$DVIPS" != "x" ; then
|
|
dnl DOCTYPES="$DOCTYPES ps_doc"
|
|
dnl fi
|
|
dnl AC_CHECK_PROG(PERL, perl, perl, ,$PATH)
|
|
dnl if test "x$PERL" != "x" ; then
|
|
dnl DOCTYPES="$DOCTYPES html_doc"
|
|
dnl fi
|
|
dnl AC_PATH_PROG(PERL_PATH, perl, perl, ,$PATH)
|
|
dnl AC_CHECK_PROG(TEXI2HTML, texi2html, texi2html, ,$PATH)
|
|
|
|
dnl AC_SUBST(DOCTYPES)
|
|
|
|
AC_OUTPUT(Makefile po/Makefile util/Makefile test/Makefile wmlib/Makefile \
|
|
WINGs/Makefile WINGs/Resources/Makefile src/Makefile src/wconfig.h \
|
|
wrlib/Makefile doc/Makefile WindowMaker/Makefile \
|
|
WindowMaker/Backgrounds/Makefile WindowMaker/Defaults/Makefile \
|
|
WindowMaker/IconSets/Makefile WindowMaker/Icons/Makefile \
|
|
WindowMaker/Pixmaps/Makefile WindowMaker/Styles/Makefile \
|
|
WindowMaker/Themes/Makefile \
|
|
WindowMaker/Themes/Night.themed/Makefile \
|
|
WindowMaker/Themes/Checker.themed/Makefile \
|
|
WPrefs.app/Makefile WPrefs.app/tiff/Makefile WPrefs.app/xpm/Makefile \
|
|
WPrefs.app/po/Makefile )
|
|
|
|
|
|
|
|
dnl
|
|
dnl Output some helpfull data for compiling WINGs apps
|
|
dnl ==================================================
|
|
dnl
|
|
|
|
echo "WFLAGS=\"$LIBPL_INC_PATH -I$prefix/include\"" > WINGs-flags
|
|
echo "WLIBS=\"-L$exec_prefix/lib -lWINGs -lwraster $LIBPL_LIBS $GFXLIBS -lm\""\
|
|
| sed -e 's|\$(prefix)|'"$prefix|" >> WINGs-flags
|
|
|
|
|
|
dnl
|
|
dnl Spit out the configuration
|
|
dnl ==========================
|
|
|
|
supported_gfx="$supported_gfx PPM (built-in)"
|
|
|
|
if test "x$MOFILES" = "x"; then
|
|
mof=none
|
|
else
|
|
mof=$MOFILES
|
|
fi
|
|
|
|
echo
|
|
echo "Window Maker was configured as follows:"
|
|
echo
|
|
echo "Installation path prefix: $prefix"
|
|
echo "Installation path prefix for binaries: $exec_prefix" | sed -e 's|\$(prefix)|'"$prefix|"
|
|
echo "Installation path for WPrefs.app: $wprefsdir" | sed -e 's|\$(prefix)|'"$prefix|"
|
|
echo "Graphic format libraries: $supported_gfx"
|
|
echo "Sound support: $sound"
|
|
echo "Translated message files to install: $mof"
|
|
if test "x$MOFILES" != "x"; then
|
|
echo "Installation path of translated messages: $NLSDIR" | sed -e 's|\$(prefix)|'"$prefix|"
|
|
fi
|
|
if test x$kde_on != x; then
|
|
echo "KDE support enabled"
|
|
fi
|
|
if test x$LITE != x; then
|
|
echo "Duplicated stuff with KDE will be removed"
|
|
fi
|
|
if test x$gnome_on != x; then
|
|
echo "GNOME support enabled"
|
|
fi
|
|
|
|
if test "$jpeg_not_found" = yes; then
|
|
echo "JPEG support will not be included because the JPEG library is"
|
|
echo "not installed correctly or was not found. Background images"
|
|
echo "from themes will not display as they usually are JPEG files."
|
|
fi
|
|
|
|
|
|
dnl This is for Emacs. I'm lazy, I know... (nicolai)
|
|
dnl ================================================
|
|
dnl Local Variables:
|
|
dnl compile-command: "autoconf"
|
|
dnl End:
|
|
|