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)
226 dnl This variable will contain a list of programs that were not found,
227 dnl but are required to build CDE. At the end, if the variable is
228 dnl non-empty, an error message will be printed, listing the missing
229 dnl programs. We don't bother with the simple expected commands like
236 dnl we need a real preprocessor, not gcc -E. We will call it GENCPP.
237 dnl We will go with BSD's tradcpp here... This is used for
238 dnl pre-processing during building of CDE - in the way imake used to
239 dnl do. This is not a replacement for cpp, used at runtime by
240 dnl software such as tt_type_comp.
241 AC_SUBST(GENCPP, '$(top_builddir)/util/tradcpp/tradcpp')
245 dnl make sure it's installed
247 if test -z "$ac_cv_prog_YACC"; then
248 AC_MSG_ERROR([please install bison or yacc])
252 if test -z "$ac_cv_prog_LEX"; then
253 AC_MSG_ERROR([please install flex or lex])
271 AC_C_FLEXIBLE_ARRAY_MEMBER
283 dnl programs with full paths
285 AC_PATH_PROG(KSH, ksh)
286 if test -z "$ac_cv_path_KSH"; then
287 MISSING_PROGS="ksh ${MISSING_PROGS}"
290 AC_PATH_PROG(XRDB, xrdb)
291 if test -z "$ac_cv_path_XRDB"; then
292 MISSING_PROGS="xrdb ${MISSING_PROGS}"
295 dnl we need to use cpp for some things, like tooltalk and other
296 dnl runtime uses. So look for the system's cpp. NOTE: this is NOT
297 dnl the CPP (gcc -E) set by AC_PROG_CPP. At this point I don't know
298 dnl if we should even bother looking for that as we can't really use
300 AC_PATH_PROG(CPP_PROGRAM, cpp, ,
301 [/lib:/usr/bin:/usr/ccs/lib/:/usr/lib:/usr/libexec:/opt/langtools/lbin:$PATH])
302 if test -z "$ac_cv_path_CPP_PROGRAM"; then
303 MISSING_PROGS="cpp ${MISSING_PROGS}"
306 dnl major external program dependencies
307 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
308 if test -z "$ac_cv_prog_BDFTOPCF"; then
309 MISSING_PROGS="bdftopcf ${MISSING_PROGS}"
311 AC_CHECK_PROGS(MKFONTDIR, mkfontdir)
312 if test -z "$ac_cv_prog_MKFONTDIR"; then
313 MISSING_PROGS="mkfontdir ${MISSING_PROGS}"
315 AC_CHECK_PROGS(GZIP, gzip)
316 if test -z "$ac_cv_prog_GZIP"; then
317 MISSING_PROGS="gzip ${MISSING_PROGS}"
319 AC_CHECK_PROGS(M4, m4)
320 if test -z "$ac_cv_prog_M4"; then
321 MISSING_PROGS="m4 ${MISSING_PROGS}"
323 AC_CHECK_PROGS(RPCGEN, rpcgen)
324 if test -z "$ac_cv_prog_RPCGEN"; then
325 MISSING_PROGS="rpcgen ${MISSING_PROGS}"
327 AC_CHECK_PROGS(GENCAT, gencat)
328 if test -z "$ac_cv_prog_GENCAT"; then
329 MISSING_PROGS="gencat ${MISSING_PROGS}"
334 AC_CHECK_HEADERS([locale.h])
335 AC_CHECK_HEADERS([jpeglib.h], ,[AC_MSG_ERROR([libjpeg headers not found])])
338 AC_CHECK_LIB(m, cosf)
339 AC_CHECK_LIB(crypt, crypt)
340 dnl this should be configurable, for now it is required
341 AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
342 [SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XINERAMA"],
343 [AC_MSG_ERROR([libXinerama not found])], $X_LIBS)
345 dnl Special check for tirpc...
346 AC_CHECK_LIB(tirpc, svc_register,
347 [CFLAGS="${CFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
348 CXXFLAGS="${CXXFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
352 dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
355 AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"], , $X_LIBS)
356 AC_CHECK_LIB(Xau, XauReadAuth, [XTOOLLIB="-lXau ${XTOOLLIB}"], , $X_LIBS)
357 AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"], , $X_LIBS)
358 AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"], , $X_LIBS)
359 AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"], , $X_LIBS)
360 AC_CHECK_LIB(Xm, XmTextSetString, [XTOOLLIB="-lXm ${XTOOLLIB}"], , [$MOTIF_LIB $X_LIBS])
361 XTOOLLIB="${X_LIBS} ${MOTIF_LIB} ${X_EXTRA_LIBS} ${X_PRE_LIBS} ${XTOOLLIB}"
364 dnl check MISSING_PROGS - error out here if there's stuff in it.
366 if test -n "$MISSING_PROGS"; then
367 AC_MSG_ERROR([Please install the following REQUIRED programs: ${MISSING_PROGS}])
372 dnl set CPPFLAGS, CFLAGS, and CXXFLAGS.
373 dnl The Autoconf manual says that these are user variables and
374 dnl shouldn't be modified. It suggests that you create a special
375 dnl variable and presumably add those to your Makefile.am files. We
376 dnl have 192 of these currently, so... The user will just have to
377 dnl deal, or modify them here directly.
378 CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
379 CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
380 CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
381 LIBS="${X_LIBS} ${LIBS} ${PTHREAD_LIBS}"
383 dnl All of the makefiles we need to generate go here...
388 util/tradcpp/Makefile
392 lib/DtXinerama/Makefile
395 lib/tt/mini_isam/Makefile
398 lib/tt/lib/api/Makefile
399 lib/tt/lib/api/dnd/Makefile
400 lib/tt/lib/api/c/Makefile
401 lib/tt/lib/tttk/Makefile
402 lib/tt/lib/db/Makefile
403 lib/tt/lib/mp/Makefile
404 lib/tt/lib/util/Makefile
406 lib/tt/bin/shell/Makefile
407 lib/tt/bin/ttauth/Makefile
408 lib/tt/bin/scripts/Makefile
409 lib/tt/bin/tttar/Makefile
410 lib/tt/bin/tt_type_comp/Makefile
411 lib/tt/bin/tttrace/Makefile
412 lib/tt/bin/dbck/Makefile
413 lib/tt/bin/ttdbserverd/Makefile
414 lib/tt/bin/ttsession/Makefile
418 lib/DtSearch/Makefile
419 lib/DtSearch/raima/Makefile
421 lib/DtWidget/Makefile
424 lib/DtHelp/il/Makefile
428 lib/DtTerm/Term/Makefile
430 lib/DtTerm/TermView/Makefile
431 lib/DtTerm/util/Makefile
432 lib/DtTerm/TermPrim/Makefile
440 programs/backdrops/Makefile
442 programs/palettes/Makefile
444 programs/icons/Makefile
446 programs/dsdm/Makefile
448 programs/dtmail/Makefile
449 programs/dtmail/dtmail/Makefile
450 programs/dtmail/MotifApp/Makefile
451 programs/dtmail/dtmailpr/Makefile
452 programs/dtmail/libDtMail/Makefile
453 programs/dtmail/libDtMail/RFC/Makefile
454 programs/dtmail/libDtMail/Common/Makefile
456 programs/dtpad/Makefile
458 programs/dtfile/Makefile
459 programs/dtfile/dtcopy/Makefile
461 programs/dtwm/Makefile
463 programs/dtlogin/Makefile
464 programs/dtlogin/config/Makefile
466 programs/dtsession/Makefile
468 programs/dthello/Makefile
470 programs/dtstyle/Makefile
472 programs/dtexec/Makefile
474 programs/dtdbcache/Makefile
476 programs/dticon/Makefile
478 programs/dtterm/Makefile
480 programs/dtcalc/Makefile
482 programs/dtaction/Makefile
484 programs/dtspcd/Makefile
486 programs/dtscreen/Makefile
488 programs/dtcm/Makefile
489 programs/dtcm/libDtCmP/Makefile
490 programs/dtcm/server/Makefile
491 programs/dtcm/dtcm/Makefile
493 programs/dtsearchpath/Makefile
494 programs/dtsearchpath/libCliSrv/Makefile
495 programs/dtsearchpath/dtsp/Makefile
496 programs/dtsearchpath/dtappg/Makefile
498 programs/dtappintegrate/Makefile
500 programs/dtprintegrate/Makefile
502 programs/dtconfig/Makefile
503 programs/dtconfig/sun/Makefile
505 programs/dtcreate/Makefile
507 programs/dtprintinfo/Makefile
509 programs/fontaliases/Makefile
510 programs/fontaliases/bdf/Makefile
511 programs/fontaliases/linux/Makefile
512 programs/fontaliases/linux/C/Makefile
513 programs/fontaliases/linux/en_US.UTF-8/Makefile
514 programs/fontaliases/sun/Makefile
515 programs/fontaliases/sun/C/Makefile
516 programs/fontaliases/netbsd/Makefile
517 programs/fontaliases/netbsd/C/Makefile
518 programs/fontaliases/openbsd/Makefile
519 programs/fontaliases/openbsd/C/Makefile
520 programs/fontaliases/freebsd/Makefile
521 programs/fontaliases/freebsd/C/Makefile
523 programs/dtdspmsg/Makefile
525 programs/dtimsstart/Makefile
527 programs/dtpdm/Makefile
529 programs/dtsr/Makefile
531 programs/dtpdmd/Makefile
533 programs/types/Makefile
535 programs/tttypes/Makefile
537 programs/util/Makefile
538 programs/util/dttypes/Makefile
540 programs/dtopen/Makefile
542 programs/localized/Makefile
543 programs/localized/util/Makefile
544 programs/localized/C/Makefile
545 programs/localized/C/app-defaults/Makefile
546 programs/localized/C/config/Makefile
547 programs/localized/C/backdrops/Makefile
548 programs/localized/C/types/Makefile
549 programs/localized/C/palettes/Makefile
550 programs/localized/C/msg/Makefile
551 programs/localized/de_DE.UTF-8/Makefile
552 programs/localized/de_DE.UTF-8/app-defaults/Makefile
553 programs/localized/de_DE.UTF-8/config/Makefile
554 programs/localized/de_DE.UTF-8/backdrops/Makefile
555 programs/localized/de_DE.UTF-8/types/Makefile
556 programs/localized/de_DE.UTF-8/palettes/Makefile
557 programs/localized/de_DE.UTF-8/msg/Makefile
558 programs/localized/fr_FR.UTF-8/Makefile
559 programs/localized/fr_FR.UTF-8/app-defaults/Makefile
560 programs/localized/fr_FR.UTF-8/config/Makefile
561 programs/localized/fr_FR.UTF-8/backdrops/Makefile
562 programs/localized/fr_FR.UTF-8/types/Makefile
563 programs/localized/fr_FR.UTF-8/palettes/Makefile
564 programs/localized/fr_FR.UTF-8/msg/Makefile
565 programs/localized/it_IT.UTF-8/Makefile
566 programs/localized/it_IT.UTF-8/app-defaults/Makefile
567 programs/localized/it_IT.UTF-8/config/Makefile
568 programs/localized/it_IT.UTF-8/backdrops/Makefile
569 programs/localized/it_IT.UTF-8/types/Makefile
570 programs/localized/it_IT.UTF-8/palettes/Makefile
571 programs/localized/it_IT.UTF-8/msg/Makefile
572 programs/localized/es_ES.UTF-8/Makefile
573 programs/localized/es_ES.UTF-8/app-defaults/Makefile
574 programs/localized/es_ES.UTF-8/config/Makefile
575 programs/localized/es_ES.UTF-8/backdrops/Makefile
576 programs/localized/es_ES.UTF-8/types/Makefile
577 programs/localized/es_ES.UTF-8/palettes/Makefile
578 programs/localized/es_ES.UTF-8/msg/Makefile
584 dnl not currently building
585 dnl programs/dthelp/Makefile
586 dnl programs/dthelp/dthelpgen/Makefile
587 dnl programs/dthelp/dthelpprint/Makefile
588 dnl programs/dthelp/parser/pass1/helptag/Makefile
589 dnl programs/dthelp/parser/pass1/Makefile
590 dnl programs/dthelp/parser/pass1/eltdef/Makefile
591 dnl programs/dthelp/parser/pass1/build/Makefile
592 dnl programs/dthelp/parser/Makefile
593 dnl programs/dthelp/parser/canon1/Makefile
594 dnl programs/dthelp/parser/pass2/Makefile
595 dnl programs/dthelp/dthelpview/Makefile