Debian Codegraph @

x3270/configure.in

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 dnl Copyright (c) 2000-2024 Paul Mattes.
2 dnl All rights reserved.
3 dnl
4 dnl Redistribution and use in source and binary forms, with or without
5 dnl modification, are permitted provided that the following conditions
6 dnl are met:
7 dnl * Redistributions of source code must retain the above copyright
8 dnl notice, this list of conditions and the following disclaimer.
9 dnl * Redistributions in binary form must reproduce the above copyright
10 dnl notice, this list of conditions and the following disclaimer in the
11 dnl documentation and/or other materials provided with the distribution.
12 dnl * Neither the name of Paul Mattes nor his contributors may be used
13 dnl to endorse or promote products derived from this software without
14 dnl specific prior written permission.
15 dnl
16 dnl THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS
17 dnl OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 dnl DISCLAIMED. IN NO EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT,
20 dnl INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 dnl (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24 dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
25 dnl IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 dnl POSSIBILITY OF SUCH DAMAGE.
27
28 dnl Process this file with autoconf to produce a configure script.
29 AC_INIT([x3270],[4.3])
30 AC_PREREQ([2.69])
31 AC_CONFIG_HEADERS([conf.h])
32
33 dnl Checks for programs.
34 AC_PROG_INSTALL
35 AC_PROG_CC
36
37 dnl Compute host-specific flags.
38 AC_CANONICAL_HOST
39 case "$host_os" in
40 solaris2*) CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
41 ;;
42 darwin*) CCOPTIONS="$CCOPTIONS -no-cpp-precomp -Wno-deprecated-declarations"
43 ;;
44 linux*) CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE"
45 ;;
46 esac
47 if test "$GCC" = yes
48 then # Add common gcc options, plus flags for dependency generation.
49 CCOPTIONS="$CCOPTIONS -Wall -Wsign-compare -std=c99 -pedantic -Wno-variadic-macros -MMD -MP"
50 fi
51 AC_SUBST(host)
52 AC_SUBST(CCOPTIONS)
53 AC_SUBST(BUILD_CC)
54 AC_SUBST(BUILD_LDFLAGS)
55 AC_SUBST(BUILD_LIBS)
56 AC_SUBST(BUILD_CFLAGS)
57
58 dnl Checks for header files.
59 AC_CHECK_HEADERS(sys/select.h)
60 AC_CHECK_HEADERS(pty.h)
61 AC_CHECK_HEADERS(libutil.h)
62 AC_CHECK_HEADERS(util.h)
63 AC_CHECK_HEADERS(getopt.h)
64
65 dnl Check for X
66 AC_PATH_X
67 if test "$no_x" = "yes"; then AC_MSG_ERROR('Cannot find X utilities or libraries'); fi
68 if test -n "$x_includes"
69 then CPPFLAGS="$CPPFLAGS -I$x_includes"
70 fi
71 if test -n "$x_libraries"
72 then LDFLAGS="$LDFLAGS -L$x_libraries"
73 fi
74
75 dnl Check for --enable-app-defaults
76 AC_ARG_ENABLE(app-defaults,
77 [ --enable-app-defaults use a separate app-defaults file],
78 [DEFINE_UAD="#define USE_APP_DEFAULTS 1"; if test "$enable_app_defaults" = "yes"; then UAD_FLAGS="-DCOLOR"; else UAD_FLAGS="$enable_app_defaults"; fi],
79 [DEFINE_UAD=""; UAD_FLAGS="-DCOLOR"; FALLBACKS_O=fallbacks.o])
80 AC_SUBST(UAD_FLAGS)
81 AC_SUBST(DEFINE_UAD)
82 AC_SUBST(FALLBACKS_O)
83
84 dnl Check for --with-fontdir=DIR
85 AC_ARG_WITH(fontdir,[ --with-fontdir=DIR install fonts in directory DIR [DIR=PREFIX/share/fonts/X11/misc]])
86 case "$with_fontdir" in
87 ""|yes|no)
88 CIFONTDIR='$'"(prefix)/share/fonts/X11/misc"
89 ;;
90 /*)
91 CIFONTDIR="$with_fontdir"
92 ;;
93 *)
94 CIFONTDIR='$'"(exec_prefix)/fonts/$with_fontdir"
95 ;;
96 esac
97 AC_SUBST(CIFONTDIR)
98
99 # Set up the configuration directory.
100 LIBX3270DIR='${sysconfdir}/x3270'
101 AC_SUBST(LIBX3270DIR)
102
103 dnl Check for other libraries.
104 dnl Note that the order here is important. The last libraries should appear
105 dnl first, so that objects in them can be used by subsequent libraries.
106 AC_SEARCH_LIBS(forkpty, util)
107 AC_CHECK_FUNCS(forkpty)
108 AC_SEARCH_LIBS(gethostbyname, nsl_s nsl)
109 AC_SEARCH_LIBS(socket, socket)
110 AC_CHECK_HEADERS(X11/Shell.h, , AC_MSG_ERROR("Cannot find X11 header files"))
111 AC_CHECK_HEADERS(X11/Xmu/Atoms.h, , AC_MSG_ERROR("Cannot find Xmu header files"))
112 AC_CHECK_HEADERS(X11/Xaw/Form.h, , AC_MSG_ERROR("Cannot find Xaw header files"))
113 AC_SEARCH_LIBS(XFillRectangle, X11, , AC_MSG_ERROR("Cannot find libX11"))
114 AC_SEARCH_LIBS(XtVaSetValues, Xt, , AC_MSG_ERROR("Cannot find libXt"))
115 AC_SEARCH_LIBS(XmuAddInitializer, Xmu, , AC_MSG_ERROR("Cannot find libXmu"))
116 AC_SEARCH_LIBS(XawInitializeWidgetSet, Xaw, , AC_MSG_ERROR("Cannot find libXaw"))
117
118 dnl Checks for library functions.
119 AC_CHECK_FUNCS(vasprintf)
120 AC_FUNC_FSEEKO
121
122 dnl Check for xmkmkf or bdftopcf and mkfontdir
123 AC_CHECK_PROG(bdftopcf_found,bdftopcf,found,notfound)
124 if test "$bdftopcf_found" = "notfound"
125 then AC_MSG_ERROR('Cannot find bdftopcf')
126 fi
127 AC_CHECK_PROG(mkfontdir_found,mkfontdir,found,notfound)
128 if test "$mkfontdir_found" = "notfound"
129 then AC_MSG_ERROR('Cannot find mkfontdir')
130 fi
131
132 dnl Check for unwanted parts.
133 AC_ARG_ENABLE(dbcs,[ --disable-dbcs leave out DBCS support])
134 case "$enable_dbcs" in
135 no) ;;
136 *) AC_DEFINE(X3270_DBCS,1)
137 ;;
138 esac
139 AC_ARG_ENABLE(local_process,[ --disable-local-process leave out local process support])
140 case "$enable_local_process" in
141 ""|yes) AC_DEFINE(X3270_LOCAL_PROCESS,1)
142 ;;
143 esac
144
145 if test "$x_includes"
146 then XINC=-I$x_includes
147 fi
148 if test "$x_libraries"
149 then XLIB=-L$x_libraries
150 fi
151 AC_SUBST(XINC)
152 AC_SUBST(XLIB)
153 AC_CONFIG_FILES(Makefile Makefile.obj)
154 AC_OUTPUT