configure/Makefiles for TT: many fixups
[oweals/cde.git] / cde / configure.ac
1 AC_INIT([cde-desktop], [2.3.1], [jon@radscan.com])
2 AC_CONFIG_HEADERS([include/autotools_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="$CPPFLAGS"
75         CPPFLAGS="$oflags -DCSRG_BASED"
76 fi
77
78 is_x86_64=no
79 is_i386=no
80 is_sparc=no
81 is_mips=no
82 is_arm=no
83 is_ppc=no
84
85 case "$target_or_host" in
86         i*86-*-*)
87                 is_i386=yes
88                 ;;
89         x86_64-*)
90                 is_x86_64=yes
91                 ;;
92         *arm*)
93                 is_arm=yes
94                 ;;
95         *mips*)
96                 is_mips=yes
97                 ;;
98         *sparc*)
99                 is_sparc=yes
100                 ;;
101         ppc-*-linux* | powerpc-*)
102                 is_ppc=yes
103                 ;;
104 esac
105
106 AM_CONDITIONAL([I386], [test "$is_i386" = yes])
107 AM_CONDITIONAL([X86_64], [test "$is_x86_64" = yes])
108 AM_CONDITIONAL([ARM], [test "$is_arm" = yes])
109 AM_CONDITIONAL([SPARC], [test "$is_sparc" = yes])
110 AM_CONDITIONAL([MIPS], [test "is_mips" = yes])
111 AM_CONDITIONAL([PPC], [test "is_ppc" = yes])
112
113 dnl our main libraries
114 AC_SUBST(LIBTT, '$(top_builddir)/lib/tt/lib/libtt.la')
115 AC_SUBST(LIBXIN, '$(top_builddir)/lib/DtXinerama/libDtXinerama.a')
116 AC_SUBST(LIBWIDGET, '$(top_builddir)/lib/DtWidget/libDtWidget.la')
117 AC_SUBST(LIBTERM, '$(top_builddir)/lib/DtTerm/libDtTerm.la')
118 AC_SUBST(LIBSVC, '$(top_builddir)/lib/DtSvc/libDtSvc.la')
119 AC_SUBST(LIBSEARCH, '$(top_builddir)/lib/DtSearch/lbiDtSearch.la')
120 AC_SUBST(LIBPRINT, '$(top_builddir)/lib/DtPrint/libDtPrint.la')
121 AC_SUBST(LIBMRM, '$(top_builddir)/lib/DtMrm/libDtMrm.la')
122 AC_SUBST(LIBMMDB, '$(top_builddir)/lib/DtMmdb/libDtMmdb.la')
123 AC_SUBST(LIBHELP, '$(top_builddir)/lib/DtHelp/libDtHelp.la')
124 AC_SUBST(LIBCSA, '$(top_builddir)/lib/csa/libcsa.la')
125
126 dnl JET FIXME/CHECKME
127 AC_SUBST(XTOOLLIB, "-lICE -lSM -lXt")
128
129 AC_ARG_ENABLE(japanese, [--build-japanese    Build Japanese (default=no)])
130 AM_CONDITIONAL([JAPANESE], [test "build_japanese" = "yes"])
131
132 AC_ARG_ENABLE(german, [--build-german    Build German    (default=no)])
133 AM_CONDITIONAL([GERMAN], [test "build_german" = "yes"])
134
135 AC_ARG_ENABLE(italian, [--build-italian    Build Italian    (default=no)])
136 AM_CONDITIONAL([ITALIAN], [test "build_italian" = "yes"])
137
138 AC_ARG_ENABLE(french, [--build-french    Build French    (default=no)])
139 AM_CONDITIONAL([FRENCH], [test "build_french" = "yes"])
140
141 AC_ARG_ENABLE(spanish, --build-spanish    Build Spanish    (default=no)])
142 AM_CONDITIONAL([SPANISH], [test "build_spanish" = "yes"])
143
144 RM="rm -f"
145 AC_SUBST(RM)
146
147 CDE_LOGFILES_TOP=/var/dt
148 CDE_CONFIGURATION_TOP=/etc/dt
149 CDE_USER_TOP=.dt
150
151 AC_SUBST(CDE_CONFIGURATION_TOP)
152 AC_SUBST(CDE_LOGFILES_TOP)
153 AC_SUBST(CDE_USER_TOP)
154
155 AC_PROG_CC
156 AC_PROG_CXX
157 AC_PROG_CPP
158 AM_PROG_LIBTOOL
159 AC_PROG_YACC
160
161 AM_PROG_LEX
162 AC_PROG_INSTALL
163 AC_PROG_LN_S
164 AC_PROG_MAKE_SET
165 AC_PROG_SED
166 AC_PROG_AWK
167 AC_PROG_GREP
168
169 AC_C_CONST
170 AC_SYS_POSIX_TERMIOS
171
172 AC_PATH_X
173 AC_PATH_XTRA
174
175 dnl programs
176 AC_CHECK_PROGS(KSH, ksh)
177 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
178 AC_CHECK_PROGS(MKFONTIDR, mkfontdir)
179 AC_CHECK_PROGS(GZIP, gzip)
180 AC_CHECK_PROGS(M4, m4)
181
182 dnl headers
183 AC_HEADER_STDC
184
185 dnl libraries
186 AC_CHECK_LIB(tirpc, main, [TIRPCINC="-DOPT_TIRPC -I/usr/include/tirpc"; TIRPCLIB=-ltirpc])
187 AC_SUBST(TIRPCINC)
188 AC_SUBST(TIRPCLIB)
189
190 dnl All of the makefiles we need to generate go here...
191 AC_CONFIG_FILES([
192 Makefile
193
194 lib/Makefile
195
196 lib/DtXinerama/Makefile
197
198 lib/tt/Makefile
199 lib/tt/mini_isam/Makefile
200 lib/tt/slib/Makefile
201 lib/tt/lib/Makefile
202 lib/tt/lib/api/Makefile
203 lib/tt/lib/api/dnd/Makefile
204 lib/tt/lib/api/c/Makefile
205 lib/tt/lib/tttk/Makefile
206 lib/tt/lib/db/Makefile
207 lib/tt/lib/mp/Makefile
208 lib/tt/lib/util/Makefile
209 lib/tt/bin/Makefile
210 lib/tt/bin/shell/Makefile
211 lib/tt/bin/ttauth/Makefile
212 lib/tt/bin/scripts/Makefile
213 lib/tt/bin/tttar/Makefile
214 lib/tt/bin/tt_type_comp/Makefile
215 lib/tt/bin/tttrace/Makefile
216 lib/tt/bin/dbck/Makefile
217 lib/tt/bin/ttdbserverd/Makefile
218 lib/tt/bin/ttsession/Makefile
219
220 lib/DtSvc/Makefile
221 lib/DtSvc/DtUtil1/Makefile
222 lib/DtSvc/DtUtil2/Makefile
223 lib/DtSvc/DtEncap/Makefile
224 lib/DtSvc/DtCodelibs/Makefile
225 lib/DtSvc/DtXpm/Makefile
226
227 lib/DtSearch/Makefile
228 lib/DtSearch/raima/Makefile
229
230 lib/DtWidget/Makefile
231
232 lib/DtHelp/Makefile
233 lib/DtHelp/il/Makefile
234
235 lib/DtPrint/Makefile
236
237 lib/DtTerm/Term/Makefile
238 lib/DtTerm/Makefile
239 lib/DtTerm/TermView/Makefile
240 lib/DtTerm/util/Makefile
241 lib/DtTerm/TermPrim/Makefile
242
243 lib/DtMrm/Makefile
244
245 lib/csa/Makefile
246
247 logs/Makefile
248
249 programs/Makefile
250 ])
251
252 AC_OUTPUT
253