summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipng/configure.ac.demo
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipng/configure.ac.demo')
-rw-r--r--Build/source/texk/dvipng/configure.ac.demo174
1 files changed, 174 insertions, 0 deletions
diff --git a/Build/source/texk/dvipng/configure.ac.demo b/Build/source/texk/dvipng/configure.ac.demo
new file mode 100644
index 00000000000..952d52a3c03
--- /dev/null
+++ b/Build/source/texk/dvipng/configure.ac.demo
@@ -0,0 +1,174 @@
+# -*- Autoconf -*-
+# configure.ac
+# Process this file with autoconf to produce a configure script.
+
+#************************************************************************
+#
+# Part of the dvipng distribution
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+# Copyright (C) 2002-2006 Jan-Åke Larsson
+#
+#************************************************************************
+
+AC_PREREQ(2.60)
+AC_INIT([dvipng-demo], [1.9], [dvipng@nongnu.org])
+AC_CONFIG_AUX_DIR([cf])
+AC_CONFIG_SRCDIR([dvipng.c])
+AC_CONFIG_HEADERS([config.h])
+
+AM_INIT_AUTOMAKE[]dnl using automake
+
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]),
+ [ if test "$enableval" = yes ; then
+ AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])
+ fi ],
+ [ enable_debug="yes";
+ AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])])
+AC_ARG_ENABLE(timing,
+ AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]),
+ [ if test "$enableval" = yes ; then
+ AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.])
+ fi ])
+
+# Checks for programs.
+AC_SET_MAKE
+AC_PROG_CC
+AC_PROG_INSTALL
+
+AC_PROG_LIBTOOL[]dnl using libtool to link executables
+
+AC_ARG_WITH(gs,
+ AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]),
+ [if test "x$withval" = xno ; then
+ GS=no
+ else
+ AC_PATH_PROG(GS,["$withval"])
+ fi],
+ [AC_CHECK_PROG(GS,gs,gs)
+ if test -z "$GS"; then
+ GS="gs"
+ AC_MSG_WARN([Cannot find GhostScript in your PATH])
+ fi
+])
+AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.])
+GS_WARN=""
+xx_GS_HAS_DEVICE(pngalpha,
+ [GS_WARN="Your EPS inclusions will be cropped to the
+ boundingbox, and rendered on an opaque background.
+ Upgrade GhostScript to avoid this."
+ xx_GS_HAS_DEVICE(png16m,
+ [GS_WARN="Your EPS inclusions may not work.
+ Upgrade/install GhostScript to avoid this."])])
+if test -n "$GS_WARN"; then
+ AC_MSG_WARN([$GS_WARN])
+fi
+
+# Checks for libraries and header files.
+AC_SEARCH_LIBS([pow], [m])
+AC_SEARCH_LIBS([basename], [gen])
+
+KPSE_INIT([dvipng])[]dnl initialize kpathsea.m4
+ENABLE_TETEX_BUILD[]dnl Kpathsea is required
+KPSE_CHECK_ZLIB[]dnl Zlib is required (sorry, Libpng requires Zlib)
+KPSE_CHECK_LIBPNG[]dnl Libpng is required
+dnl KPSE_CHECK_FREETYPE2[]dnl Freetype2 is required
+KPSE_WITH_FREETYPE2[]dnl Freetype2 is optional
+KPSE_CHECK_GD[]dnl Gd is required
+KPSE_WITH_T1LIB[]dnl T1lib is optional
+
+AM_CONDITIONAL([USE_T1], [test "$have_t1lib" = yes])
+AM_CONDITIONAL([USE_FT2], [test "$have_freetype2" = yes])
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_HEADER_TIME
+AC_HEADER_STDBOOL
+AC_CHECK_HEADERS([fcntl.h sys/time.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+if test "$ac_cv_header_inttypes_h" = "yes"; then
+ # Sometimes we want to use gcc -ansi -pedantic as a portability test
+ # The typedef of int64_t is not in the system header file in that
+ # case. Then, #define int64_t as "long long", which is non-ansi, but
+ # is present in most modern compilers. Using a #define rather than a
+ # typedef can be a problem, but in dvipng int64_t is only used as
+ # typecast, and there are no problems. autoconf 2.13 equivalent:
+ # AC_CHECK_TYPE(int64_t, long long)
+ # AC_CHECK_TYPE(uint64_t, unsigned long long)
+ AC_CHECK_TYPE([int64_t],,
+ [AC_DEFINE_UNQUOTED([int64_t], [long long],
+ [Define to `long long' if
+ <inttypes.h> does not define it.])])
+ AC_CHECK_TYPE([uint64_t],,
+ [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long],
+ [Define to `unsigned long long' if
+ <inttypes.h> does not define it.])])
+fi
+
+
+# Checks for library functions.
+AC_FUNC_ALLOCA
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_MMAP
+AC_FUNC_STRTOD
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr])
+if test "$enable_timing" = "yes"; then
+ AC_CHECK_FUNCS([ftime gettimeofday])
+fi
+KPSE_CHECK_FUNCS([gdImageCreateTrueColor gdImagePngEx gdImageGif gdImageJpeg FT_Library_Version])
+AM_CONDITIONAL([WITH_DVIGIF], [test "$ac_cv_func_gdImageGif" = yes])
+
+# Documentation-related checks
+AC_PATH_PROG(MAKEINFO, makeinfo, :)
+MAKEINFO_CHECK_MACROS(acronym env option)
+AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin)
+
+KPSE_SELFAUTO[]dnl handle SELFAUTO variables.
+AC_SUBST([TEXMFMAIN])
+AC_SUBST([enable_selfauto_set])
+
+AC_MSG_RESULT([
+** Configuration summary for $PACKAGE_STRING:
+
+ The -d (debug) switch is enabled: $enable_debug
+ Your gd is new enough (>=2.0) to enable
+ the --truecolor switch, full alpha
+ transparency, and proper rescaling of
+ included bitmaps: $ac_cv_func_gdImageCreateTrueColor
+ Your gd was built with jpeg inclusion: $ac_cv_func_gdImageJpeg
+ Your gd is new enough (>=2.0.12) to
+ enable transparent backgrounds for EPS
+ inclusion and the -z (compression)
+ switch: $ac_cv_func_gdImagePngEx
+ Your gd is new enough (>=2.0.28) to
+ enable gif inclusion and output
+ (dvigif): $ac_cv_func_gdImageGif
+ FreeType font rendering available: $have_freetype2
+ Support for subfonts (CJK-LaTeX): $have_freetype2
+ T1lib font rendering available: $have_t1lib
+])
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([test_dvipng], [chmod a+x test_dvipng])
+AC_OUTPUT