File: configure.in

package info (click to toggle)
tex-guy 1.2.4-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,676 kB
  • ctags: 2,778
  • sloc: ansic: 26,147; sh: 8,358; makefile: 663; awk: 78; perl: 63
file content (169 lines) | stat: -rw-r--r-- 4,738 bytes parent folder | download
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
dnl  configure.in for TeX-Guy programs
dnl  by H.Kakugawa (h.kakugawa@computer.org)

AC_INIT(sample-dvi/hello.tex)
AC_REQUIRE([AC_STARTUP])

dnl Configure GNU Libtool
AM_DISABLE_STATIC
AM_PROG_LIBTOOL

dnl DVIlib version
dvilib_version='2.8.0'

AC_SUBST(dvilib_version)

dnl Libtool versioning scheme
CUR=13
REV=0
AGE=0
AC_SUBST(version_info)
version_info=$CUR:$REV:$AGE

dnl From GNU Libtoool 1.2 manual:
dnl  1. Start with version information of `0:0:0' for each libtool library.
dnl
dnl  2. Update the version information only immediately before a public
dnl     release of your software.  More frequent updates are unnecessary,
dnl     and only guarantee that the current interface number gets larger
dnl     faster.
dnl
dnl  3. If the library source code has changed at all since the last
dnl     update, then increment REVISION (`C:R:A' becomes `C:R+1:A').
dnl
dnl  4. If any interfaces have been added, removed, or changed since the
dnl     last update, increment CURRENT, and set REVISION to 0.
dnl
dnl  5. If any interfaces have been added since the last public release,
dnl     then increment AGE.
dnl
dnl  6. If any interfaces have been removed since the last public release,
dnl     then set AGE to 0.



AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_X

if test "x$CC" = xgcc; then
	XX_CFLAGS="-Wall -pedantic -ansi"
else
       	XX_CFLAGS=
fi
AC_SUBST(XX_CFLAGS)


AC_CHECK_HEADERS(stdarg.h vararg.h)
AC_CHECK_HEADERS(unistd.h fcntl.h malloc.h pwd.h signal.h)
AC_CHECK_HEADERS(string.h strings.h)
AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h sys/wait.h)
AC_HEADER_STDC

AC_CHECK_FUNCS(memcmp memclr rindex index strcasecmp mkstemp tmpfile nint)
AC_CHECK_FUNCS(stat access select pipe fork vfork killpg waitpid usleep sleep)
AC_CHECK_FUNCS(getcwd getwd getpid getlogin getuid getgid getpwuid)
AC_CHECK_FUNCS(gethostname getdomainname unsetenv)
AC_TYPE_SIGNAL

AC_SUBST(LIBS)
AC_CHECK_LIB(nsl,    main, LIBS="$LIBS -lnsl")
AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket")
AC_CHECK_LIB(m,      main, LIBS="$LIBS -lm")

AC_SUBST(I18NLIBS)
AC_CHECK_LIB(xpg4,   main, I18NLIBS="-lxpg4")

AC_SUBST(AALIBS)
AC_CHECK_LIB(aa,     main, AALIBS="-laa")

AC_SUBST(VFLIB3_PREFIX)
AC_ARG_WITH(
 VFlib3-prefix,
 [  --with-VFlib3-prefix=DIR       VFlib3 prefix directory is DIR],
 VFLIB3_PREFIX="--prefix=${withval}")

AC_SUBST(lesstif_prefix)
AC_ARG_WITH(
 lesstif-prefix,
 [  --with-lesstif-prefix=DIR      LessTif prefix directory is DIR],
 lesstif_prefix="${withval}",
 lesstif_prefix='${prefix}')

AC_SUBST(gtk_prefix)
AC_CHECK_PROG(have_gtk, gtk-config, "yes", "no")
AC_ARG_WITH(
 gtk-prefix,
 [  --with-gtk-prefix=DIR          GTK prefix directory is DIR],
 gtk_prefix="--prefix=${withval}")

AC_CHECK_HEADERS(libintl.h)
if test "X-${ac_cv_header_libintl_h}" = "X-yes"; then
 gettext="yes";
fi
AC_ARG_WITH(
 gettext,
 [  --with-gettext                 Compile xgdvi with GNU gettext library],
 gettext="yes")

AC_SUBST(gettext_lib)
AC_SUBST(gettext_include)
if test "X-${gettext}" = "X-no"; then
 gettext_lib=""
 gettext_include=""
else
AC_DEFINE(WITH_GETTEXT)
AC_ARG_WITH(
 gettext_prefix,
 [  --with-gettext-prefix=DIR      GNU gettext preffix direcotry is DIR],
 gettext_lib="-L${withval}/lib"; gettext_include="-I${withval}/include",
 gettext_lib='-L${prefix}/lib';  gettext_include='-I${prefix}/include')
fi
AC_TRY_LINK([#include <libintl.h>], 
 [ bindtextdomain("xxx", "/usr/share/locale"); ], 
 AC_MSG_RESULT(Use libc built-in gettext functions.); ,
 AC_MSG_RESULT(Use external gettext library.); gettext_lib="${gettext_lib} -lintl")

AC_SUBST(AALIB_PREFIX)
AC_CHECK_HEADERS(aalib.h)
if test "X-${ac_cv_header_aalib_h}" = "X-yes"; then
 have_aalib="yes";
else
 have_aalib="no";
fi
AC_ARG_WITH(
 aalib-prefix,
 [  --with-aalib-prefix=DIR        AAlib prefix directory is DIR],
 AALIB_PREFIX="--prefix=${withval}")



AC_CONFIG_HEADER(config.h with.h)

AC_OUTPUT(Makefile make-sub DVIlib2-config \
          DVIlib2/Makefile \
          spwx11/Makefile spwg/Makefile xgdvi/Makefile \
          xldvi/Makefile xmdvi/Makefile \
          dvi2escpage/Makefile \
          dvi2misc/Makefile \
            dvi2misc/dvi2img dvi2misc/dvi2pgm dvi2misc/dvi2ppm  \
            dvi2misc/dvi2bdps \
            dvi2misc/dvi2escpg \
              dvi2misc/dvi2escpg-filt dvi2misc/dvi2escpg-filt-l \
            dvi2misc/dvi2rpdl \
              dvi2misc/dvi2rpdl-filt-a4 dvi2misc/dvi2rpdl-filt-a4-l \
              dvi2misc/dvi2rpdl-filt-b4 dvi2misc/dvi2rpdl-filt-b4-l \
          dvifontlist/Makefile dvispecials/Makefile)
chmod a+x DVIlib2-config

if test X-${have_gtk} = X-yes; then
  echo "You have GTK"; fi

if test X-${have_aalib} = X-yes; then
  echo "You have AALib"; fi

( cd X11; ./run-xmkmf.sh; make )

dnl EOF