File: configure.in

package info (click to toggle)
xdvik-ja 22.15-j1.04-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,588 kB
  • ctags: 9,283
  • sloc: ansic: 79,680; sh: 9,526; makefile: 665; sed: 271; awk: 35
file content (198 lines) | stat: -rw-r--r-- 5,866 bytes parent folder | download | duplicates (2)
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(xdvi.c)

AC_CONFIG_HEADER(c-auto.h:c-auto.in)
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S

sinclude(../kpathsea/withenable.ac)

AC_FUNC_VFORK
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_HEADER_SYS_WAIT
AC_TYPE_SIGNAL
AC_C_BIGENDIAN
# Put here by Thomas Esser for teTeX.  This causes some tests to be run
# twice by the kps version.
AC_PATH_XTRA
AC_TYPE_SIZE_T

# XDVI checks by Paul Vojta
XDVI_C_BITMAP_TYPE
XDVI_SYS_STREAMS
XDVI_SYS_SUNOS_4
XDVI_FUNC_POLL

# These were probably missing from the test-set?
# On the other hand, they are not used already, why start now? -janl
# AC_TYPE_OFF_T
# AC_HEADER_TIME

# <sys/bsdtypes.h> is for ISC 4.0, to define fd_set in psgs.c.
AC_CHECK_FUNCS(memcpy strerror waitpid sigaction strchr tempnam setenv atexit on_exit)
AC_CHECK_HEADERS(netdb.h sys/bsdtypes.h X11/Xosdefs.h)

# For the bitmap size. -- I think this is in XDVI_C_BITMAP_TYPE now -janl
# AC_CHECK_SIZEOF(long)

sinclude(../kpathsea/xt.ac)
sinclude(withenable.ac)
sinclude(../../libs/libwww/withenable.ac)
sinclude(../../libs/libwww/libwww.ac)
sinclude(../../libs/zlib/withenable.ac)
sinclude(../../libs/zlib/zlib.ac)

# For --with-x-toolkit.  Only distinguish `no' from everything else.
# They don't get to disable X entirely, this is *x*dvi.

# -lXext may not be present, and that may be ok.  Link with it only if it is.
if test -z "$x_ext_lib"; then # allow envvar override
  if test -n "$x_libraries"; then
    XLFLAG="-L$x_libraries"
  else
    XLFLAG=
  fi
  AC_CHECK_LIB(Xext, XextCreateExtension,
               x_ext_lib=-lXext, :, -lX11 $X_EXTRA_LIBS $XLFLAG)
fi
AC_SUBST(x_ext_lib)

if test "x$with_x_toolkit" = xno; then
  AC_DEFINE(NOTOOL)
  x_tool_libs=
else
  # Effectively promote --with-x-toolkit=xt to athena since the code
  # does not distinguish.
  x_tool_libs="-lXaw -lXmu -lXt"
fi
AC_SUBST(x_tool_libs)

# For --with-ps.
test -z "$PS_DEF" && PS_DEF=-DPS_GS
test "$PS_DEF" = no && PS_DEF=
AC_SUBST(PS_DEF)dnl
dnl
# If we're on Solaris and we want DPS, then add the extra compilation stuff
# to get it.
if echo "$PS_DEF" | grep PS_DPS >/dev/null; then
   if test "`(uname) 2>/dev/null`" = SunOS \
      && uname -r | grep '^5' >/dev/null; then
    AC_MSG_RESULT(adding DPS includes and libraries for Solaris)
    X_CFLAGS="$X_CFLAGS -I/usr/openwin/include/X11"
    AC_CHECK_LIB(sunmath, isinf, ac_sunmath=-lsunmath, ac_sunmath="")
    X_LIBS="$X_LIBS -R/usr/openwin/lib /usr/openwin/lib/libdps.so $ac_sunmath"
    # We only need isinf and ieeefp.h to work around a Solaris bug in
    # -ldps; see psdps.c.  isinf is in -lsunmath.
    AC_CHECK_FUNCS(isinf)
    AC_CHECK_HEADERS(ieeefp.h)
  else
    # SunOS 4.x is simpler.
    AC_MSG_RESULT(adding DPS includes and libraries for SunOS 4.x)
    X_LIBS="$X_LIBS -ldps"
  fi
elif echo "$PS_DEF" | grep PS_NEWS >/dev/null; then
    AC_MSG_RESULT(adding NeWS libraries)
    X_LIBS="$X_LIBS -lxview -lcps -lolgx -lxvps"
fi

# For --with-vflib.
AC_SUBST(VFLIB_DEF)

# For --with-vfontmap
# Check if we need to use libVFlib.a
if echo "$VFLIB_DEF" | grep NOZEIT > /dev/null; then
  VFLIB=
else
  LIBS_bak="$LIBS"
  if test x"$libdir" = x'${exec_prefix}/lib'; then
    if test x"$exec_prefix" = x"NONE"; then
      if test x"$prefix" = x"NONE"; then
        libdir_tmp=/usr/local/lib
      else
        libdir_tmp="$prefix"/lib
      fi
    else
      libdir_tmp="$exec_prefix"/lib
    fi
  else
    libdir_tmp="$libdir"
  fi
  AC_CACHE_CHECK(for VF_Init in -lVFlib,
  ac_cv_lib_VFlib_VF_Init,
  LIBS="$LIBS_bak -lVFlib -lm"
  AC_TRY_LINK( , VF_Init(), [ac_cv_lib_VFlib_VF_Init=yes],
    [ac_cv_lib_VFlib_VF_Init=no]))
  if test "$ac_cv_lib_VFlib_VF_Init" = yes; then
    VFLIB=-lVFlib
  else
    AC_CACHE_CHECK(for VF_Init in -L$libdir_tmp -lVFlib,
    ac_cv_lib_VFlib_local_VF_Init,
    LIBS="$LIBS_bak -L$libdir_tmp -lVFlib -lm"
    AC_TRY_LINK( , VF_Init(), [ac_cv_lib_VFlib_local_VF_Init=yes],
      [ac_cv_lib_VFlib_local_VF_Init=no]))
    if test "$ac_cv_lib_VFlib_local_VF_Init" = yes; then
      VFLIB='-L$(libdir) -lVFlib'
else
  AC_CACHE_CHECK(for VF_Init in -lVFlib -lttf,
  ac_cv_lib_VFlib_ttf_VF_Init,
  LIBS="$LIBS_bak -lVFlib -lttf -lm"
  AC_TRY_LINK( , VF_Init(), [ac_cv_lib_VFlib_ttf_VF_Init=yes],
    [ac_cv_lib_VFlib_ttf_VF_Init=no]))
  if test "$ac_cv_lib_VFlib_ttf_VF_Init" = yes; then
    VFLIB="-lVFlib -lttf"
  else
    AC_CACHE_CHECK(for VF_Init in -L$libdir_tmp -lVFlib -lttf,
    ac_cv_lib_VFlib_ttf_local_VF_Init,
    LIBS="$LIBS_bak -L$libdir_tmp -lVFlib -lttf -lm"
    AC_TRY_LINK( , VF_Init(), [ac_cv_lib_VFlib_ttf_local_VF_Init=yes],
      [ac_cv_lib_VFlib_ttf_local_VF_Init=no]))
    if test "$ac_cv_lib_VFlib_ttf_local_VF_Init" = yes; then
      VFLIB='-L$(libdir) -lVFlib -lttf'
else
  AC_CACHE_CHECK(for VF_Init in -lVFlib2 -lttf,
  ac_cv_lib_VFlib2_ttf_VF_Init,
  LIBS="$LIBS_bak -lVFlib2 -lttf -lm"
  AC_TRY_LINK( , VF_Init(), [ac_cv_lib_VFlib2_ttf_VF_Init=yes],
    [ac_cv_lib_VFlib2_ttf_VF_Init=no]))
  if test "$ac_cv_lib_VFlib2_ttf_VF_Init" = yes; then
    VFLIB="-lVFlib2 -lttf"
  else
    AC_CACHE_CHECK(for VF_Init in -L$libdir_tmp -lVFlib2 -lttf,
    ac_cv_lib_VFlib2_ttf_local_VF_Init,
    LIBS="$LIBS_bak -L$libdir_tmp -lVFlib2 -lttf -lm"
    AC_TRY_LINK( , VF_Init(), [ac_cv_lib_VFlib2_ttf_local_VF_Init=yes],
      [ac_cv_lib_VFlib2_ttf_local_VF_Init=no]))
    if test "$ac_cv_lib_VFlib2_ttf_local_VF_Init" = yes; then
      VFLIB='-L$(libdir) -lVFlib2 -lttf'
else
  # may be wrong
  VFLIB=-lVFlib
fi
fi
fi
fi
fi
fi
  LIBS="$LIBS_bak"
fi
AC_SUBST(VFLIB)

# For --with-dvifilter
AC_SUBST(DVIFILTERCMD) AC_SUBST(DVIFILTER)

# For --enable-xdviprint
AC_SUBST(XDVIPRINT_DEF) AC_SUBST(XDVIPRINTCMD)

# For --enable-xdvietcdir
AC_SUBST(XDVIETCDIR)

# For other options
AC_SUBST(XDEFS)

AC_OUTPUT(Makefile)

dnl update `stamp-auto' since we just remade `c-auto.h'
date >stamp-auto