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 dnl These must be up here for the compiler search list to actually work
7 AC_PROG_CC([cc gcc clang])
8 AC_PROG_CXX([c++ g++ clang++])
11 AC_PREFIX_DEFAULT(/usr/dt)
13 AC_ENABLE_STATIC([no])
17 dnl todo: determine what version of autoconf we depend on
23 dnl global CDE versioning
29 AC_SUBST(CDE_VERSION_MAJOR)
30 AC_SUBST(CDE_VERSION_MINOR)
31 AC_SUBST(CDE_VERSION_MICRO)
33 dnl SOURCE_DEFINES - start with CDE project default
34 SOURCE_CPP_DEFINES="-DANSICPP -DMULTIBYTE -DNLS16"
36 dnl CPP_COMPILER_FLAGS - CPP/C/C++ compiler flags
39 dnl CXX_COMPILER_FLAGS - C++ compiler flags
42 dnl C_COMPILER_FLAGS - C compiler flags
46 dnl These OS version checks are deprecated and should be replaced with
47 dnl feature checks where appropriate
58 dnl For now, we need to fake the OSMAJORVERSION, OSMINORVERSION. In Linux
59 dnl this never mattered anyway as it was always the kernel version. We will
60 dnl choose defaults here. These need to be removed in the code in favor
61 dnl of actual checks for functionality. So this should be considered
67 dnl locations of libs/includes if not in 'standard' places like on
77 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -D_POSIX_SOURCE \
78 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE"
79 CPP_COMPILER_FLAGS="-fno-strict-aliasing -Wno-write-strings \
113 AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
114 AM_CONDITIONAL([BSD], [test "$bsd" = "yes"])
115 AM_CONDITIONAL([FREEBSD], [test "$build_freebsd" = "yes"])
116 AM_CONDITIONAL([OPENBSD], [test "$build_openbsd" = "yes"])
117 AM_CONDITIONAL([NETBSD], [test "$build_netbsd" = "yes"])
118 AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"])
119 AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"])
120 AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"])
122 dnl Add osmajor/minor version to cppflags.
123 OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION"
125 dnl set CSRG_BASED define for the BSD's
126 if test "$bsd" = "yes"
128 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DCSRG_BASED"
129 MOTIF_LIB="-L/usr/local/lib -R/usr/local/lib"
130 MOTIF_INC="-I/usr/local/include -I/usr/X11R6/include/freetype2"
140 case "${host_cpu}" in
161 AM_CONDITIONAL([I386], [test "$is_i386" = yes])
162 AM_CONDITIONAL([X86_64], [test "$is_x86_64" = yes])
163 AM_CONDITIONAL([ARM], [test "$is_arm" = yes])
164 AM_CONDITIONAL([SPARC], [test "$is_sparc" = yes])
165 AM_CONDITIONAL([MIPS], [test "is_mips" = yes])
166 AM_CONDITIONAL([PPC], [test "is_ppc" = yes])
168 dnl our main libraries
169 dnl we use single quotes so that $top_buildir is evaluated in the makefiles,
171 AC_SUBST(LIBTT, '$(top_builddir)/lib/tt/lib/libtt.la')
172 AC_SUBST(LIBXIN, '$(top_builddir)/lib/DtXinerama/libDtXinerama.la')
173 AC_SUBST(LIBWIDGET, '$(top_builddir)/lib/DtWidget/libDtWidget.la')
174 AC_SUBST(LIBTERM, '$(top_builddir)/lib/DtTerm/libDtTerm.la')
175 AC_SUBST(LIBSVC, '$(top_builddir)/lib/DtSvc/libDtSvc.la')
176 AC_SUBST(LIBSEARCH, '$(top_builddir)/lib/DtSearch/lbiDtSearch.la')
177 AC_SUBST(LIBPRINT, '$(top_builddir)/lib/DtPrint/libDtPrint.la')
178 AC_SUBST(LIBMRM, '$(top_builddir)/lib/DtMrm/libDtMrm.la')
179 AC_SUBST(LIBMMDB, '$(top_builddir)/lib/DtMmdb/libDtMmdb.la')
180 AC_SUBST(LIBHELP, '$(top_builddir)/lib/DtHelp/libDtHelp.la')
181 AC_SUBST(LIBCSA, '$(top_builddir)/lib/csa/libcsa.la')
183 AC_SUBST(DTCLIENTLIBS, '$(LIBPRINT) $(LIBHELP) $(LIBWIDGET) $(LIBSVC) \
186 dnl set up come convenience replacements for global include dirs
187 AC_SUBST(DT_INCDIR, '-I$(top_builddir)/include/Dt')
188 AC_SUBST(DTI_INCDIR, '-I$(top_builddir)/include/DtI')
189 AC_SUBST(TT_INCDIR, '-I$(top_builddir)/include/Tt')
190 AC_SUBST(XM_INCDIR, '-I$(top_builddir)/include/Xm')
191 AC_SUBST(CSA_INCDIR, '-I$(top_builddir)/include/csa')
192 AC_SUBST(SPC_INCDIR, '-I$(top_builddir)/include/SPC')
194 AC_ARG_ENABLE(japanese, [--build-japanese Build Japanese (default=no)])
195 AM_CONDITIONAL([JAPANESE], [test "build_japanese" = "yes"])
197 AC_ARG_ENABLE(german, [--build-german Build German (default=no)])
198 AM_CONDITIONAL([GERMAN], [test "build_german" = "yes"])
200 AC_ARG_ENABLE(italian, [--build-italian Build Italian (default=no)])
201 AM_CONDITIONAL([ITALIAN], [test "build_italian" = "yes"])
203 AC_ARG_ENABLE(french, [--build-french Build French (default=no)])
204 AM_CONDITIONAL([FRENCH], [test "build_french" = "yes"])
206 AC_ARG_ENABLE(spanish, --build-spanish Build Spanish (default=no)])
207 AM_CONDITIONAL([SPANISH], [test "build_spanish" = "yes"])
215 dnl these should be configurable someday...
216 CDE_INSTALLATION_TOP="$ac_default_prefix"
217 CDE_LOGFILES_TOP=/var/dt
218 CDE_CONFIGURATION_TOP=/etc/dt
221 AC_SUBST(CDE_INSTALLATION_TOP)
222 AC_SUBST(CDE_CONFIGURATION_TOP)
223 AC_SUBST(CDE_LOGFILES_TOP)
224 AC_SUBST(CDE_USER_TOP)
228 dnl we need a real preprocessor, not gcc -E. We will call it GENCPP.
229 dnl We will go with BSD's tradcpp here... This is used for
230 dnl pre-processing during building of CDE - in the way imake used to
231 dnl do. This is not a replacement for cpp, used at runtime by
232 dnl software such as tt_type_comp.
233 AC_SUBST(GENCPP, '$(top_builddir)/util/tradcpp/tradcpp')
253 AC_C_FLEXIBLE_ARRAY_MEMBER
265 dnl programs with full paths
267 AC_PATH_PROG(KSH, ksh)
268 AC_PATH_PROG(XRDB, xrdb)
269 dnl we need to use cpp for some things, like tooltalk and other
270 dnl runtime uses. So look for the system's cpp. NOTE: this is NOT
271 dnl the CPP (gcc -E) set by AC_PROG_CPP. At this point I don't know
272 dnl if we should even bother looking for that as we can't really use
274 AC_PATH_PROG(CPP_PROGRAM, cpp, ,
275 [/lib:/usr/bin:/usr/ccs/lib/:/usr/lib:/usr/libexec:/opt/langtools/lbin:$PATH])
278 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
279 AC_CHECK_PROGS(MKFONTDIR, mkfontdir)
280 AC_CHECK_PROGS(GZIP, gzip)
281 AC_CHECK_PROGS(M4, m4)
282 AC_CHECK_PROGS(RPCGEN, rpcgen)
283 AC_CHECK_PROGS(GENCAT, gencat)
287 AC_CHECK_HEADERS([locale.h])
290 AC_CHECK_LIB(m, cosf)
291 AC_CHECK_LIB(crypt, crypt)
292 dnl this should be configurable, for now it is required
293 AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
294 [SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XINERAMA"],
295 [AC_MSG_ERROR([libXinerama not found])], $X_LIBS)
297 dnl Special check for tirpc...
298 AC_CHECK_LIB(tirpc, svc_register,
299 [CFLAGS="${CFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
300 CXXFLAGS="${CXXFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
304 dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
307 AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"], , $X_LIBS)
308 AC_CHECK_LIB(Xau, XauReadAuth, [XTOOLLIB="-lXau ${XTOOLLIB}"], , $X_LIBS)
309 AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"], , $X_LIBS)
310 AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"], , $X_LIBS)
311 AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"], , $X_LIBS)
312 AC_CHECK_LIB(Xm, XmTextSetString, [XTOOLLIB="-lXm ${XTOOLLIB}"], , [$MOTIF_LIB $X_LIBS])
313 XTOOLLIB="$X_LIBS $MOTIF_LIB ${XTOOLLIB}"
316 dnl set CPPFLAGS, CFLAGS, and CXXFLAGS.
317 dnl The Autoconf manual says that these are user variables and
318 dnl shouldn't be modified. It suggests that you create a special
319 dnl variable and presumably add those to your Makefile.am files. We
320 dnl have 192 of these currently, so... The user will just have to
321 dnl deal, or modify them here directly.
322 CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
323 CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
324 CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
325 LIBS="${X_LIBS} ${LIBS} ${PTHREAD_LIBS}"
327 dnl All of the makefiles we need to generate go here...
332 util/tradcpp/Makefile
336 lib/DtXinerama/Makefile
339 lib/tt/mini_isam/Makefile
342 lib/tt/lib/api/Makefile
343 lib/tt/lib/api/dnd/Makefile
344 lib/tt/lib/api/c/Makefile
345 lib/tt/lib/tttk/Makefile
346 lib/tt/lib/db/Makefile
347 lib/tt/lib/mp/Makefile
348 lib/tt/lib/util/Makefile
350 lib/tt/bin/shell/Makefile
351 lib/tt/bin/ttauth/Makefile
352 lib/tt/bin/scripts/Makefile
353 lib/tt/bin/tttar/Makefile
354 lib/tt/bin/tt_type_comp/Makefile
355 lib/tt/bin/tttrace/Makefile
356 lib/tt/bin/dbck/Makefile
357 lib/tt/bin/ttdbserverd/Makefile
358 lib/tt/bin/ttsession/Makefile
362 lib/DtSearch/Makefile
363 lib/DtSearch/raima/Makefile
365 lib/DtWidget/Makefile
368 lib/DtHelp/il/Makefile
372 lib/DtTerm/Term/Makefile
374 lib/DtTerm/TermView/Makefile
375 lib/DtTerm/util/Makefile
376 lib/DtTerm/TermPrim/Makefile
384 programs/backdrops/Makefile
386 programs/palettes/Makefile
388 programs/icons/Makefile
390 programs/dthelp/Makefile
391 programs/dthelp/dthelpgen/Makefile
392 programs/dthelp/dthelpprint/Makefile
393 programs/dthelp/parser/pass1/helptag/Makefile
394 programs/dthelp/parser/pass1/Makefile
395 programs/dthelp/parser/pass1/eltdef/Makefile
396 programs/dthelp/parser/pass1/build/Makefile
397 programs/dthelp/parser/Makefile
398 programs/dthelp/parser/canon1/Makefile
399 programs/dthelp/parser/pass2/Makefile
400 programs/dthelp/dthelpview/Makefile
402 programs/dsdm/Makefile
404 programs/dtmail/Makefile
405 programs/dtmail/dtmail/Makefile
406 programs/dtmail/MotifApp/Makefile
407 programs/dtmail/dtmailpr/Makefile
408 programs/dtmail/libDtMail/Makefile
409 programs/dtmail/libDtMail/RFC/Makefile
410 programs/dtmail/libDtMail/Common/Makefile
412 programs/dtpad/Makefile
414 programs/dtfile/Makefile
415 programs/dtfile/dtcopy/Makefile
417 programs/dtwm/Makefile
419 programs/dtlogin/Makefile
420 programs/dtlogin/config/Makefile
422 programs/dtsession/Makefile
424 programs/dthello/Makefile
426 programs/dtstyle/Makefile
428 programs/dtexec/Makefile
430 programs/dtdbcache/Makefile
432 programs/dticon/Makefile
434 programs/dtterm/Makefile
436 programs/dtcalc/Makefile
438 programs/dtaction/Makefile
440 programs/dtspcd/Makefile
442 programs/dtscreen/Makefile
444 programs/dtcm/Makefile
445 programs/dtcm/libDtCmP/Makefile
446 programs/dtcm/server/Makefile
447 programs/dtcm/dtcm/Makefile
449 programs/dtsearchpath/Makefile
450 programs/dtsearchpath/libCliSrv/Makefile
451 programs/dtsearchpath/dtsp/Makefile
452 programs/dtsearchpath/dtappg/Makefile
454 programs/dtappintegrate/Makefile
456 programs/dtprintegrate/Makefile
458 programs/dtconfig/Makefile
459 programs/dtconfig/sun/Makefile
461 programs/dtcreate/Makefile
463 programs/dtprintinfo/Makefile
465 programs/fontaliases/Makefile
466 programs/fontaliases/bdf/Makefile
467 programs/fontaliases/linux/Makefile
468 programs/fontaliases/linux/C/Makefile
469 programs/fontaliases/linux/en_US.UTF-8/Makefile
470 programs/fontaliases/sun/Makefile
471 programs/fontaliases/sun/C/Makefile
472 programs/fontaliases/netbsd/Makefile
473 programs/fontaliases/netbsd/C/Makefile
474 programs/fontaliases/openbsd/Makefile
475 programs/fontaliases/openbsd/C/Makefile
476 programs/fontaliases/freebsd/Makefile
477 programs/fontaliases/freebsd/C/Makefile
479 programs/dtdspmsg/Makefile
481 programs/dtimsstart/Makefile
483 programs/dtpdm/Makefile
485 programs/dtsr/Makefile
487 programs/dtpdmd/Makefile
489 programs/types/Makefile
491 programs/tttypes/Makefile
493 programs/util/Makefile
494 programs/util/dttypes/Makefile
496 programs/dtopen/Makefile
498 programs/localized/Makefile
499 programs/localized/util/Makefile
500 programs/localized/C/Makefile
501 programs/localized/C/app-defaults/Makefile
502 programs/localized/C/config/Makefile
503 programs/localized/C/backdrops/Makefile
504 programs/localized/C/types/Makefile
505 programs/localized/C/palettes/Makefile
506 programs/localized/C/msg/Makefile
507 programs/localized/de_DE.UTF-8/Makefile
508 programs/localized/de_DE.UTF-8/app-defaults/Makefile
509 programs/localized/de_DE.UTF-8/config/Makefile
510 programs/localized/de_DE.UTF-8/backdrops/Makefile
511 programs/localized/de_DE.UTF-8/types/Makefile
512 programs/localized/de_DE.UTF-8/palettes/Makefile
513 programs/localized/de_DE.UTF-8/msg/Makefile
514 programs/localized/fr_FR.UTF-8/Makefile
515 programs/localized/fr_FR.UTF-8/app-defaults/Makefile
516 programs/localized/fr_FR.UTF-8/config/Makefile
517 programs/localized/fr_FR.UTF-8/backdrops/Makefile
518 programs/localized/fr_FR.UTF-8/types/Makefile
519 programs/localized/fr_FR.UTF-8/palettes/Makefile
520 programs/localized/fr_FR.UTF-8/msg/Makefile
521 programs/localized/it_IT.UTF-8/Makefile
522 programs/localized/it_IT.UTF-8/app-defaults/Makefile
523 programs/localized/it_IT.UTF-8/config/Makefile
524 programs/localized/it_IT.UTF-8/backdrops/Makefile
525 programs/localized/it_IT.UTF-8/types/Makefile
526 programs/localized/it_IT.UTF-8/palettes/Makefile
527 programs/localized/it_IT.UTF-8/msg/Makefile
528 programs/localized/es_ES.UTF-8/Makefile
529 programs/localized/es_ES.UTF-8/app-defaults/Makefile
530 programs/localized/es_ES.UTF-8/config/Makefile
531 programs/localized/es_ES.UTF-8/backdrops/Makefile
532 programs/localized/es_ES.UTF-8/types/Makefile
533 programs/localized/es_ES.UTF-8/palettes/Makefile
534 programs/localized/es_ES.UTF-8/msg/Makefile