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 subdir-objects])
6 AC_PREFIX_DEFAULT(/usr/dt)
12 dnl todo: determine what version of autoconf we depend on
17 dnl global CDE versioning
23 AC_SUBST(CDE_VERSION_MAJOR)
24 AC_SUBST(CDE_VERSION_MINOR)
25 AC_SUBST(CDE_VERSION_MICRO)
27 dnl SOURCE_DEFINES - start with CDE project default
28 SOURCE_CPP_DEFINES="-DANSICPP -DMULTIBYTE -DNLS16"
30 dnl CPP_COMPILER_FLAGS - CPP/C/C++ compiler flags
33 dnl CXX_COMPILER_FLAGS - C++ compiler flags
36 dnl C_COMPILER_FLAGS - C compiler flags
40 dnl These OS version checks are deprecated and should be replaced with
41 dnl feature checks where appropriate
52 dnl For now, we need to fake the OSMAJORVERSION, OSMINORVERSION. In Linux
53 dnl this never mattered anyway as it was always the kernel version. We will
54 dnl choose defaults here. These need to be removed in the code in favor
55 dnl of actual checks for functionality. So this should be considered
66 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -D_POSIX_SOURCE \
67 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE"
68 CPP_COMPILER_FLAGS="-fno-strict-aliasing -Wno-write-strings \
102 AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
103 AM_CONDITIONAL([BSD], [test "$build_bsd" = "yes"])
104 AM_CONDITIONAL([FREEBSD], [test "$build_freebsd" = "yes"])
105 AM_CONDITIONAL([OPENBSD], [test "$build_openbsd" = "yes"])
106 AM_CONDITIONAL([NETBSD], [test "$build_netbsd" = "yes"])
107 AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"])
108 AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"])
109 AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"])
111 dnl Add osmajor/minor version to cppflags.
112 OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION"
114 dnl set CSRG_BASED define for the BSD's
115 if test "$build_bsd" = "yes"
117 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DCSRG_BASED"
127 case "$target_or_host" in
143 ppc-*-linux* | powerpc-*)
148 AM_CONDITIONAL([I386], [test "$is_i386" = yes])
149 AM_CONDITIONAL([X86_64], [test "$is_x86_64" = yes])
150 AM_CONDITIONAL([ARM], [test "$is_arm" = yes])
151 AM_CONDITIONAL([SPARC], [test "$is_sparc" = yes])
152 AM_CONDITIONAL([MIPS], [test "is_mips" = yes])
153 AM_CONDITIONAL([PPC], [test "is_ppc" = yes])
155 dnl our main libraries
156 dnl we use single quotes so that $top_buildir is evaluated in the makefiles,
158 AC_SUBST(LIBTT, '$(top_builddir)/lib/tt/lib/libtt.la')
159 AC_SUBST(LIBXIN, '$(top_builddir)/lib/DtXinerama/libDtXinerama.la')
160 AC_SUBST(LIBWIDGET, '$(top_builddir)/lib/DtWidget/libDtWidget.la')
161 AC_SUBST(LIBTERM, '$(top_builddir)/lib/DtTerm/libDtTerm.la')
162 AC_SUBST(LIBSVC, '$(top_builddir)/lib/DtSvc/libDtSvc.la')
163 AC_SUBST(LIBSEARCH, '$(top_builddir)/lib/DtSearch/lbiDtSearch.la')
164 AC_SUBST(LIBPRINT, '$(top_builddir)/lib/DtPrint/libDtPrint.la')
165 AC_SUBST(LIBMRM, '$(top_builddir)/lib/DtMrm/libDtMrm.la')
166 AC_SUBST(LIBMMDB, '$(top_builddir)/lib/DtMmdb/libDtMmdb.la')
167 AC_SUBST(LIBHELP, '$(top_builddir)/lib/DtHelp/libDtHelp.la')
168 AC_SUBST(LIBCSA, '$(top_builddir)/lib/csa/libcsa.la')
170 AC_SUBST(DTCLIENTLIBS, '$(LIBPRINT) $(LIBHELP) $(LIBWIDGET) $(LIBSVC) \
173 dnl set up come convenience replacements for global include dirs
174 AC_SUBST(DT_INCDIR, '-I$(top_builddir)/include/Dt')
175 AC_SUBST(DTI_INCDIR, '-I$(top_builddir)/include/DtI')
176 AC_SUBST(TT_INCDIR, '-I$(top_builddir)/include/Tt')
177 AC_SUBST(XM_INCDIR, '-I$(top_builddir)/include/Xm')
178 AC_SUBST(CSA_INCDIR, '-I$(top_builddir)/include/csa')
179 AC_SUBST(SPC_INCDIR, '-I$(top_builddir)/include/SPC')
181 AC_ARG_ENABLE(japanese, [--build-japanese Build Japanese (default=no)])
182 AM_CONDITIONAL([JAPANESE], [test "build_japanese" = "yes"])
184 AC_ARG_ENABLE(german, [--build-german Build German (default=no)])
185 AM_CONDITIONAL([GERMAN], [test "build_german" = "yes"])
187 AC_ARG_ENABLE(italian, [--build-italian Build Italian (default=no)])
188 AM_CONDITIONAL([ITALIAN], [test "build_italian" = "yes"])
190 AC_ARG_ENABLE(french, [--build-french Build French (default=no)])
191 AM_CONDITIONAL([FRENCH], [test "build_french" = "yes"])
193 AC_ARG_ENABLE(spanish, --build-spanish Build Spanish (default=no)])
194 AM_CONDITIONAL([SPANISH], [test "build_spanish" = "yes"])
199 dnl these should be configurable someday...
200 CDE_INSTALLATION_TOP="$ac_default_prefix"
201 CDE_LOGFILES_TOP=/var/dt
202 CDE_CONFIGURATION_TOP=/etc/dt
205 AC_SUBST(CDE_INSTALLATION_TOP)
206 AC_SUBST(CDE_CONFIGURATION_TOP)
207 AC_SUBST(CDE_LOGFILES_TOP)
208 AC_SUBST(CDE_USER_TOP)
215 dnl we need a real preprocessor, not gcc -E. We will call it GENCPP. We will
216 dnl go with BSD's tradcpp here...
217 AC_SUBST(GENCPP, '$(top_builddir)/util/tradcpp/tradcpp')
237 AC_C_FLEXIBLE_ARRAY_MEMBER
249 dnl programs with full paths
251 AC_PATH_PROG(KSH, ksh)
252 AC_PATH_PROG(XRDB, xrdb)
255 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
256 AC_CHECK_PROGS(MKFONTIDR, mkfontdir)
257 AC_CHECK_PROGS(GZIP, gzip)
258 AC_CHECK_PROGS(M4, m4)
259 AC_CHECK_PROGS(RPCGEN, rpcgen)
263 AC_CHECK_HEADERS([locale.h])
266 AC_CHECK_LIB(m, cosf)
267 AC_CHECK_LIB(crypt, crypt)
268 AC_CHECK_LIB(tirpc, main, [TIRPCINC="-DOPT_TIRPC -I/usr/include/tirpc"; TIRPCLIB=-ltirpc])
271 AC_CHECK_LIB(Xinerama, XineramaQueryScreens, ,[AC_MSG_ERROR([libXinerama not found])])
273 dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
276 AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"])
277 AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"])
278 AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"])
279 AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"])
280 AC_CHECK_LIB(Xm, XmTextSetString, [XTOOLLIB="-lXm ${XTOOLLIB}"])
283 dnl Add -DUSE_XINERAMA to SOURCE_CPP_DEFINES for now. Eventually this
284 dnl should be configurable.
285 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XINERAMA"
287 dnl set CPPFLAGS, CFLAGS, and CXXFLAGS.
288 dnl The Autoconf manual says that these are user variables and
289 dnl shouldn't be modified. It suggests that you create a special
290 dnl variable and presumably add those to your Makefile.am files. We
291 dnl have 192 of these currently, so... The user will just have to
292 dnl deal, or modify them here directly.
293 CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
294 CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${PTHREAD_CFLAGS}"
295 CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${PTHREAD_CFLAGS}"
296 LIBS="${LIBS} ${PTHREAD_LIBS}"
298 dnl All of the makefiles we need to generate go here...
303 util/tradcpp/Makefile
307 lib/DtXinerama/Makefile
310 lib/tt/mini_isam/Makefile
313 lib/tt/lib/api/Makefile
314 lib/tt/lib/api/dnd/Makefile
315 lib/tt/lib/api/c/Makefile
316 lib/tt/lib/tttk/Makefile
317 lib/tt/lib/db/Makefile
318 lib/tt/lib/mp/Makefile
319 lib/tt/lib/util/Makefile
321 lib/tt/bin/shell/Makefile
322 lib/tt/bin/ttauth/Makefile
323 lib/tt/bin/scripts/Makefile
324 lib/tt/bin/tttar/Makefile
325 lib/tt/bin/tt_type_comp/Makefile
326 lib/tt/bin/tttrace/Makefile
327 lib/tt/bin/dbck/Makefile
328 lib/tt/bin/ttdbserverd/Makefile
329 lib/tt/bin/ttsession/Makefile
333 lib/DtSearch/Makefile
334 lib/DtSearch/raima/Makefile
336 lib/DtWidget/Makefile
339 lib/DtHelp/il/Makefile
343 lib/DtTerm/Term/Makefile
345 lib/DtTerm/TermView/Makefile
346 lib/DtTerm/util/Makefile
347 lib/DtTerm/TermPrim/Makefile
355 programs/backdrops/Makefile
357 programs/icons/Makefile
359 programs/dthelp/Makefile
360 programs/dthelp/dthelpgen/Makefile
361 programs/dthelp/dthelpprint/Makefile
362 programs/dthelp/parser/pass1/helptag/Makefile
363 programs/dthelp/parser/pass1/Makefile
364 programs/dthelp/parser/pass1/eltdef/Makefile
365 programs/dthelp/parser/pass1/build/Makefile
366 programs/dthelp/parser/Makefile
367 programs/dthelp/parser/canon1/Makefile
368 programs/dthelp/parser/pass2/Makefile
369 programs/dthelp/dthelpview/Makefile
371 programs/dsdm/Makefile
373 programs/dtmail/Makefile
374 programs/dtmail/dtmail/Makefile
375 programs/dtmail/MotifApp/Makefile
376 programs/dtmail/dtmailpr/Makefile
377 programs/dtmail/libDtMail/Makefile
378 programs/dtmail/libDtMail/RFC/Makefile
379 programs/dtmail/libDtMail/Common/Makefile
381 programs/dtpad/Makefile
383 programs/dtfile/Makefile
384 programs/dtfile/dtcopy/Makefile
386 programs/dtwm/Makefile
388 programs/dtlogin/Makefile
389 programs/dtlogin/config/Makefile
391 programs/dtsession/Makefile
393 programs/dthello/Makefile
395 programs/dtstyle/Makefile
397 programs/dtexec/Makefile
399 programs/dtdbcache/Makefile
401 programs/dticon/Makefile
403 programs/dtterm/Makefile
405 programs/dtcalc/Makefile
407 programs/dtaction/Makefile
409 programs/dtspcd/Makefile
411 programs/dtscreen/Makefile
413 programs/dtcm/Makefile
414 programs/dtcm/libDtCmP/Makefile
415 programs/dtcm/server/Makefile
416 programs/dtcm/dtcm/Makefile
418 programs/dtsearchpath/Makefile
419 programs/dtsearchpath/libCliSrv/Makefile
420 programs/dtsearchpath/dtsp/Makefile
421 programs/dtsearchpath/dtappg/Makefile