~reviczky/luatex/texlive-bin-git

« back to all changes in this revision

Viewing changes to texk/dvipng/dvipng-1.14/configure.ac

  • Committer: Adam Reviczky
  • Date: 2015-04-26 22:40:47 UTC
  • Revision ID: adam.reviczky@kclalumni.net-20150426224047-i2p26n3wqphupq6z
TeX Live 2015 import (rev. 37052)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# configure.ac
2
 
 
3
 
#************************************************************************
4
 
#
5
 
#  Part of the dvipng distribution
6
 
#
7
 
#  This program is free software: you can redistribute it and/or modify
8
 
#  it under the terms of the GNU Lesser General Public License as
9
 
#  published by the Free Software Foundation, either version 3 of the
10
 
#  License, or (at your option) any later version.
11
 
#
12
 
#  This program is distributed in the hope that it will be useful, but
13
 
#  WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
 
#  Lesser General Public License for more details.
16
 
#
17
 
#  You should have received a copy of the GNU Lesser General Public
18
 
#  License along with this program. If not, see
19
 
#  <http://www.gnu.org/licenses/>.
20
 
#
21
 
#  Copyright (C) 2002-2010 Jan-�ke Larsson
22
 
#
23
 
#************************************************************************
24
 
 
25
 
# Process this file with autoconf to produce a configure script.
26
 
AC_INIT([dvipng], [1.14], [dvipng@nongnu.org])
27
 
AC_CONFIG_SRCDIR([dvipng.c])
28
 
 
29
 
AC_ARG_ENABLE(debug, 
30
 
  AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), 
31
 
    [ if test "$enableval" = yes ; then
32
 
      AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])
33
 
      fi ],     
34
 
    [ enable_debug="yes";
35
 
      AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])])
36
 
AC_ARG_ENABLE(timing, 
37
 
  AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), 
38
 
   [ if test "$enableval" = yes ; then
39
 
     AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.])
40
 
     fi ])
41
 
 
42
 
# Checks for programs.
43
 
AC_SET_MAKE
44
 
AC_PROG_CC
45
 
AC_PROG_INSTALL
46
 
AC_PROG_LN_S
47
 
AC_ARG_WITH(gs,
48
 
  AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), 
49
 
  [if test "x$withval" != xno ; then
50
 
    AC_PATH_PROG(GS,["$withval"])
51
 
    AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.])
52
 
    GS_CHECK_DEVICES
53
 
  fi],
54
 
  [AC_CHECK_PROG(GS,gs,gs)
55
 
  AC_DEFINE_UNQUOTED(GS_PATH, "gs", [Define as the path to GhostScript.])
56
 
  if test -n "$GS"; then
57
 
    GS_CHECK_DEVICES
58
 
  else
59
 
    AC_MSG_WARN([Cannot find GhostScript in your PATH])
60
 
  fi
61
 
])
62
 
 
63
 
# Checks for libraries.
64
 
AC_CHECK_LIB(m, pow)
65
 
AC_CHECK_LIB(z, deflate)
66
 
AC_CHECK_LIB([png], [png_read_image],,
67
 
             [AC_MSG_ERROR([cannot find/use libpng])])
68
 
AC_CHECK_LIB([gd], [gdImageCreate],,
69
 
             [AC_MSG_ERROR([cannot find/use libgd
70
 
This drawing library can be downloaded at http://www.boutell.com/gd])])
71
 
AC_CHECK_LIB([kpathsea], [kpse_set_program_name],, 
72
 
             AC_MSG_ERROR([cannot find/use libkpathsea]))
73
 
AC_CHECK_LIB([t1], [T1_InitLib])
74
 
PSFONTS_O=""
75
 
if test "$ac_cv_lib_t1_T1_InitLib" = yes; then
76
 
  PSFONTS_O="t1.o"
77
 
fi
78
 
AC_SUBST(PSFONTS_O)
79
 
 
80
 
# Checks for header files. 
81
 
AC_HEADER_STDC
82
 
AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h],,
83
 
                 [AC_MSG_ERROR([cannot find/use $ac_header])])
84
 
AC_CHECK_HEADERS([t1lib.h libgen.h])
85
 
AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS"
86
 
        LIBS="$FT2_LIBS $LIBS"
87
 
        PSFONTS_O="$PSFONTS_O sfd.o ft.o"       
88
 
        AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2])
89
 
        ac_have_freetype2="yes"],
90
 
        [ac_have_freetype2="no"])
91
 
if test -n "$PSFONTS_O"; then
92
 
  PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o"
93
 
fi
94
 
AC_HEADER_SYS_WAIT
95
 
AC_HEADER_TIME
96
 
AC_HEADER_STDBOOL
97
 
AC_CHECK_HEADERS([fcntl.h sys/time.h])
98
 
 
99
 
# Checks for typedefs, structures, and compiler characteristics.
100
 
AC_C_CONST
101
 
AC_TYPE_PID_T
102
 
AC_TYPE_SIZE_T
103
 
if test "$ac_cv_header_inttypes_h" = "yes"; then
104
 
  # Sometimes we want to use gcc -ansi -pedantic as a portability test
105
 
  # The typedef of int64_t is not in the system header file in that
106
 
  # case. Then, #define int64_t as "long long", which is non-ansi, but
107
 
  # is present in most modern compilers. Using a #define rather than a
108
 
  # typedef can be a problem, but in dvipng int64_t is only used as
109
 
  # typecast, and there are no problems. autoconf 2.13 equivalent:
110
 
  # AC_CHECK_TYPE(int64_t, long long)
111
 
  # AC_CHECK_TYPE(uint64_t, unsigned long long)
112
 
  AC_CHECK_TYPE([int64_t],,
113
 
                [AC_DEFINE_UNQUOTED([int64_t], [long long],
114
 
                                    [Define to `long long' if
115
 
                                     <inttypes.h> does not define it.])])
116
 
  AC_CHECK_TYPE([uint64_t],,
117
 
                [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long],
118
 
                                    [Define to `unsigned long long' if
119
 
                                     <inttypes.h> does not define it.])])
120
 
fi
121
 
AC_HAS_KPSE_ENC_FORMATS
122
 
 
123
 
 
124
 
# Checks for library functions.
125
 
AC_FUNC_FORK
126
 
AC_FUNC_MALLOC
127
 
AC_FUNC_MMAP
128
 
AC_FUNC_STRTOD
129
 
AC_FUNC_VPRINTF
130
 
AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr])
131
 
if test "$enable_timing" = "yes"; then
132
 
  AC_CHECK_FUNCS([ftime gettimeofday])
133
 
fi
134
 
AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version])
135
 
if test "$ac_cv_func_gdImageGif" = "yes"; then
136
 
   INSTALL_BIN_TARGET="install-dvigif"
137
 
else
138
 
   INSTALL_BIN_TARGET="install-dvipng"
139
 
fi
140
 
AC_SUBST(INSTALL_BIN_TARGET)
141
 
 
142
 
# Documentation-related checks
143
 
AC_PATH_PROG(MAKEINFO, makeinfo, :)
144
 
MAKEINFO_CHECK_MACROS(acronym env option)
145
 
AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin)
146
 
 
147
 
# SELFAUTO
148
 
AC_ARG_ENABLE(selfauto-set, 
149
 
  AC_HELP_STRING([--enable-selfauto-set],
150
 
  [This option will make the final binary explicitly set the
151
 
   $SELFAUTO... variables to make it look as dvipng is installed in the
152
 
   main texmf tree, even if it isn't. This is necessary when texmf.cnf
153
 
   only uses $SELFAUTO... variables and dvipng is not installed in the
154
 
   texmf tree. Otherwise, dvipng may not be able to find virtual
155
 
   fonts, or psfonts.map. To find out, first build the binary and do
156
 
   'make test'. If the test fails, you need this switch.]),
157
 
  [ if test "$enableval" = yes ; then
158
 
      AC_MSG_CHECKING([for \$SELFAUTOLOC])
159
 
      SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC`
160
 
      AC_DEFINE_UNQUOTED(ENV_SELFAUTOLOC,["SELFAUTOLOC=$SELFAUTOLOC"],
161
 
        [The environment setting for $SELFAUTOLOC])
162
 
      AC_MSG_RESULT([$SELFAUTOLOC])
163
 
      AC_MSG_CHECKING([for \$SELFAUTODIR])
164
 
      SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR`
165
 
      AC_DEFINE_UNQUOTED(ENV_SELFAUTODIR,["SELFAUTODIR=$SELFAUTODIR"],
166
 
        [The environment setting for $SELFAUTODIR])
167
 
      AC_MSG_RESULT([$SELFAUTODIR])
168
 
      AC_MSG_CHECKING([for \$SELFAUTOPARENT])
169
 
      SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT`
170
 
      AC_DEFINE_UNQUOTED(ENV_SELFAUTOPARENT,["SELFAUTOPARENT=$SELFAUTOPARENT"],
171
 
        [The environment setting for $SELFAUTOPARENT])
172
 
      AC_MSG_RESULT([$SELFAUTOPARENT])
173
 
    fi ],
174
 
  [AC_MSG_CHECKING([for texmf.cnf])
175
 
  TEXMF_CNF=`kpsewhich texmf.cnf`
176
 
  AC_MSG_RESULT([$TEXMF_CNF])
177
 
  AC_PATH_PROG(KPSEWHICH, kpsewhich)
178
 
  AC_MSG_CHECKING([for psfonts.map])
179
 
  cp $KPSEWHICH .
180
 
  PSFONTS_MAP=`./kpsewhich psfonts.map`
181
 
  rm -f ./kpsewhich
182
 
  if test -n "$PSFONTS_MAP"; then
183
 
    AC_MSG_RESULT([$PSFONTS_MAP])
184
 
  else
185
 
    AC_MSG_RESULT([not found from outside the texmf tree])
186
 
    AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf])
187
 
    if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then
188
 
      AC_MSG_RESULT([yes
189
 
***************************************************************
190
 
texmf.cnf is using \$SELFAUTO... variables. If you are going to
191
 
install dvipng outside the texmf tree, you may need to use
192
 
--enable-selfauto-set. To find out, do 'make ; make test'. If the test
193
 
is unsuccessful, add the mentioned switch and rebuild.
194
 
***************************************************************])
195
 
    else
196
 
      AC_MSG_RESULT([no])
197
 
    fi
198
 
  fi])
199
 
 
200
 
AC_MSG_RESULT([
201
 
** Configuration summary for $PACKAGE_STRING:
202
 
 
203
 
   The -d (debug) switch is enabled:        $enable_debug
204
 
   Your gd is new enough (>=2.0) to enable
205
 
     the --truecolor switch, full alpha 
206
 
     transparency, proper rescaling of 
207
 
     included bitmaps, and jpeg inclusion:  $ac_cv_func_gdImageCreateTrueColor
208
 
   Your gd has jpeg inclusion enabled:      $ac_cv_func_gdImageCreateFromJpeg
209
 
   Your gd is new enough (>=2.0.12) to 
210
 
     enable transparent backgrounds for EPS
211
 
     inclusion and the -z (compression)
212
 
     switch:                                $ac_cv_func_gdImagePngEx
213
 
   Your gd is new enough (>=2.0.21) to
214
 
     allow image creation from memory       $ac_cv_func_gdImageCreateFromPngPtr
215
 
   Your gd is new enough (>=2.0.28) to
216
 
     enable gif inclusion and output 
217
 
     (dvigif):                              $ac_cv_func_gdImageGif
218
 
   FreeType font rendering available:       $ac_have_freetype2
219
 
   Support for subfonts (CJK-LaTeX):        $ac_have_freetype2
220
 
   T1lib font rendering available:          $ac_cv_lib_t1_T1_InitLib
221
 
])
222
 
 
223
 
AC_CONFIG_HEADER([config.h])
224
 
AC_CONFIG_FILES([Makefile])
225
 
AC_OUTPUT