1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
|
dnl Process with autoconf to generate configure script -*- sh -*-
AC_PREREQ(2.61)
AC_INIT([xforms],[1.0.93sp1],[xforms-development@nongnu.org])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(lib/forms.c)
XFORMS_CHECK_VERSION
AC_CANONICAL_TARGET
AC_CONFIG_HEADERS([lib/config.h])
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
AM_MAINTAINER_MODE
### This defines the version number of the installed .so files
### using libtool's versioning system.
AC_SUBST(SO_VERSION, ["2:0:0"])
# fix the value of the prefixes.
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
### Set the execute permissions of the various scripts correctly
for file in config/install-sh config/mkinstalldirs ; do
chmod 755 ${srcdir}/${file}
done
AC_ARG_ENABLE(bwc_bs_hack, [AS_HELP_STRING([--enable-bwc-bs-hack],[Enable backward compatiblity hack for browser, scrollbar and tabfolder objects])])
AM_CONDITIONAL(USE_BWC_BS_HACK, test x$enable_bwc_bs_hack = xyes)
AC_ARG_ENABLE(demos, [AS_HELP_STRING([--enable-demos],[Build demo programs])])
AM_CONDITIONAL(BUILD_DEMOS, test x$enable_demos = xyes)
AC_ARG_ENABLE(docs, [AS_HELP_STRING([--enable-docs],[Build documentation])])
AM_CONDITIONAL(BUILD_DOCS, test x$enable_docs = xyes)
### Check for programs
XFORMS_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
### check for special systems
AC_ISC_POSIX
AC_AIX
### Check for some Cygwin-specific details.
CHECK_WITH_CYGWIN
# Work around a problem in automake 1.4: when invoking install-strip,
# INSTALL_PROGRAM is changed to 'install -s', and since
# INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0
# which returns an error condition when stripping fails.
INSTALL_SCRIPT='${INSTALL}'
### Setup libtool
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
### Add extra directories to check for libraries.
XFORMS_WITH_DIR([extra-lib],[extra library directory],extra_lib, NONE)
XFORMS_LOOP_DIR($xforms_cv_extra_lib,XFORMS_ADD_LIB_DIR(xforms_ldflags,$dir))
test ! x"$xforms_ldflags" = x && LDFLAGS="$xforms_ldflags $LDFLAGS"
### Add extra directories to check for include files.
XFORMS_WITH_DIR([extra-inc],[extra include directory],extra_inc, NONE)
XFORMS_LOOP_DIR($xforms_cv_extra_inc,XFORMS_ADD_INC_DIR(xforms_cppflags,$dir))
test ! x"$xforms_cppflags" = x && CPPFLAGS="$xforms_cppflags $CPPFLAGS"
### Add both includes and libraries
XFORMS_WITH_DIR([extra-prefix],[extra lib+include directory],extra_prefix, NONE, ${prefix})
XFORMS_LOOP_DIR($xforms_cv_extra_prefix,[
XFORMS_ADD_INC_DIR(CPPFLAGS,$dir/include)
XFORMS_ADD_LIB_DIR(LDFLAGS,$dir/lib)])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST dnl used
AC_TYPE_PID_T
AC_TYPE_SIZE_T
# Checks for libraries.
dnl by testing these we check if it is ok to have
dnl -lc and -lm as args to the compiler
AC_CHECK_LIB(m, sin)
AC_CHECK_LIB(c, fopen)
# Checks for header files.
AC_CHECK_HEADERS([sys/select.h])
# Check whether we want to build the gl code
AC_ARG_ENABLE(gl,
[AS_HELP_STRING([--disable-gl],[Do not build GL support library])])
if test x$enable_gl != xno ; then
AC_CHECK_HEADER([GL/glx.h],, [enable_gl=no])
fi
AM_CONDITIONAL(BUILD_GL, [test x$enable_gl != xno])
dnl we have some code in lib/listdir.c that could use that...
dnl AC_HEADER_DIRENT
# Check for X, XPM and JPEG
AC_PATH_XTRA
XFORMS_PATH_XPM
XFORMS_CHECK_LIB_JPEG
# Checks for library functions.
AC_TYPE_SIGNAL
if test $ac_cv_type_signal = "void" ; then
AC_DEFINE(RETSIGTYPE_IS_VOID, 1, [Define if the return type of signal handlers is void])
fi
AC_CHECK_FUNCS([snprintf strcasecmp strerror usleep nanosleep vsnprintf sigaction])
XFORMS_CHECK_DECL(snprintf, stdio.h)
XFORMS_CHECK_DECL(vsnprintf, stdio.h)
XFORMS_CHECK_DECL(sigaction, signal.h)
### Some information on what just happened
VERSION_INFO="Configuration\n\
Host type: ${host}\n\
Special build flags: ${xforms_flags}\n\
C Compiler: ${CC}\n\
C Compiler flags: ${CFLAGS}\n\
Linker flags: ${LDFLAGS}\n"
### Not used for now.
### AC_SUBST(VERSION_INFO)
AC_SUBST(X_LIBS)
AC_SUBST(X_PRE_LIBS)
## Some config.h stuff
AH_TOP([
/*
* This file is part of the XForms library package.
*
* XForms is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1, or
* (at your option) any later version.
*
* XForms is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with XForms; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
/* \file config.h
*
* This is the compilation configuration file for xforms.
* It was generated by autoconfs configure.
* You might want to change some of the defaults if something goes wrong
* during the compilation.
*/
#ifndef CONFIG_H
#define CONFIG_H
])
AH_BOTTOM([
#endif /* NOT CONFIG_H */
])
### Finish the work.
AC_CONFIG_FILES([Makefile \
xforms.spec \
lib/include/AAA.h \
config/Makefile \
lib/Makefile \
lib/bitmaps/Makefile \
lib/fd/Makefile \
lib/include/Makefile \
lib/private/Makefile \
image/Makefile
gl/Makefile \
fdesign/Makefile \
fdesign/fd/Makefile \
fdesign/fd4test/Makefile \
fdesign/notes/Makefile \
fdesign/spec/Makefile \
fdesign/xpm/Makefile \
fd2ps/Makefile \
fd2ps/test/Makefile \
demos/Makefile \
demos/fd/Makefile \
doc/Makefile
])
AC_OUTPUT
# show version information
echo
printf "$VERSION_INFO"
echo
# Display a final warning if there has been a XFORMS_ERROR
XFORMS_CHECK_ERRORS
|