New configure facility.

This commit is contained in:
Sanel Zukan 2007-03-17 11:28:25 +00:00
parent 06438466eb
commit be29467f10
11 changed files with 350 additions and 152 deletions

0
EDE
View File

View File

@ -7,32 +7,50 @@ Please read this document before using or contributing to EDE 2.0 source code
before or during 2.0alpha release.
BUILD REQUIREMENTS
Build requirements
------------------
EDE 2.0 is using fltk2 toolkit which is not officially released yet. Lately
fltk2 has been pretty stable, so you should be able to use any reasonably
fresh SVN snapshot from www.fltk.org. Nevertheless, we keep our own "fork"
fresh SVN snapshot from www.fltk.org. Nevertheless, we will (soon) keep our own "fork"
called fltk-copy which is basically the last SVN snapshot that EDE is known
to work with. If there are any patches required for proper EDE functioning,
you should find them in fltk-copy tree. Further instructions are in
you should find them in fltk-copy tree. Further instructions will be in
fltk-copy/README.ede
Make sure you have efltk installed, because some packages still requires it.
COMPILING
Also you will need Jam utility. Jam is make replacement and removes a lot of it's
limitations. Current source can be built either via jam or make, but note that make
builds will be soon removed.
Jam can be downloaded from our repository.
Compiling
---------
At the moment, certain modules in EDE do not compile! In order to build and install
EDE do the following
EDE do the following:
1. (old method, soon will be removed)
autoconf
./configure [OPTIONS] (we suggest using --enable-debug)
cd edelib2; make; cd ..
Then go into directories of individual modules and compile them. Type
Then go into directories of individual modules and compile them. Type
cd $MODULE; make; make install; cd ..
2. (new method, default)
autoconf
./configure [OPTIONS] (we suggest using --enable-debug)
jam
STUFF THAT DOESN'T COMPILE
Installation is not finished yet.
Stuff that doesn't compile
--------------------------
- edewm
- eiconman
@ -49,7 +67,8 @@ It will either be completely rewritten or removed, because EDE 2 will use XDG me
(FreeDesktop.org).
NEW MODULES IN EDE 2.0
New modules in EDE 2.0
----------------------
- edialog
Command line utility for displaying dialogs (useful for scripting). It is very
@ -63,7 +82,8 @@ etc.
Small image viewer. It should be fully usable but still some bugs present.
CONTRIBUTORS WANTED
Contributors wanted
-------------------
We would very appreciate help from contributors willing to take any of following
tasks:
@ -78,4 +98,4 @@ with fltk, ofcourse :)
- Find useful fltk2 apps on www.fltk.org and see if they can be ede-ified
Also, EDE code is sparkled with comments starting with TODO and FIXME - please see
what of that you can do. EDE coding standards and EDE HIG documents are being prepared.
what of that you can do. EDE coding standards and EDE HIG documents are being prepared.

View File

@ -2,176 +2,84 @@ dnl
dnl $Id: configure.in 1719 2006-08-15 08:56:42Z karijes $
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2006 EDE Authors.
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
dnl If edeconf.h.in missing, parse this file with autoheader
dnl Add kstat support ??? (Solaris)
dnl Should we add AC_HELP_STRING ???
dnl It seems that RH 7.2 have old autoconf without this macro
dnl or run './prepare'.
AC_PREREQ(2.16)
AC_INIT(EDE, 2.0.0 alpha, [karijes@users.sourceforge.net])
AC_DEFINE(VERSION, 195, [Short version number])
AC_DEFINE(VERSION, 200, [Short version number])
dnl dummy real file from source, so older autoconf versions
dnl does not require creating EDE file in source root
AC_CONFIG_SRCDIR(COPYING)
AC_CONFIG_HEADER(edeconf.h:edeconf.h.in)
dnl $PACKAGE_VERSION is filled from AC_INIT
EDE_VERSION=$PACKAGE_VERSION
AC_PROG_CXX
AC_PROG_CPP
AC_PATH_PROG(CXX, g++)
AC_PATH_PROG(RM, rm)
AC_PATH_PROG(MSGFMT, msgfmt)
AC_PATH_PROG(MAKEDEPEND, makedepend)
dnl basic headers
AC_PROG_INSTALL
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADER(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
AC_CHECK_HEADER(ndir.h, AC_DEFINE(HAVE_NDIR_H))
AC_CHECK_HEADER(sys/dir.h, AC_DEFINE(HAVE_SYS_DIR_H))
AC_CHECK_HEADER(sys/ndir.h, AC_DEFINE(HAVE_SYS_NDIR_H))
AC_CHECK_HEADER(linux/soundcard.h, AC_DEFINE(HAVE_ALSA))
AC_CHECK_HEADER(time.h, AC_DEFINE(HAVE_TIME_H))
AC_CHECK_FUNCS(stime, AC_DEFINE(HAVE_STIME))
if test "$prefix" = NONE; then
INSTALL_DIR="/usr/local"
else
INSTALL_DIR="$prefix"
fi
AC_DEFINE_UNQUOTED(PREFIX, "$INSTALL_DIR", [Default installation place. Overwrite if you like.])
dnl check X11
AC_PATH_X
AC_PATH_XTRA
OPTIMFLAGS="-O2"
DEBUGFLAGS=""
dnl from old configure.in
AC_CHECK_LIB(X11, Xutf8TextPropertyToTextList,
AC_DEFINE(HAVE_X11_UTF_TEXT_PROP, 1, [Define 1 if XWindows has Xutf extension.]), )
AC_PROG_CXX
AC_PROG_CPP
AC_PATH_PROG(MSGFMT, msgfmt)
AC_PATH_PROG(XGETTEXT, xgettext)
EDE_PROG_JAM()
dnl basic headers
AC_HEADER_STDC
AC_CHECK_HEADER(dirent.h, AC_DEFINE(HAVE_DIRENT_H, 1, [Define to 1 if you have dirent.h]))
AC_CHECK_HEADER(ndir.h, AC_DEFINE(HAVE_NDIR_H, 1, [Define to 1 if you have ndir.h]))
AC_CHECK_HEADER(sys/dir.h, AC_DEFINE(HAVE_SYS_DIR_H, 1, [Define to 1 if you have sys/dir.h]))
AC_CHECK_HEADER(sys/ndir.h, AC_DEFINE(HAVE_SYS_NDIR_H, 1, [Define to 1 if you have sys/ndir.h]))
dnl all warnings on
CXXFLAGS="-Wall "
EDE_CHECK_TIME_FUNCS()
dnl compile silent ?
SILENT=".SILENT:"
EDE_CHECK_X11()
dnl home directorty (for config.h)
HOME_DIR="`pwd`"
CURR_DIR=" -I. "
CXXFLAGS="$CXXFLAGS -I$HOME_DIR $CURR_DIR"
dnl --enable-debug and --enable-profile options
EDE_DEVELOPMENT()
AC_ARG_ENABLE(optimize, [ --enable-optimize compile with optimizations],
[if eval "test x$enable_optimize = xyes"; then
CXXFLAGS="$CXXFLAGS -O2"
fi])
dnl --enable-shape option
EDE_X11_SHAPE()
AC_ARG_ENABLE(debug, [ --enable-debug compile with debug information],
[if eval "test x$enable_debug = xyes"; then
CXXFLAGS="$CXXFLAGS -g3 -D_DEBUG"
fi])
dnl set FLTKFLAGS, FLTKLIBS
EDE_CHECK_FLTK()
dnl set EFLTKFLAGS, EFLTKLIBS
EDE_CHECK_EFLTK()
AC_ARG_ENABLE(sounds, [ --enable-sounds enable sounds in window manager],
[if eval "test x$enable_sounds = xyes"; then
AC_CHECK_HEADER(ao/ao.h, [have_ao_h=yes], [have_ao_h=no])
AC_CHECK_LIB(ao, ao_is_big_endian, [have_ao_lib=yes], [have_ao_lib=no])
AC_CHECK_HEADER(vorbis/codec.h, [have_codec_h=yes], [have_codec_h=no])
AC_CHECK_LIB(vorbis, vorbis_info_init, [have_vorbis_lib=yes], [have_vorbis_lib=no])
EDE_CHECK_LIBMAGIC()
AC_CHECK_HEADER(vorbis/vorbisfile.h, [have_vorbisfile_h=yes], [have_vorbisfile_h=no])
AC_CHECK_LIB(vorbisfile, ov_clear, [have_vorbisfile_lib=yes], [have_vorbisfile_lib=no])
dnl sound stuff
EDE_CHECK_ALSA()
dnl --enable-sound option
dnl set SOUNDFLAGS, SOUNDLIBS
EDE_SOUND()
AC_MSG_CHECKING(sound support)
if eval "test x$have_ao_h = xyes" && \
eval "test x$have_codec_h = xyes" && \
eval "test x$have_vorbisfile_h = xyes"; then
AC_MSG_RESULT(ok)
CXXFLAGS="$CXXFLAGS -DSOUND"
LIBS="-lao -lvorbis -lvorbisfile"
else
AC_MSG_RESULT(disabled)
fi
fi])
AC_SUBST(OPTIMFLAGS)
AC_SUBST(DEBUGFLAGS)
AC_SUBST(FLTKFLAGS)
AC_SUBST(FLTKLIBS)
AC_SUBST(EFLTKFLAGS)
AC_SUBST(EFLTKLIBS)
AC_SUBST(SOUNDFLAGS)
AC_SUBST(SOUNDLIBS)
AC_SUBST(MAKE_EVOLUME)
AC_SUBST(INSTALL_DIR)
AC_ARG_ENABLE(silent, [ --disable-silent show compiler output],
[
if eval "test x$enable_silent = xno"; then
SILENT=""
fi
])
dnl NLS enabled by default
AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support],,
enable_nls=yes)
if eval "test x$enable_nls = xyes"; then
AC_DEFINE(ENABLE_NLS, [], [Define 1 if you want native language support.])
fi
dnl Check for 'fltk2-config'
AC_PATH_PROG(FLTK2_CONFIG, fltk2-config)
if test -n "$FLTK2_CONFIG"; then
CXXFLAGS="$CXXFLAGS `fltk2-config --cxxflags`"
LIBS="$LIBS `fltk2-config --use-images --ldflags`"
else
AC_MSG_ERROR([You don't have fltk2 installed. To compile Ede, you will need it.])
fi
dnl Check efltk's version.
dnl Less than 2.0.4 is not supported
dnl [45] will match 2.0.4 and 2.0.5 version
dnl AC_MSG_CHECKING(efltk version >= 2.0.4)
dnl EFLTK_VERSION="`efltk-config --version`"
dnl case "$EFLTK_VERSION" in ["2.0."[45]])
dnl dnl Display 'yes' for efltk version check
dnl AC_MSG_RESULT(yes)
dnl ;;
dnl *)
dnl AC_MSG_ERROR([It seems that you have older efltk version. Required is >= 2.0.4])
dnl esac
if test $ac_cv_header_linux_soundcard_h = yes; then
EVOLUME=evolume/
else
echo
echo "***************************************"
echo "* ALSA WAS NOT FOUND *"
echo "* *"
echo "* Sadly, evolume is ALSA-only at this *"
echo "* moment. It will be disabled. *"
echo "***************************************"
EVOLUME=
fi
AC_SUBST(CXXFLAGS)
AC_SUBST(LIBS)
AC_SUBST(SILENT)
AC_SUBST(HOME_DIR)
AC_SUBST(EVOLUME)
AC_SUBST(EDE_VERSION)
AC_OUTPUT([
makeinclude
datas/startede
])
AC_CONFIG_FILES([Jamconfig])
AC_OUTPUT

44
m4/fltk.m4 Normal file
View File

@ -0,0 +1,44 @@
dnl
dnl $Id$
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
AC_DEFUN([EDE_CHECK_FLTK], [
dnl AC_MSG_NOTICE(whether is fltk 2.0 present)
AC_PATH_PROG(FLTK2_CONFIG, fltk2-config)
if test -n "$FLTK2_CONFIG"; then
FLTKFLAGS=`fltk2-config --cxxflags`
dnl remove -lsupc++ so we can chose what to use
FLTKLIBS=`fltk2-config --use-images --ldflags | sed -e 's/-lsupc++//g'`
else
AC_MSG_ERROR([You don't have fltk2 installed. To compile EDE, you will need it.])
fi
])
AC_DEFUN([EDE_CHECK_EFLTK], [
dnl AC_MSG_NOTICE(whether is efltk present)
AC_PATH_PROG(EFLTK_CONFIG, efltk-config)
if test -n "$EFLTK_CONFIG"; then
EFLTKFLAGS=`efltk-config --cxxflags`
EFLTKLIBS=`efltk-config --use-images --ldflags`
else
AC_MSG_ERROR([You don't have efltk installed. To compile EDE, you will need it.])
fi
AC_MSG_CHECKING(efltk version >= 2.0.4)
EFLTK_VERSION="`efltk-config --version`"
case "$EFLTK_VERSION" in ["2.0."[56789]])
dnl Display 'yes' for efltk version check
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_ERROR([It seems that you have older efltk version. Required is >= 2.0.4])
esac
])

33
m4/jam.m4 Normal file
View File

@ -0,0 +1,33 @@
dnl
dnl $Id$
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
dnl Check do we have jam installed and try to determine version
dnl where is minimal supported 2.3
AC_DEFUN([EDE_PROG_JAM], [
AC_PATH_PROG(JAM, jam)
if test -n "$JAM"; then
AC_MSG_CHECKING([for jam version])
echo "Echo \$(JAMVERSION) ;" > conftest.jam
jam_version_orig=`$JAM -f conftest.jam | head -1`
jam_version=`echo $jam_version_orig | sed -e 's/\.//g'`
rm -f conftest.jam
if test "$jam_version" -ge 23; then
msg="$jam_version_orig (ok)"
AC_MSG_RESULT($msg)
else
msg="jam version $jam_version_orig is too old. Download a newer version from our repository"
AC_MSG_ERROR($msg)
fi
else
AC_MSG_ERROR(Jam is missing! You can download it from our repository)
fi
])

18
m4/libmagic.m4 Normal file
View File

@ -0,0 +1,18 @@
dnl
dnl $Id$
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
dnl Check for presence of libmagic, since is used for mime types
dnl Note that libmagic requires libz to be linked against in this test
AC_DEFUN([EDE_CHECK_LIBMAGIC], [
AC_CHECK_HEADER(magic.h, [
AC_CHECK_LIB(magic, magic_open, AC_DEFINE(HAVE_LIBMAGIC, 1, [Define to 1 if you have libmagic library]),,
-lz)
])
])

59
m4/sound.m4 Normal file
View File

@ -0,0 +1,59 @@
dnl
dnl $Id$
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
dnl Enable sound param and check for facility
dnl For now only .ogg via libao
AC_DEFUN([EDE_SOUND], [
AC_ARG_ENABLE(sounds, [ --enable-sounds enable sounds (default=yes)],, enable_sounds=yes)
if eval "test $enable_sounds = yes"; then
AC_CHECK_HEADER(ao/ao.h, [have_ao_h=yes], [have_ao_h=no])
AC_CHECK_LIB(ao, ao_is_big_endian, [have_ao_lib=yes], [have_ao_lib=no])
AC_CHECK_HEADER(vorbis/codec.h, [have_codec_h=yes], [have_codec_h=no])
AC_CHECK_LIB(vorbis, vorbis_info_init, [have_vorbis_lib=yes], [have_vorbis_lib=no])
AC_CHECK_HEADER(vorbis/vorbisfile.h, [have_vorbisfile_h=yes], [have_vorbisfile_h=no])
AC_CHECK_LIB(vorbisfile, ov_clear, [have_vorbisfile_lib=yes], [have_vorbisfile_lib=no])
AC_MSG_CHECKING(sound support)
if eval "test $have_ao_h = yes" && \
eval "test $have_codec_h = yes" && \
eval "test $have_vorbisfile_h = yes"; then
AC_MSG_RESULT(ok)
SOUNDFLAGS="-DSOUND"
SOUNDLIBS="-lao -lvorbis -lvorbisfile"
else
AC_MSG_RESULT(disabled)
fi
fi
])
dnl Check if we have alsa installed since evolume rely on it
dnl Here are two parameters that are set:
dnl - HAVE_ALSA used in edeconf.h
dnl - MAKE_EVOLUME used by jam
AC_DEFUN([EDE_CHECK_ALSA], [
AC_CHECK_HEADER(linux/soundcard.h, AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if you have alsa libraries]))
if eval "test $ac_cv_header_linux_soundcard_h = yes"; then
MAKE_EVOLUME="1"
else
echo
echo "***************************************"
echo "* ALSA WAS NOT FOUND *"
echo "* *"
echo "* Sadly, evolume is ALSA-only at this *"
echo "* moment. It will be disabled. *"
echo "***************************************"
MAKE_EVOLUME="0"
fi
])

25
m4/time.m4 Normal file
View File

@ -0,0 +1,25 @@
dnl
dnl $Id$
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
dnl Check for time functions since they are
dnl different between systems
AC_DEFUN([EDE_CHECK_TIME_FUNCS], [
dnl glibc extension, not present on BSD's
AC_CHECK_HEADER(time.h, [
AC_CHECK_FUNCS(stime, AC_DEFINE(HAVE_STIME, 1, [Define to 1 if you have stime() in time.h]))
])
dnl rest should have this
AC_CHECK_HEADER(sys/time.h, [
AC_CHECK_FUNCS(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Define to 1 if you have gettimeofday() in sys/time.h]))
AC_CHECK_FUNCS(settimeofday, AC_DEFINE(HAVE_SETTIMEOFDAY, 1, [Define to 1 if you have settimeofday() in sys/time.h]))
])
])

30
m4/various.m4 Normal file
View File

@ -0,0 +1,30 @@
dnl
dnl $Id$
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
dnl --enable-debug and --enable-profile options
AC_DEFUN([EDE_DEVELOPMENT], [
dnl clear all optimization flags
OPTIMFLAGS=""
AC_ARG_ENABLE(debug, [ --enable-debug enable debug (default=no)],,enable_debug=no)
if eval "test $enable_debug = yes"; then
DEBUGFLAGS="$DEBUGFLAGS -g3"
fi
AC_ARG_ENABLE(profile, [ --enable-profile enable profile (default=no)],,enable_profile=no)
if eval "test $enable_profile = yes"; then
DEBUGFLAGS="$DEBUGFLAGS -pg"
fi
AC_ARG_ENABLE(pedantic, [ --enable-pedantic enable pedantic (default=no)],,enable_pedantic=no)
if eval "test $enable_pedantic = yes"; then
DEBUGFLAGS="$DEBUGFLAGS -pedantic"
fi
])

30
m4/xlib.m4 Normal file
View File

@ -0,0 +1,30 @@
dnl
dnl $Id$
dnl
dnl Part of Equinox Desktop Environment (EDE).
dnl Copyright (c) 2000-2007 EDE Authors.
dnl
dnl This program is licenced under terms of the
dnl GNU General Public Licence version 2 or newer.
dnl See COPYING for details.
AC_DEFUN([EDE_CHECK_X11], [
dnl generic X11 checkers
AC_PATH_X
AC_PATH_XTRA
if eval "test $ac_x_libraries = no" || eval "test $ac_x_includes = no"; then
AC_MSG_ERROR([X11 libraries are not found! Please install them first])
fi
])
AC_DEFUN([EDE_X11_SHAPE], [
AC_ARG_ENABLE(shape, [ --enable-shape enable XShape extension (default=yes)],,enable_shape=yes)
dnl $X_LIBS contains path to X11 libs, since are not in path by default
if eval "test $enable_shape = yes"; then
AC_CHECK_HEADER(X11/extensions/shape.h, [
AC_CHECK_LIB(Xext, XShapeInputSelected,
AC_DEFINE(HAVE_SHAPE, 1, [Define to 1 if you have XShape extension]),,$X_LIBS)
])
fi
])

31
prepare Executable file
View File

@ -0,0 +1,31 @@
#!/bin/sh
if aclocal -I m4 && autoheader && autoconf; then
conffile="Jamconfig.in"
echo "#" > $conffile
echo "# Do not edit this file. Edit configure.in and *.m4 files" >> $conffile
echo "# and run './prepare'" >> $conffile
echo "#" >> $conffile
echo "" >> $conffile
# a cool trict from autojam
autoconf --trace=AC_SUBST \
| sed -e 's/configure.in:[0-9]*:AC_SUBST:\([^:]*\).*/\1 ?= "@\1@" ;/g' \
| sed -e '/ac_*/d' -e '/ECHO_*/d' \
| sort -u \
>> $conffile
echo 'INSTALL_DIR ?= "@INSTALL_DIR@" ;' >> $conffile
# a junk from autoheader
rm -f "edeconf.h.in~"
echo ""
echo "Now run ./configure [OPTIONS]"
echo "or './configure --help' to see them"
else
echo ""
echo "We failed :(. There should be some output, right ?"
exit 1
fi