~ubuntu-branches/ubuntu/utopic/texlive-bin/utopic

« back to all changes in this revision

Viewing changes to texk/dvipdfmx/dvipdfmx-20110311/configure.in

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-05-07 10:47:49 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20120507104749-p00ot5sajjbkp1hp
Tags: 2011.20120507-1
* new upstream checkout: uptex 1.10
* drop patches for config file inclusion in (x)dvipdfmx, included upstream
* add man page for etex
* include pmpost patches and build it
* adapt/unfuzzify patches for current sources
* disable mtx building, we have prepmx package in Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl Process this file with autoconf to produce a configure script.
2
 
AC_INIT(src/dvipdfmx.c)
3
 
AM_INIT_AUTOMAKE(dvipdfmx, 20110311)
4
 
AM_CONFIG_HEADER(config.h)
5
 
AM_MAINTAINER_MODE
6
 
 
7
 
dnl Checks for programs.
8
 
AC_PROG_CC
9
 
AM_PROG_CC_C_O
10
 
AM_PROG_CC_C_O
11
 
AC_PROG_INSTALL
12
 
AC_PROG_LN_S
13
 
AC_PROG_MAKE_SET
14
 
 
15
 
AC_SYS_LARGEFILE
16
 
AC_FUNC_FSEEKO
17
 
 
18
 
# Building inside teTeX or TeX Live?
19
 
AC_ARG_ENABLE(tetex-build, [  --enable-tetex-build    build as part of a teTeX installation])
20
 
 
21
 
 
22
 
dnl Check for kpathsea library. (required)
23
 
if test "x$enable_tetex_build" = xyes; then
24
 
  # In teTeX and TeX Live, LDFLAGS is passed by texk/Makefile and
25
 
  # reserved for the user.  Therefore we need another variable for the
26
 
  # loader flags to find the local kpathsea.  We use dvipdfmx_LDFLAGS
27
 
  # since Automake already sets that up in the link command.
28
 
  dvipdfmx_LDFLAGS=
29
 
  AC_SUBST(dvipdfmx_LDFLAGS)
30
 
 
31
 
  if test ! -d $srcdir/../../texk/kpathsea; then
32
 
    AC_MSG_ERROR([
33
 
=========================================
34
 
 
35
 
You specified --enable-tetex-build, but I can't find the kpathsea
36
 
directory.  I expected it to be in $srcdir/../../texk/kpathsea.
37
 
 
38
 
=========================================])
39
 
  fi
40
 
  CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/../../texk -I\$(top_srcdir)/../../texk"
41
 
  dvipdfmx_LDFLAGS="-L\$(top_builddir)/../../texk/kpathsea/.libs"
42
 
 
43
 
  AM_CONDITIONAL(TDS_VERSION_11, true)
44
 
  AC_DEFINE([__TDS_VERSION__], 0x200406L)
45
 
else
46
 
  dnl Don't bother going further if we don't have kpse installed.
47
 
  AC_ARG_WITH(kpathsea,
48
 
  [  --with-kpathsea=DIR     use kpathsea include/library files from DIR], [
49
 
    if test -d "$withval"; then
50
 
      CPPFLAGS="$CPPFLAGS -I$withval/include"
51
 
      LDFLAGS="$LDFLAGS -L$withval/lib"
52
 
    fi
53
 
  ], [
54
 
    if test -d "$prefix"; then
55
 
      CPPFLAGS="$CPPFLAGS -I$prefix/include"
56
 
      LDFLAGS="$LDFLAGS -L$prefix/lib"
57
 
    else
58
 
      CPPFLAGS="$CPPFLAGS -I$ac_default_prefix/include"
59
 
      LDFLAGS="$LDFLAGS -L$ac_default_prefix/lib"
60
 
    fi
61
 
  ])
62
 
 
63
 
  AC_CHECK_LIB(kpathsea, kpse_find_file, [LIBS="-lkpathsea $LIBS"],
64
 
    AC_MSG_ERROR([kpathsea library not found
65
 
This version of dvipdfmx requires the kpathsea library and its headers. If
66
 
you know where it is you might try setting the LDFLAGS environment variable
67
 
with -L pointing to the directory containing libkpathsea.a.
68
 
    ])
69
 
  )
70
 
 
71
 
  dnl Check kpathsea support for required formats and funcs.
72
 
  CHO_CHECK_KPSE_SUPPORT([dvipdfmx])
73
 
 
74
 
  dnl Check for TDS version kpathsea library supports.
75
 
  CHO_CHECK_KPSE_TDS_VERSION
76
 
fi
77
 
 
78
 
 
79
 
dnl Checks for header files.
80
 
AC_HEADER_STDC
81
 
AC_CHECK_HEADERS(unistd.h)
82
 
AC_CHECK_HEADERS(stdint.h inttypes.h sys/types.h sys/wait.h)
83
 
 
84
 
dnl Checks for library functions.
85
 
AC_FUNC_MEMCMP
86
 
AC_CHECK_FUNCS(open close getenv mkstemp basename)
87
 
 
88
 
dnl Checks for typedefs, structures, and compiler characteristics.
89
 
MAW_EXT_TIMEZONE
90
 
MAW_TZ_HAS_TM_GMTOFF
91
 
 
92
 
AC_C_CONST
93
 
AC_C_INLINE
94
 
AC_TYPE_SIZE_T
95
 
AC_STRUCT_TM
96
 
AC_STRUCT_TIMEZONE
97
 
AC_C_BIGENDIAN
98
 
AC_TYPE_UINT32_T
99
 
 
100
 
AC_CHECK_SIZEOF(char)
101
 
AC_CHECK_SIZEOF(short)
102
 
AC_CHECK_SIZEOF(int)
103
 
AC_CHECK_SIZEOF(long)
104
 
 
105
 
 
106
 
dnl Check for additional libraries.
107
 
if test "x$enable_tetex_build" = xyes; then
108
 
  # Get these common libraries from the sources, too.
109
 
  # Seems like it would be simpler to treat kpathsea this way too, but
110
 
  # we're just starting from what lcdf-typetools did.
111
 
  sinclude(../../libs/zlib/withenable.ac)
112
 
  sinclude(../../libs/zlib/zlib.ac)
113
 
 
114
 
  sinclude(../../libs/libpng/withenable.ac)
115
 
  sinclude(../../libs/libpng/libpng.ac)
116
 
 
117
 
  # yes, we have zlib and png.
118
 
  AC_DEFINE(HAVE_ZLIB)
119
 
  AC_DEFINE(HAVE_LIBPNG)
120
 
 
121
 
  # You must define HAVE_ZLIB_COMPRESS2 to enable '-z' option for controlling
122
 
  # zlib compression level, but zlib.ac included above does not do this test.
123
 
  # We assume zlib always has compress2() here although that's not always true.
124
 
  AC_DEFINE([HAVE_ZLIB_COMPRESS2], 1)
125
 
 
126
 
  # tetex/tex live build; this always has kpathsea, xbasename, etc.,
127
 
  # as we're building from current sources.  Do this stuff at the end so
128
 
  # other configure tests don't try to link with kpathsea (which doesn't
129
 
  # exist at configure time).
130
 
  LIBS="-lkpathsea -lm $LIBS"
131
 
  AC_MSG_NOTICE([tetex build enabled, LIBS now: $LIBS])
132
 
else
133
 
  CHO_HAS_LIBPAPER
134
 
  CHO_HAS_ZLIB
135
 
  CHO_HAS_LIBPNG
136
 
 
137
 
dnl these variables are defined in the tetex case and used in src/Makefile.am.
138
 
dnl just let them be empty.
139
 
  AC_SUBST(LIBPNGCPPFLAGS)
140
 
  AC_SUBST(LDLIBPNG)
141
 
  AC_SUBST(LIBPNGDEP)
142
 
  AC_SUBST(ZLIBCPPFLAGS)
143
 
  AC_SUBST(LDZLIB)
144
 
  AC_SUBST(ZLIBDEP)
145
 
  AC_SUBST(dvipdfmx_LDFLAGS)
146
 
fi
147
 
 
148
 
AC_CONFIG_FILES([Makefile data/Makefile man/Makefile src/Makefile])
149
 
AC_OUTPUT
150