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
18 dnl global CDE versioning
24 AC_SUBST(CDE_VERSION_MAJOR)
25 AC_SUBST(CDE_VERSION_MINOR)
26 AC_SUBST(CDE_VERSION_MICRO)
28 dnl SOURCE_DEFINES - start with CDE project default
29 SOURCE_CPP_DEFINES="-DANSICPP -DMULTIBYTE -DNLS16"
31 dnl CPP_COMPILER_FLAGS - CPP/C/C++ compiler flags
34 dnl CXX_COMPILER_FLAGS - C++ compiler flags
37 dnl C_COMPILER_FLAGS - C compiler flags
41 dnl These OS version checks are deprecated and should be replaced with
42 dnl feature checks where appropriate
53 dnl For now, we need to fake the OSMAJORVERSION, OSMINORVERSION. In Linux
54 dnl this never mattered anyway as it was always the kernel version. We will
55 dnl choose defaults here. These need to be removed in the code in favor
56 dnl of actual checks for functionality. So this should be considered
67 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -D_POSIX_SOURCE \
68 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE"
69 CPP_COMPILER_FLAGS="-fno-strict-aliasing -Wno-write-strings \
103 AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
104 AM_CONDITIONAL([BSD], [test "$build_bsd" = "yes"])
105 AM_CONDITIONAL([FREEBSD], [test "$build_freebsd" = "yes"])
106 AM_CONDITIONAL([OPENBSD], [test "$build_openbsd" = "yes"])
107 AM_CONDITIONAL([NETBSD], [test "$build_netbsd" = "yes"])
108 AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"])
109 AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"])
110 AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"])
112 dnl Add osmajor/minor version to cppflags.
113 OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION"
115 dnl set CSRG_BASED define for the BSD's
116 if test "$build_bsd" = "yes"
118 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DCSRG_BASED"
128 case "${host_cpu}" in
149 AM_CONDITIONAL([I386], [test "$is_i386" = yes])
150 AM_CONDITIONAL([X86_64], [test "$is_x86_64" = yes])
151 AM_CONDITIONAL([ARM], [test "$is_arm" = yes])
152 AM_CONDITIONAL([SPARC], [test "$is_sparc" = yes])
153 AM_CONDITIONAL([MIPS], [test "is_mips" = yes])
154 AM_CONDITIONAL([PPC], [test "is_ppc" = yes])
156 dnl our main libraries
157 dnl we use single quotes so that $top_buildir is evaluated in the makefiles,
159 AC_SUBST(LIBTT, '$(top_builddir)/lib/tt/lib/libtt.la')
160 AC_SUBST(LIBXIN, '$(top_builddir)/lib/DtXinerama/libDtXinerama.la')
161 AC_SUBST(LIBWIDGET, '$(top_builddir)/lib/DtWidget/libDtWidget.la')
162 AC_SUBST(LIBTERM, '$(top_builddir)/lib/DtTerm/libDtTerm.la')
163 AC_SUBST(LIBSVC, '$(top_builddir)/lib/DtSvc/libDtSvc.la')
164 AC_SUBST(LIBSEARCH, '$(top_builddir)/lib/DtSearch/lbiDtSearch.la')
165 AC_SUBST(LIBPRINT, '$(top_builddir)/lib/DtPrint/libDtPrint.la')
166 AC_SUBST(LIBMRM, '$(top_builddir)/lib/DtMrm/libDtMrm.la')
167 AC_SUBST(LIBMMDB, '$(top_builddir)/lib/DtMmdb/libDtMmdb.la')
168 AC_SUBST(LIBHELP, '$(top_builddir)/lib/DtHelp/libDtHelp.la')
169 AC_SUBST(LIBCSA, '$(top_builddir)/lib/csa/libcsa.la')
171 AC_SUBST(DTCLIENTLIBS, '$(LIBPRINT) $(LIBHELP) $(LIBWIDGET) $(LIBSVC) \
174 dnl set up come convenience replacements for global include dirs
175 AC_SUBST(DT_INCDIR, '-I$(top_builddir)/include/Dt')
176 AC_SUBST(DTI_INCDIR, '-I$(top_builddir)/include/DtI')
177 AC_SUBST(TT_INCDIR, '-I$(top_builddir)/include/Tt')
178 AC_SUBST(XM_INCDIR, '-I$(top_builddir)/include/Xm')
179 AC_SUBST(CSA_INCDIR, '-I$(top_builddir)/include/csa')
180 AC_SUBST(SPC_INCDIR, '-I$(top_builddir)/include/SPC')
182 AC_ARG_ENABLE(japanese, [--build-japanese Build Japanese (default=no)])
183 AM_CONDITIONAL([JAPANESE], [test "build_japanese" = "yes"])
185 AC_ARG_ENABLE(german, [--build-german Build German (default=no)])
186 AM_CONDITIONAL([GERMAN], [test "build_german" = "yes"])
188 AC_ARG_ENABLE(italian, [--build-italian Build Italian (default=no)])
189 AM_CONDITIONAL([ITALIAN], [test "build_italian" = "yes"])
191 AC_ARG_ENABLE(french, [--build-french Build French (default=no)])
192 AM_CONDITIONAL([FRENCH], [test "build_french" = "yes"])
194 AC_ARG_ENABLE(spanish, --build-spanish Build Spanish (default=no)])
195 AM_CONDITIONAL([SPANISH], [test "build_spanish" = "yes"])
203 dnl these should be configurable someday...
204 CDE_INSTALLATION_TOP="$ac_default_prefix"
205 CDE_LOGFILES_TOP=/var/dt
206 CDE_CONFIGURATION_TOP=/etc/dt
209 AC_SUBST(CDE_INSTALLATION_TOP)
210 AC_SUBST(CDE_CONFIGURATION_TOP)
211 AC_SUBST(CDE_LOGFILES_TOP)
212 AC_SUBST(CDE_USER_TOP)
219 dnl we need a real preprocessor, not gcc -E. We will call it GENCPP. We will
220 dnl go with BSD's tradcpp here...
221 AC_SUBST(GENCPP, '$(top_builddir)/util/tradcpp/tradcpp')
241 AC_C_FLEXIBLE_ARRAY_MEMBER
253 dnl programs with full paths
255 AC_PATH_PROG(KSH, ksh)
256 AC_PATH_PROG(XRDB, xrdb)
259 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
260 AC_CHECK_PROGS(MKFONTDIR, mkfontdir)
261 AC_CHECK_PROGS(GZIP, gzip)
262 AC_CHECK_PROGS(M4, m4)
263 AC_CHECK_PROGS(RPCGEN, rpcgen)
267 AC_CHECK_HEADERS([locale.h])
270 AC_CHECK_LIB(m, cosf)
271 AC_CHECK_LIB(crypt, crypt)
272 dnl this should be configurable, for now it is required
273 AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
274 [SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XINERAMA"],
275 [AC_MSG_ERROR([libXinerama not found])])
277 dnl Special check for tirpc...
278 AC_CHECK_LIB(tirpc, svc_register,
279 [CFLAGS="${CFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
280 CXXFLAGS="${CXXFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
284 dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
287 AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"])
288 AC_CHECK_LIB(Xau, XauReadAuth, [XTOOLLIB="-lXau ${XTOOLLIB}"])
289 AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"])
290 AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"])
291 AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"])
292 AC_CHECK_LIB(Xm, XmTextSetString, [XTOOLLIB="-lXm ${XTOOLLIB}"])
295 dnl set CPPFLAGS, CFLAGS, and CXXFLAGS.
296 dnl The Autoconf manual says that these are user variables and
297 dnl shouldn't be modified. It suggests that you create a special
298 dnl variable and presumably add those to your Makefile.am files. We
299 dnl have 192 of these currently, so... The user will just have to
300 dnl deal, or modify them here directly.
301 CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
302 CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${PTHREAD_CFLAGS}"
303 CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${PTHREAD_CFLAGS}"
304 LIBS="${LIBS} ${PTHREAD_LIBS}"
306 dnl All of the makefiles we need to generate go here...
311 util/tradcpp/Makefile
315 lib/DtXinerama/Makefile
318 lib/tt/mini_isam/Makefile
321 lib/tt/lib/api/Makefile
322 lib/tt/lib/api/dnd/Makefile
323 lib/tt/lib/api/c/Makefile
324 lib/tt/lib/tttk/Makefile
325 lib/tt/lib/db/Makefile
326 lib/tt/lib/mp/Makefile
327 lib/tt/lib/util/Makefile
329 lib/tt/bin/shell/Makefile
330 lib/tt/bin/ttauth/Makefile
331 lib/tt/bin/scripts/Makefile
332 lib/tt/bin/tttar/Makefile
333 lib/tt/bin/tt_type_comp/Makefile
334 lib/tt/bin/tttrace/Makefile
335 lib/tt/bin/dbck/Makefile
336 lib/tt/bin/ttdbserverd/Makefile
337 lib/tt/bin/ttsession/Makefile
341 lib/DtSearch/Makefile
342 lib/DtSearch/raima/Makefile
344 lib/DtWidget/Makefile
347 lib/DtHelp/il/Makefile
351 lib/DtTerm/Term/Makefile
353 lib/DtTerm/TermView/Makefile
354 lib/DtTerm/util/Makefile
355 lib/DtTerm/TermPrim/Makefile
363 programs/backdrops/Makefile
365 programs/icons/Makefile
367 programs/dthelp/Makefile
368 programs/dthelp/dthelpgen/Makefile
369 programs/dthelp/dthelpprint/Makefile
370 programs/dthelp/parser/pass1/helptag/Makefile
371 programs/dthelp/parser/pass1/Makefile
372 programs/dthelp/parser/pass1/eltdef/Makefile
373 programs/dthelp/parser/pass1/build/Makefile
374 programs/dthelp/parser/Makefile
375 programs/dthelp/parser/canon1/Makefile
376 programs/dthelp/parser/pass2/Makefile
377 programs/dthelp/dthelpview/Makefile
379 programs/dsdm/Makefile
381 programs/dtmail/Makefile
382 programs/dtmail/dtmail/Makefile
383 programs/dtmail/MotifApp/Makefile
384 programs/dtmail/dtmailpr/Makefile
385 programs/dtmail/libDtMail/Makefile
386 programs/dtmail/libDtMail/RFC/Makefile
387 programs/dtmail/libDtMail/Common/Makefile
389 programs/dtpad/Makefile
391 programs/dtfile/Makefile
392 programs/dtfile/dtcopy/Makefile
394 programs/dtwm/Makefile
396 programs/dtlogin/Makefile
397 programs/dtlogin/config/Makefile
399 programs/dtsession/Makefile
401 programs/dthello/Makefile
403 programs/dtstyle/Makefile
405 programs/dtexec/Makefile
407 programs/dtdbcache/Makefile
409 programs/dticon/Makefile
411 programs/dtterm/Makefile
413 programs/dtcalc/Makefile
415 programs/dtaction/Makefile
417 programs/dtspcd/Makefile
419 programs/dtscreen/Makefile
421 programs/dtcm/Makefile
422 programs/dtcm/libDtCmP/Makefile
423 programs/dtcm/server/Makefile
424 programs/dtcm/dtcm/Makefile
426 programs/dtsearchpath/Makefile
427 programs/dtsearchpath/libCliSrv/Makefile
428 programs/dtsearchpath/dtsp/Makefile
429 programs/dtsearchpath/dtappg/Makefile
431 programs/dtappintegrate/Makefile
433 programs/dtprintegrate/Makefile
435 programs/dtconfig/Makefile
436 programs/dtconfig/sun/Makefile
438 programs/dtcreate/Makefile
440 programs/dtprintinfo/Makefile
442 programs/fontaliases/Makefile
443 programs/fontaliases/bdf/Makefile
444 programs/fontaliases/linux/Makefile
445 programs/fontaliases/linux/C/Makefile
446 programs/fontaliases/linux/en_US.UTF-8/Makefile
447 programs/fontaliases/sun/Makefile
448 programs/fontaliases/sun/C/Makefile
449 programs/fontaliases/netbsd/Makefile
450 programs/fontaliases/netbsd/C/Makefile
451 programs/fontaliases/openbsd/Makefile
452 programs/fontaliases/openbsd/C/Makefile
453 programs/fontaliases/freebsd/Makefile
454 programs/fontaliases/freebsd/C/Makefile
456 programs/dtdspmsg/Makefile
458 programs/dtimsstart/Makefile
460 programs/dtpdm/Makefile
462 programs/dtsr/Makefile
464 programs/dtpdmd/Makefile
466 programs/types/Makefile
468 programs/tttypes/Makefile
470 programs/util/Makefile
471 programs/util/dttypes/Makefile
473 programs/dtopen/Makefile
475 programs/localized/Makefile
476 programs/localized/util/Makefile
477 programs/localized/C/Makefile
478 programs/localized/C/app-defaults/Makefile
479 programs/localized/de_DE.UTF-8/Makefile
480 programs/localized/de_DE.UTF-8/app-defaults/Makefile
481 programs/localized/fr_FR.UTF-8/Makefile
482 programs/localized/fr_FR.UTF-8/app-defaults/Makefile
483 programs/localized/it_IT.UTF-8/Makefile
484 programs/localized/it_IT.UTF-8/app-defaults/Makefile
485 programs/localized/es_ES.UTF-8/Makefile
486 programs/localized/es_ES.UTF-8/app-defaults/Makefile