Attached for ion version 20031121. Sent to list previously but not getting through.

Please test --

copy files to ion src dir
run autoconf
run ./configure --help


autoconf script for latest version coming soon -- am away right now.

Tom
Autoconf script for the Ion Window Manager
Copyright (C) Tom Payne, 2003
by Tom Payne <[EMAIL PROTECTED]>

INTRODUCTION

        This is an autoconf script for the development version of the Ion
        window manager. It generates system-ac.mk which is automatically used
        in preference to system.mk if it exists.

        Please report bugs in this script to Tom Payne <[EMAIL PROTECTED]>.

DEPENDENCIES

        ion-devel-20031121

INSTALLATION

        Copy all the files to your ion-devel toplevel source directory.

NOTES

        The Ion-specific options to ./configure are:

                --disable-xinerama
                --disable-xfree86-textprop-bug-workaround
                --enable-Xutf8
                --disable-shared
                --with-libtool (see *BSD NOTES below)
                --with-lua* (see DEBIAN NOTES below)

        Run ./configure --help for more information on these options. The
        defaults are chosen to generate a configuration very similar to the
        Ion default.

*BSD NOTES

        Many *BSD versions come with a very old version of libtool. Use the
        --with-libtool option to use a more recent version installed
        elsewhere, e.g.

                ./configure --with-libtool=/usr/local/stow/libtool-1.5

DEBIAN NOTES

        If you are using the Lua 5.0 package on Debian then use

                ./configure --with-lua=debian50

        This is shorthand for

                ./configure \
                        --with-lua-prefix=/usr \
                        --with-lua-includes=/usr/include/lua50 \
                        --with-lua-libraries=/usr/lib \
                        --with-lua-postfix=50

        This is for the convenience of Debian users maintaining their own
        local copy of Ion. Debian package maintainers should not rely on its
        existence, and should instead set --with-lua-prefix, etc. explicitly.

KNOWN BUGS

        This script has only been tested on Gentoo Linux. It needs to be
        tested _much_ more widely!

IMPLEMENTATION NOTES

        system-ac.mk.in is constructed to be as similar to system.mk as
        possible.

        The canonical files for this package are:
                README.autoconf
                configure.ac
                system-ac.mk.in
        install-sh is part of automake and can usually be found in
        /usr/share/automake*, the other files are added when autoconf is run
        to generate configure.

        This autoconf script has been developed with autoconf-2.58, it is
        unknown whether it works with other versions.

        The Ion version number is hardcoded in configure.ac. Sadly it cannot be
        generated dynamically (e.g. from version.h) due to an autoconf
        limitation. However the version number is not used anywhere and so can
        be safely ignored.

        On my system (Gentoo Linux, glibc 2.3.2, gcc 3.3.2) the -ansi option
        to gcc causes the macro va_copy not to be defined, which later causes
        link errors when ld tries to link the symbol va_copy rather than
        whatever the va_copy macro expands to. I've put in a test to
        automatically strip -ansi from XOPEN_SOURCE if this is the case, but I
        regard this is as a kludge.


AUTHORS

        Tom Payne <[EMAIL PROTECTED]>

COPYRIGHT

        This program is licensed under the terms of the Lesser General Public
        License (LGPL) version 2.1.

vim: textwidth=78
dnl Process this file with autoconf to produce a configure script.
dnl Please report bugs in this autconf script Tom Payne <[EMAIL PROTECTED]>
dnl $Header: /home/twp/cvsroot/twp/ion/ion-devel-autoconf/configure.ac,v 1.4 
2003/12/09 20:10:48 twp Exp $

AC_INIT([Ion Window Manager Development Version],
                [20031121],
                [EMAIL PROTECTED],
                [ion-devel])
AC_PREREQ([2.58])
AC_REVISION([$Revision: 1.4 $])

dnl Checks for programs. {{{
AC_PROG_CC()
AC_PROG_INSTALL()
AC_PROG_RANLIB()
AC_CHECK_TOOL([STRIP], [strip], [:])
AC_CHECK_TOOL([AR], [ar], [])
dnl }}}

dnl Checks for libraries. {{{
AC_PATH_XTRA()
test "${X_DISPLAY_MISSING+set}" == set && exit 1
dnl }}}

dnl XINERAMA_LIBS, _DCF_NO_XINERAMA {{{

AC_SUBST([XINERAMA_LIBS])
AC_SUBST([_DCF_NO_XINERAMA])

AC_ARG_ENABLE([xinerama],
                          [AS_HELP_STRING([--disable-xinerama],
                                                          [Disable Xinerama support])])

if test "x$enable_xinerama" != xno; then
        AC_CHECK_LIB([Xext],
                                 [XMissingExtension],
                                 [X_LIBS="$X_LIBS -lXext"],
                                 [exit 1],
                                 [$X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS])
        AC_CHECK_LIB([Xinerama],
                                 [XineramaQueryExtension],
                                 [XINERAMA_LIBS="-lXinerama"],
                                 [exit 1],
                                 [$X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS])
else
        _DCF_NO_XINERAMA="-DCF_NO_XINERAMA"
fi

dnl }}}

dnl _DCF_XFREE86_TEXTPROP_BUG_WORKAROUND {{{

AC_SUBST([_DCF_XFREE86_TEXTPROP_BUG_WORKAROUND])

AC_ARG_ENABLE([xfree86-textprop-bug-workaround],
                          [AS_HELP_STRING([--disable-xfree86-textprop-bug-workaround],
                                                          [Disable the XFree86 
textprop bug workaround])])

if test "x$enable_xfree86_textprop_bug_workaround" != xno; then
        _DCF_XFREE86_TEXTPROP_BUG_WORKAROUND="-DCF_XFREE86_TEXTPROP_BUG_WORKAROUND"
fi

dnl }}}

dnl _DCF_DE_USE_XUTF8 {{{

AC_SUBST([_DCF_DE_USE_XUTF8])

AC_ARG_ENABLE([Xutf8],
                          [AS_HELP_STRING([--enable-Xutf8],
                                                          [Use the Xutf8 routines 
(XFree86 extension)
                                                           instead of Xmb routines in 
an UTF-8 locale given
                                                           the -i18n command line 
option])])

if test "x$enable_Xutf8" == xyes; then
        AC_MSG_CHECKING([for Xutf8*])
        save_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS $X_CFLAGS"
        AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <X11/Xlib.h>

int main()
{
#ifdef X_HAVE_UTF8_STRING
        return 0;
#else
        return 1;
#endif
}
                  ]])],
                                  [AC_MSG_RESULT([yes])
                                   _DCF_DE_USE_XUTF8="-DCF_DE_USE_XUTF8"],
                                  [AC_MSG_RESULT([no])
                                   exit 1])
        CFLAGS="$save_CFLAGS"
fi

dnl }}}

dnl LIBTOOL, LTDL_INCLUDES, LTDL_LIBS {{{

AC_SUBST([LTDL_INCLUDES])
AC_SUBST([LTDL_LIBS])

AC_ARG_WITH([libtool],
                        [AS_HELP_STRING([--with-libtool=DIR],
                                                        [Libtool files are in DIR])])

if test "x$with_libtool" != x; then
        LTDL_INCLUDES="-I$with_libtool/include"
        LTDL_LIBS="-L$with_libtool/lib"
        libtool_path="$with_libtool/bin"
else
        libtool_path="$PATH"
fi
AC_PATH_PROG([LIBTOOL], [libtool], [], [$libtool_path])
test "x$LIBTOOL" == x && exit 1
AC_MSG_CHECKING([for libtool version >= 1.4.3])
libtool_version=$(libtool --version | cut -d' ' -f4)
case $libtool_version in
0.* | 1.0.* | 1.1.* | 1.2.* | 1.3.* | 1.4.0 | 1.4.1 | 1.4.2)
        AC_MSG_RESULT([no (found $libtool_version)])
        exit 1
        ;;
*)
        AC_MSG_RESULT([yes (found $libtool_version)])
        ;;
esac

AC_CHECK_HEADER([ltdl.h], [], [exit 1], [$LDTL_INCLUDES])
AC_CHECK_LIB([ltdl], [lt_dlinit], [LTDL_LIBS="-lltdl"], [exit 1], [$LTDL_LIBS])

dnl }}}

dnl PRELOAD_MODULES {{{

AC_SUBST(PRELOAD_MODULES)

AC_ARG_ENABLE([shared],
                          [AS_HELP_STRING([--disable-shared],
                                                          [Do not dynamically load 
modules (preload modules
                                                           instead)])])

if test "x$enable_shared" == xno; then
        PRELOAD_MODULES="1"
fi

dnl }}}

dnl LUA, LUAC, LUA_INCLUDES, LUA_LIBS {{{

AC_SUBST([LUA_INCLUDES])
AC_SUBST([LUA_LIBS])

dnl Arguments {{{
AC_ARG_WITH([lua],
                        [AS_HELP_STRING([--with-lua=ARG],
                                                        [Lua configuration (use 
debian50 for Lua 5.0 on
                                                         Debian)])])
AC_ARG_WITH([lua-prefix],
                        [AS_HELP_STRING([--with-lua-prefix=DIR],
                                                        [Lua files are in DIR])])
AC_ARG_WITH([lua-includes],
                        [AS_HELP_STRING([--with-lua-includes=DIR],
                                                        [Lua include files are in 
DIR])])
AC_ARG_WITH([lua-libraries],
                        [AS_HELP_STRING([--with-lua-libraries=DIR],
                                                        [Lua library files are in 
DIR])])
AC_ARG_WITH([lua-suffix],
                        [AS_HELP_STRING([--with-lua-suffix=ARG],
                                                        [Lua binary and library files 
are suffixed with
                                                         ARG])])
dnl }}}

dnl with_lua {{{
case $with_lua in
debian50)
        test "x$with_lua_prefix" == x && \
                with_lua_prefix=/usr
        test "x$with_lua_includes" == x && \
                with_lua_includes=$with_lua_prefix/include/lua50
        test "x$with_lua_libraries" == x && \
                with_lua_libraries=$with_lua_prefix/lib
        test "x$with_lua_suffix" == x && \
                with_lua_suffix=50
        ;;
?*)
        AC_MSG_ERROR([unknown lua configuration $with_lua])
        ;;
esac
dnl }}}

dnl LUA {{{
if test "x$with_lua_prefix" == x; then
        lua_search_path="$PATH"
else
        lua_search_path="$with_lua_prefix/bin"
fi
AC_PATH_PROG([LUA], [lua$with_lua_suffix], [], [$lua_search_path])
test "x$LUA" == x && exit 1
AC_MSG_CHECKING([for lua version >= 5.0])
lua_version=$($LUA -v 2>&1 >/dev/null | cut -d' ' -f2)
case $lua_version in
0.* | 1.* | 2.* | 3.* | 4.*)
        AC_MSG_RESULT([no (found $lua_version)])
        exit 1
        ;;
*)
        AC_MSG_RESULT([yes (found $lua_version)])
        ;;
esac
if test "x$lua_version" == "x5.0"; then
        AC_MSG_NOTICE([lua version 5.0 is buggy, consider upgrading to 5.0.1])
        AC_MSG_NOTICE([see http://lua-users.org/lists/lua-l/2003-10/msg00039.html])
fi
dnl }}}

dnl LUAC {{{
AC_PATH_PROG([LUAC], [luac$with_lua_suffix], [], [$lua_search_path])
test "x$LUAC" == x && exit 1
dnl }}}

dnl LUA_INCLUDES {{{
if test "x$with_lua_includes" != x; then
        LUA_INCLUDES="-I$with_lua_includes"
elif test "x$with_lua" != x; then
        LUA_INCLUDES="-I$with_lua_prefix/include"
fi
AC_CHECK_HEADERS([lua.h lualib.h], [], [exit 1], [$LUA_INCLUDES])
dnl }}}

dnl LUA_LIBS {{{
if test "x$with_lua_libraries" != x; then
        LUA_LIBS="-L$with_lua_libraries -R$with_lua_libraries"
elif test "x$with_lua" != x; then
        LUA_LIBS="-L$with_lua_prefix/lib -R$with_lua_prefix/lib"
fi
AC_CHECK_LIB([lua$with_lua_suffix],
                 [lua_open],
                 [LUA_LIBS="$LUA_LIBS -llua$with_lua_suffix"],
                 [exit 1],
                 [$LUA_LIBS])
AC_CHECK_LIB([lualib$with_lua_suffix],
                 [luaopen_loadlib],
                 [LUA_LIBS="$LUA_LIBS -llualib$with_lua_suffix"],
                 [exit 1],
                 [$LUA_LIBS -lm])
dnl }}}

dnl }}}

dnl HAS_SYSTEM_ASPRINTF {{{

AC_SUBST([HAS_SYSTEM_ASPRINTF])

AC_CHECK_FUNC([asprintf],
                          [AC_CHECK_FUNC([vasprintf],
                                                         [HAS_SYSTEM_ASPRINTF="1"])])

dnl }}}

dnl XOPEN_SOURCE {{{

AC_SUBST([XOPEN_SOURCE])

AC_MSG_CHECKING([for $CC option to accept X/Open C])
case $host in
*-*-solaris* | *-*-sunos*)
        XOPEN_SOURCE="-ansi -D__EXTENSIONS__"
        ;;
*)
        XOPEN_SOURCE="-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"
        ;;
esac
AC_MSG_RESULT([$XOPEN_SOURCE])

dnl }}}

dnl C99_SOURCE {{{

AC_SUBST([C99_SOURCE])

dnl check for va_copy {{{

AC_MSG_CHECKING([for va_copy])
AC_RUN_IFELSE([AC_LANG_SOURCE([[

#include <stdarg.h>
#include <stdlib.h>

void f(void *last, ...)
{
        va_list ap, aq;
        va_start(ap, last);
        va_copy(aq, ap);
        va_end(ap);
        exit(va_arg(aq, int));
}

int main()
{
        f(NULL, 0);
        return 1;
}

                                  ]])],
                                  [AC_MSG_RESULT([yes])
                                   C99_SOURCE="-std=c99 -DCF_HAS_VA_COPY"],
                                  [AC_MSG_RESULT([no])])

dnl }}}

dnl check whether -ansi breaks va_copy {{{

if test "x{$XOPEN_SOURCE/-ansi /}" != "x$XOPEN_SOURCE"; then
        AC_MSG_CHECKING([whether -ansi breaks va_copy])
        save_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS -ansi"
        AC_LINK_IFELSE([AC_LANG_SOURCE([[

#include <stdarg.h>

void f(void *last, ...)
{
        va_list ap, aq;
        va_start(ap, last);
        va_copy(aq, ap);
        va_end(ap);
        va_end(aq);
}

int main()
{
        f(NULL);
        return 0;
}

                                          ]])],
                                          [AC_MSG_RESULT([no])],
                                          [AC_MSG_RESULT([yes])
                                           XOPEN_SOURCE="${XOPEN_SOURCE/-ansi /}"])
        CFLAGS="$save_CFLAGS"
fi
dnl }}}

dnl }}}

AC_OUTPUT([system-ac.mk])

dnl vim: foldmethod=marker tabstop=4 shiftwidth=4
#!/bin/sh
#
# install - install a program, script, or datafile
#
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.  It can only install one file at a time, a restriction
# shared with many OS's install programs.


# set DOITPROG to echo to test this script

# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"


# put in absolute paths if you don't have them in your path; or use env. vars.

mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"

transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""

while [ x"$1" != x ]; do
    case $1 in
        -c) instcmd=$cpprog
            shift
            continue;;

        -d) dir_arg=true
            shift
            continue;;

        -m) chmodcmd="$chmodprog $2"
            shift
            shift
            continue;;

        -o) chowncmd="$chownprog $2"
            shift
            shift
            continue;;

        -g) chgrpcmd="$chgrpprog $2"
            shift
            shift
            continue;;

        -s) stripcmd=$stripprog
            shift
            continue;;

        -t=*) transformarg=`echo $1 | sed 's/-t=//'`
            shift
            continue;;

        -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
            shift
            continue;;

        *)  if [ x"$src" = x ]
            then
                src=$1
            else
                # this colon is to work around a 386BSD /bin/sh bug
                :
                dst=$1
            fi
            shift
            continue;;
    esac
done

if [ x"$src" = x ]
then
        echo "$0: no input file specified" >&2
        exit 1
else
        :
fi

if [ x"$dir_arg" != x ]; then
        dst=$src
        src=""

        if [ -d "$dst" ]; then
                instcmd=:
                chmodcmd=""
        else
                instcmd=$mkdirprog
        fi
else

# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.

        if [ -f "$src" ] || [ -d "$src" ]
        then
                :
        else
                echo "$0: $src does not exist" >&2
                exit 1
        fi

        if [ x"$dst" = x ]
        then
                echo "$0: no destination specified" >&2
                exit 1
        else
                :
        fi

# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic

        if [ -d "$dst" ]
        then
                dst=$dst/`basename "$src"`
        else
                :
        fi
fi

## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`

# Make sure that the destination directory exists.
#  this part is taken from Noah Friedman's mkinstalldirs script

# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
        '
IFS="${IFS-$defaultIFS}"

oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@[EMAIL PROTECTED]' -e '[EMAIL PROTECTED]@/@'`
IFS=$oIFS

pathcomp=''

while [ $# -ne 0 ] ; do
        pathcomp=$pathcomp$1
        shift

        if [ ! -d "$pathcomp" ] ;
        then
                $mkdirprog "$pathcomp"
        else
                :
        fi

        pathcomp=$pathcomp/
done
fi

if [ x"$dir_arg" != x ]
then
        $doit $instcmd "$dst" &&

        if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
        if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
        if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
        if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else

# If we're going to rename the final executable, determine the name now.

        if [ x"$transformarg" = x ]
        then
                dstfile=`basename "$dst"`
        else
                dstfile=`basename "$dst" $transformbasename |
                        sed $transformarg`$transformbasename
        fi

# don't allow the sed command to completely eliminate the filename

        if [ x"$dstfile" = x ]
        then
                dstfile=`basename "$dst"`
        else
                :
        fi

# Make a couple of temp file names in the proper directory.

        dsttmp=$dstdir/_inst.$$_
        rmtmp=$dstdir/_rm.$$_

# Trap to clean up temp files at exit.

        trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
        trap '(exit $?); exit' 1 2 13 15

# Move or copy the file name to the temp name

        $doit $instcmd "$src" "$dsttmp" &&

# and set any options; do chmod last to preserve setuid bits

# If any of these fail, we abort the whole thing.  If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.

        if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
        if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
        if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
        if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&

# Now remove or move aside any old file at destination location.  We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons.  In this case, the final cleanup
# might fail but the new file should still install successfully.

{
        if [ -f "$dstdir/$dstfile" ]
        then
                $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
                $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
                {
                  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
                  (exit 1); exit
                }
        else
                :
        fi
} &&

# Now rename the file to the real destination.

        $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"

fi &&

# The final little trick to "correctly" pass the exit status to the exit trap.

{
        (exit 0); exit
}

Reply via email to