www.pudn.com > sswf-1.7.4-src.zip > configure.ac


dnl
dnl configure.ac used to generate the configure script which
dnl in turns is used to generate the Makefile scripts
dnl Written by Jacek Naglak
dnl
dnl Copyright (c) 2004-2006 Made to Order Software, Ltd.
dnl
dnl Permission is hereby granted, free of charge, to any
dnl person obtaining a copy of this software and
dnl associated documentation files (the "Software"), to
dnl deal in the Software without restriction, including
dnl without limitation the rights to use, copy, modify,
dnl merge, publish, distribute, sublicense, and/or sell
dnl copies of the Software, and to permit persons to whom
dnl the Software is furnished to do so, subject to the
dnl following conditions:
dnl
dnl The above copyright notice and this permission notice
dnl shall be included in all copies or substantial
dnl portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
dnl ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
dnl LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
dnl FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
dnl EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
dnl LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
dnl WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE
dnl SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
dnl SOFTWARE.
dnl

AC_INIT([ScriptSWF],[1.7.4],[alexis@m2osw.com],[sswf])
AC_SUBST(PACKAGE_VERSION)

dnl a few things didn't work with my older version...
dnl you can try with your current version by commenting
dnl out the following line (it is safe)
AC_PREREQ(2.57)

dnl Copyright notice of the SSWF package
AC_COPYRIGHT([Copyright (c) 2002-2006 Made to Order Software, Ltd.

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 AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.])

dnl foreign option because sswf is not a gnu package
AM_INIT_AUTOMAKE([foreign])

dnl specify the supported languages
ALL_LINGUAS="en"

dnl check for programs
AC_PROG_CC
AC_PROG_CXX
AC_PROG_MAKE_SET
AC_PROG_YACC
dnl AC_PROG_RANLIB -- libtool takes care of that
AC_PROG_LIBTOOL

dnl check for headers
AC_HAVE_HEADERS(string.h stdarg.h stdio.h stdlib.h limits.h errno.h zlib.h math.h ctype.h iconv.h)

dnl check for the ICONV library
dnl Note that some systems have libiconv instead of just iconv
dnl and also some have it directly in the C library!
ICONV_LIBS=""
AC_SUBST(ICONV_LIBS)
AC_CHECK_LIB(iconv, libiconv_open, ICONV_LIBS="-liconv",
	[AC_CHECK_LIB(iconv, iconv_open, ICONV_LIBS="-liconv",
		[AC_CHECK_LIB(c, iconv_open, ICONV_LIBS="",
			[AC_MSG_ERROR([cannot find libiconv])])])])


dnl check for the JPEG library
JPEG_LIBS=""
AC_SUBST(JPEG_LIBS)
AC_CHECK_HEADER([jpeglib.h],[],[AC_MSG_ERROR([cannot find libjpeg headers])])
AC_CHECK_LIB(jpeg, jpeg_start_decompress,JPEG_LIBS="-ljpeg",
           [AC_MSG_ERROR([cannot find libjpeg])])

dnl check for the Z library
ZLIB_LIBS=""
AC_SUBST(ZLIB_LIBS)
AC_CHECK_HEADER([zlib.h],[],[AC_MSG_ERROR([cannot find zlib headers])])
AC_CHECK_LIB(z,compress,ZLIB_LIBS="-lz",
           [AC_MSG_ERROR([cannot find libzlib])])

dnl check for wcsncasecmp (not available on Mac OS/X 10.3 -- but I actually don't need it!)
dnl AC_CHECK_FUNC(wcsncasecmp, AC_DEFINE(HAS_WCSNCASECMP, 1), AC_DEFINE(HAS_WCSNCASECMP, 0))

dnl check for the FREETYPE (version 2) library
FREETYPE_LIBS=""
FREETYPE_CFLAGS=""
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
if test "x$FREETYPE_CONFIG" != "xno" ; then
  AC_MSG_CHECKING([for freetype libraries])
  FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
  FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
  AC_MSG_RESULT($FREETYPE_LIBS)
fi
AM_CONDITIONAL(HAVE_FREETYPE, test "x$FREETYPE_CONFIG" != "xno")


AC_ARG_ENABLE(notes-to-html,
  AC_HELP_STRING([--enable-notes-to-html],[creates the notes-to-html tool (default is disabled)]),
[case "$enable_notes_to_html" in
yes) notes_to_html=true ;;
no) notes_to_html=false ;;
*) AC_MSG_ERROR([bad value $enable_notes_to_html for --enable-notes-to-html]) ;;
esac],
[notes_to_html=false])
AM_CONDITIONAL(BUILD_NOTES_TO_HTML, $notes_to_html)


AC_ARG_ENABLE(docs,
  AC_HELP_STRING([--enable-docs],[install documentations (default is enabled if docs package installed along source code)]),
[case "$enable_docs" in
yes) install_sswf_docs=true ;;
no) install_sswf_docs=false ;;
*) AC_MSG_ERROR([bad value $enable_docs for --enable-docs]) ;;
esac],
[install_sswf_docs=true])
AM_CONDITIONAL(INSTALL_SSWF_DOCS, test -d $srcdir/doc/html && $install_sswf_docs)


AC_ARG_ENABLE(rpm_docs,
  AC_HELP_STRING([--enable-rpm-docs],[avoid installing the HTML from the Makefile, it is done in the RPM specification file]),
[case "$enable_rpm_docs" in
yes) rpm_docs=false ;;
no) rpm_docs=true ;;
*) AC_MSG_ERROR([bad value $enable_rpm_docs for --enable-rpm-docs]) ;;
esac],
[rpm_docs=true])
AM_CONDITIONAL(NOT_RPM_DOCS, $rpm_docs)


AC_ARG_ENABLE(debug,
  AC_HELP_STRING([--enable-debug],[enable debug (default is enabled)]),
[if test "x$enable_debug" = "xyes"; then
  AC_DEFINE(DEBUG)
fi],
[AC_DEFINE(DEBUG)])


AC_ARG_ENABLE(yydebug,
  AC_HELP_STRING([--enable-yydebug],[enable yydebug (default is enabled)]),
[if test "x$enable_yydebug" = "xyes"; then
  AC_DEFINE(YYDEBUG)
fi],
[AC_DEFINE(YYDEBUG)])



dnl some dynamic list of files
SAMPLES=`cd $ac_confdir; find samples ! -path '*/CVS/*' -type f -exec echo -n {} " " \\;`
AC_SUBST(SAMPLES)

MISC=`cd $ac_confdir; find misc ! -path '*/CVS/*' -type f -exec echo -n {} " " \\;`
AC_SUBST(MISC)

TXTDOC=`if test -d $ac_confdir/doc; then cd $ac_confdir/doc && find . ! -path '*/CVS/*' -name '*.txt' -exec echo -n {} " " \\;; fi`
AC_SUBST(TXTDOC)

HTMLDOC=`if test -d $ac_confdir/doc/html; then cd $ac_confdir/doc && find html ! -path '*/CVS/*' -type f -exec echo -n {} " " \\;; fi`
AC_SUBST(HTMLDOC)

MANDOC=`if test -d $ac_confdir/doc/man; then cd $ac_confdir/doc && find man ! -path '*/CVS/*' -type f -exec echo -n {} " " \\;; fi`
AC_SUBST(MANDOC)

ASCHEADERS=`if test -d $ac_confdir/include/sswf/scripts/global; then cd $ac_confdir/include/sswf && find scripts ! -path '*/CVS/*' -type f -name '*.asc' -exec echo -n {} " " \\;; fi`
AC_SUBST(ASCHEADERS)



dnl generate makefiles
AC_CONFIG_FILES([
Makefile
doc/Makefile
src/Makefile
src/lib/Makefile
src/libas/Makefile
src/libasas/Makefile
src/misc/Makefile
src/sswf/Makefile
src/tools/Makefile
include/Makefile
include/sswf/Makefile])
AC_OUTPUT