tt: create Makefile.am for tt/util
[oweals/cde.git] / cde / configure.ac
1 AC_INIT([cde-desktop], [2.3.1], [jon@radscan.com])
2 AC_CONFIG_HEADERS([include/config.h])
3 AC_CONFIG_MACRO_DIRS([m4])
4 AM_INIT_AUTOMAKE([foreign])
5 AC_PREFIX_DEFAULT(/usr/dt)
6
7
8 dnl todo: determine what version of autoconf we depend on
9 dnl AC_PREREQ()
10
11 AC_CANONICAL_HOST
12
13 dnl global CDE versioning
14
15 MAJOR=2
16 MINOR=3
17 MICRO=0
18
19 AC_SUBST(MAJOR)
20 AC_SUBST(MINOR)
21 AC_SUBST(MICRO)
22
23 dnl These OS checks are deprecated and should be replaced with feature checks
24 dnl where appropriate
25
26 build_linux=no
27 bsd=no
28 build_freebsd=no
29 build_openbsd=no
30 build_netbsd=no
31 build_solaris=no
32 build_hpux=no
33 build_aix=no
34
35 case "${host_os}" in
36         linux*)
37                 build_linux=yes
38                 ;;
39         freebsd*)
40                 build_freebsd=yes
41                 bsd=yes
42                 ;;
43         openbsd*)
44                 build_openbsd=yes
45                 bsd=yes
46                 ;;
47         netbsd*)
48                 build_netbsd=yes
49                 bsd=yes
50                 ;;
51         solaris*|sun*)
52                 build_solaris=yes
53                 ;;
54         aix*)
55                 build_aix=yes
56                 ;;
57         hpux*)
58                 build_hpux=yes
59                 ;;
60 esac
61
62 AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
63 AM_CONDITIONAL([BSD], [test "$build_bsd" = "yes"])
64 AM_CONDITIONAL([FREEBSD], [test "$build_freebsd" = "yes"])
65 AM_CONDITIONAL([OPENBSD], [test "$build_openbsd" = "yes"])
66 AM_CONDITIONAL([NETBSD], [test "$build_netbsd" = "yes"])
67 AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"])
68 AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"])
69 AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"])
70
71 dnl set CSRG_BASED define for the BSD's
72 if test "$build_bsd" = "yes"
73 then
74         oflags="$CFLAGS"
75         CFLAGS="$oflags -DCSRG_BASED"
76         oflags="$CXXFLAGS"
77         CXXFLAGS="$oflags -DCSRG_BASED"
78 fi
79
80 is_x86_64=no
81 is_i386=no
82 is_sparc=no
83 is_mips=no
84 is_arm=no
85 is_ppc=no
86
87 case "$target_or_host" in
88         i*86-*-*)
89                 is_i386=yes
90                 ;;
91         x86_64-*)
92                 is_x86_64=yes
93                 ;;
94         *arm*)
95                 is_arm=yes
96                 ;;
97         *mips*)
98                 is_mips=yes
99                 ;;
100         *sparc*)
101                 is_sparc=yes
102                 ;;
103         ppc-*-linux* | powerpc-*)
104                 is_ppc=yes
105                 ;;
106 esac
107
108 AM_CONDITIONAL([I386], [test "$is_i386" = yes])
109 AM_CONDITIONAL([X86_64], [test "$is_x86_64" = yes])
110 AM_CONDITIONAL([ARM], [test "$is_arm" = yes])
111 AM_CONDITIONAL([SPARC], [test "$is_sparc" = yes])
112 AM_CONDITIONAL([MIPS], [test "is_mips" = yes])
113 AM_CONDITIONAL([PPC], [test "is_ppc" = yes])
114
115 LIBTT="$srcdir/lib/tt/lib/libtt.so.2.1"
116 LIBXIN="$srcdir/lib/DtXinerama/libDtXinerama.a"
117 LIBWIDGET="$srcdir/lib/DtWidget/libDtWidget.so.2.1"
118 LIBTERM="$srcdir/lib/DtTerm/libDtTerm.so.2.1"
119 LIBSVC="$srcdir/lib/DtSvc/libDtSvc.so.2.1"
120 LIBSEARCH="$srcdir/lib/DtSearch/lbiDtSearch.so.2.1"
121 LIBPRINT="$srcdir/lib/DtPrint/libDtPrint.so.2.1"
122 LIBMRM="$srcdir/lib/DtMrm/libDtMrm.so.2.1"
123 LIBMMDB="$srcdir/lib/DtMmdb/libDtMmdb.so.2.1"
124 LIBHELP="$srcdir/lib/DtHelp/libDtHelp.so.2.1"
125 LIBCSA="$srcdir/lib/csa/libcsa.so.2.1"
126 XTOOLLIB=-lICE -lSM -lXt
127
128 AC_SUBST(LIBTT)
129 AC_SUBST(LIBXIN)
130 AC_SUBST(LIBWIDGET)
131 AC_SUBST(LIBTERM)
132 AC_SUBST(LIBSVC)
133 AC_SUBST(LIBSEARCH)
134 AC_SUBST(LIBPRINT)
135 AC_SUBST(LIBMRM)
136 AC_SUBST(LIBMMDB)
137 AC_SUBST(LIBHELP)
138 AC_SUBST(LIBCSA)
139 AC_SUBST(XTOOLLIB)
140
141 AC_ARG_ENABLE(japanese, [--build-japanese    Build Japanese (default=no)])
142 AM_CONDITIONAL([JAPANESE], [test "build_japanese" = "yes"])
143
144 AC_ARG_ENABLE(german, [--build-german    Build German    (default=no)])
145 AM_CONDITIONAL([GERMAN], [test "build_japanese" = "yes"])
146
147 AC_ARG_ENABLE(italian, [--build-italian    Build Italian    (default=no)])
148 AM_CONDITIONAL([ITALIAN], [test "build_italian" = "yes"])
149
150 AC_ARG_ENABLE(french, [--build-french    Build French    (default=no)])
151 AM_CONDITIONAL([FRENCH], [test "build_french" = "yes"])
152
153 AC_ARG_ENABLE(spanish, --build-spanish    Build Spanish    (default=no)])
154 AM_CONDITIONAL([FRENCH], [test "build_french" = "yes"])
155
156 RM="rm -f"
157 AC_SUBST(RM)
158
159 CDE_LOGFILES_TOP=/var/dt
160 CDE_CONFIGURATION_TOP=/etc/dt
161 CDE_USER_TOP=.dt
162
163 AC_SUBST(CDE_CONFIGURATION_TOP)
164 AC_SUBST(CDE_LOGFILES_TOP)
165 AC_SUBST(CDE_USER_TOP)
166
167 AC_PROG_CC
168 AC_PROG_CXX
169 AC_PROG_CPP
170 AM_PROG_LIBTOOL
171 AC_PROG_YACC
172
173 AM_PROG_LEX
174 AC_PROG_INSTALL
175 AC_PROG_LN_S
176 AC_PROG_MAKE_SET
177 AC_PROG_SED
178 AC_PROG_AWK
179 AC_PROG_GREP
180
181 AC_C_CONST
182
183 AC_PATH_X
184 AC_PATH_XTRA
185
186 dnl programs
187 AC_CHECK_PROGS(KSH, ksh)
188 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
189 AC_CHECK_PROGS(MKFONTIDR, mkfontdir)
190 AC_CHECK_PROGS(GZIP, gzip)
191 AC_CHECK_PROGS(M4, m4)
192
193 dnl headers
194 AC_HEADER_STDC
195
196 dnl libraries
197 AC_CHECK_LIB(tirpc, main, [TIRPCINC="-DOPT_TIRPC -I/usr/include/tirpc"; TIRPCLIB=-ltirpc])
198 AC_SUBST(TIRPCINC)
199 AC_SUBST(TIRPCLIB)
200
201 dnl All of the makefiles we need to generate go here...
202 AC_CONFIG_FILES([
203 Makefile
204
205 lib/Makefile
206
207 lib/DtXinerama/Makefile
208
209 lib/tt/Makefile
210 lib/tt/mini_isam/Makefile
211 lib/tt/slib/Makefile
212 lib/tt/lib/Makefile
213 lib/tt/lib/api/Makefile
214 lib/tt/lib/api/dnd/Makefile
215 lib/tt/lib/api/c/Makefile
216 lib/tt/lib/tttk/Makefile
217 lib/tt/lib/db/Makefile
218 lib/tt/lib/mp/Makefile
219 lib/tt/lib/util/Makefile
220 lib/tt/bin/Makefile
221 lib/tt/bin/shell/Makefile
222 lib/tt/bin/ttauth/Makefile
223 lib/tt/bin/scripts/Makefile
224 lib/tt/bin/tttar/Makefile
225 lib/tt/bin/tt_type_comp/Makefile
226 lib/tt/bin/tttrace/Makefile
227 lib/tt/bin/dbck/Makefile
228 lib/tt/bin/ttdbserverd/Makefile
229 lib/tt/bin/ttsession/Makefile
230
231 lib/DtSvc/Makefile
232 lib/DtSvc/DtUtil1/Makefile
233 lib/DtSvc/DtUtil2/Makefile
234 lib/DtSvc/DtEncap/Makefile
235 lib/DtSvc/DtCodelibs/Makefile
236 lib/DtSvc/DtXpm/Makefile
237
238 lib/DtSearch/Makefile
239 lib/DtSearch/raima/Makefile
240
241 lib/DtWidget/Makefile
242
243 lib/DtHelp/Makefile
244 lib/DtHelp/il/Makefile
245
246 lib/DtPrint/Makefile
247
248 lib/DtTerm/Term/Makefile
249 lib/DtTerm/Makefile
250 lib/DtTerm/TermView/Makefile
251 lib/DtTerm/util/Makefile
252 lib/DtTerm/TermPrim/Makefile
253
254 lib/DtMrm/Makefile
255
256 lib/csa/Makefile
257
258 logs/Makefile
259
260 programs/Makefile
261 ])
262
263 AC_OUTPUT
264