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"
130 MOTIF_INC="-I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/local/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([german],
195 AS_HELP_STRING([--enable-german], [Build German locale (default=no)]),
196 [enable_de="yes"], [enable_de=""]
198 AM_CONDITIONAL([GERMAN], [test -n "$enable_de"])
200 AC_ARG_ENABLE([italian],
201 AS_HELP_STRING([--enable-italian], [Build Italian locale (default=no)]),
202 [enable_it="yes"], [enable_it=""]
204 AM_CONDITIONAL([ITALIAN], [test -n "$enable_it"])
206 AC_ARG_ENABLE([french],
207 AS_HELP_STRING([--enable-french], [Build French locale (default=no)]),
208 [enable_fr="yes"], [enable_fr=""]
210 AM_CONDITIONAL([FRENCH], [test -n "$enable_fr"])
212 AC_ARG_ENABLE([spanish],
213 AS_HELP_STRING([--enable-spanish], [Build Spanish locale (default=no)]),
214 [enable_es="yes"], [enable_es=""]
216 AM_CONDITIONAL([SPANISH], [test -n "$enable_es"])
218 AC_ARG_ENABLE([japanese],
219 AS_HELP_STRING([--enable-japanese], [Build Japanese locale (default=no, never tested)]),
220 [enable_jp="yes"], [enable_jp=""]
222 AM_CONDITIONAL([JAPANESE], [test -n "$enable_jp"])
231 dnl these should be configurable someday...
232 CDE_INSTALLATION_TOP="$ac_default_prefix"
233 CDE_LOGFILES_TOP=/var/dt
234 CDE_CONFIGURATION_TOP=/etc/dt
237 AC_SUBST(CDE_INSTALLATION_TOP)
238 AC_SUBST(CDE_CONFIGURATION_TOP)
239 AC_SUBST(CDE_LOGFILES_TOP)
240 AC_SUBST(CDE_USER_TOP)
242 dnl This variable will contain a list of programs that were not found,
243 dnl but are required to build CDE. At the end, if the variable is
244 dnl non-empty, an error message will be printed, listing the missing
245 dnl programs. We don't bother with the simple expected commands like
252 dnl we need a real preprocessor, not gcc -E. We will call it GENCPP.
253 dnl We will go with BSD's tradcpp here... This is used for
254 dnl pre-processing during building of CDE - in the way imake used to
255 dnl do. This is not a replacement for cpp, used at runtime by
256 dnl software such as tt_type_comp.
257 AC_SUBST(GENCPP, '$(top_builddir)/util/tradcpp/tradcpp')
261 dnl make sure it's installed
263 if test -z "$ac_cv_prog_YACC"; then
264 MISSING_PROGS="[bison or byacc] ${MISSING_PROGS}"
268 if test -z "$ac_cv_prog_LEX"; then
269 MISSING_PROGS="[flex or lex] ${MISSING_PROGS}"
287 AC_C_FLEXIBLE_ARRAY_MEMBER
299 dnl programs with full paths
301 dnl - KSH, some systems call it as ksh93
302 AC_PATH_PROG(KSH, ksh)
303 if test -z "$ac_cv_path_KSH"; then
304 AC_PATH_PROG(KSH, ksh93)
305 if test -z "$ac_cv_path_KSH"; then
306 MISSING_PROGS="[ksh or ksh93] ${MISSING_PROGS}"
310 AC_PATH_PROG(XRDB, xrdb)
311 if test -z "$ac_cv_path_XRDB"; then
312 MISSING_PROGS="xrdb ${MISSING_PROGS}"
315 dnl we need to use cpp for some things, like tooltalk and other
316 dnl runtime uses. So look for the system's cpp. NOTE: this is NOT
317 dnl the CPP (gcc -E) set by AC_PROG_CPP. At this point I don't know
318 dnl if we should even bother looking for that as we can't really use
320 AC_PATH_PROG(CPP_PROGRAM, cpp, ,
321 [/lib:/usr/bin:/usr/ccs/lib/:/usr/lib:/usr/libexec:/opt/langtools/lbin:$PATH])
322 if test -z "$ac_cv_path_CPP_PROGRAM"; then
323 MISSING_PROGS="cpp ${MISSING_PROGS}"
326 dnl major external program dependencies
327 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
328 if test -z "$ac_cv_prog_BDFTOPCF"; then
329 MISSING_PROGS="bdftopcf ${MISSING_PROGS}"
331 AC_CHECK_PROGS(MKFONTDIR, mkfontdir)
332 if test -z "$ac_cv_prog_MKFONTDIR"; then
333 MISSING_PROGS="mkfontdir ${MISSING_PROGS}"
335 AC_CHECK_PROGS(GZIP, gzip)
336 if test -z "$ac_cv_prog_GZIP"; then
337 MISSING_PROGS="gzip ${MISSING_PROGS}"
339 AC_CHECK_PROGS(M4, m4)
340 if test -z "$ac_cv_prog_M4"; then
341 MISSING_PROGS="m4 ${MISSING_PROGS}"
343 AC_CHECK_PROGS(RPCGEN, rpcgen)
344 if test -z "$ac_cv_prog_RPCGEN"; then
345 MISSING_PROGS="rpcgen ${MISSING_PROGS}"
347 AC_CHECK_PROGS(GENCAT, gencat)
348 if test -z "$ac_cv_prog_GENCAT"; then
349 MISSING_PROGS="gencat ${MISSING_PROGS}"
354 AC_CHECK_HEADERS([locale.h])
357 AC_CHECK_LIB(m, cosf)
358 AC_CHECK_LIB(crypt, crypt)
359 dnl this should be configurable, for now it is required
360 AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
361 [SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DUSE_XINERAMA"],
362 [AC_MSG_ERROR([libXinerama not found])], $X_LIBS)
364 dnl Special check for tirpc...
365 AC_CHECK_LIB(tirpc, svc_register,
366 [CFLAGS="${CFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
367 CXXFLAGS="${CXXFLAGS} -DOPT_TIRPC -I/usr/include/tirpc";
372 AC_CHECK_LIB(jpeg, jpeg_read_header, [JPEGLIB="-ljpeg"],
373 [AC_MSG_ERROR([libjpeg not found, please install it])],
374 [$MOTIF_LIB $X_LIBS])
377 dnl Setup XTOOLLIB - we do it in this specific order to avoid ordering
380 AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"], , $X_LIBS)
381 AC_CHECK_LIB(Xau, XauReadAuth, [XTOOLLIB="-lXau ${XTOOLLIB}"], , $X_LIBS)
382 AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"], , $X_LIBS)
383 AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"], , $X_LIBS)
384 AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"], , $X_LIBS)
385 AC_CHECK_LIB(Xm, XmTextSetString, [XTOOLLIB="-lXm ${XTOOLLIB}"], , [$MOTIF_LIB $X_LIBS])
386 XTOOLLIB="${X_LIBS} ${MOTIF_LIB} ${X_EXTRA_LIBS} ${X_PRE_LIBS} ${XTOOLLIB}"
389 dnl check MISSING_PROGS - error out here if there's stuff in it.
391 if test -n "$MISSING_PROGS"; then
392 AC_MSG_ERROR([Please install the following REQUIRED programs: ${MISSING_PROGS}])
397 dnl set CPPFLAGS, CFLAGS, and CXXFLAGS.
398 dnl The Autoconf manual says that these are user variables and
399 dnl shouldn't be modified. It suggests that you create a special
400 dnl variable and presumably add those to your Makefile.am files. We
401 dnl have 192 of these currently, so... The user will just have to
402 dnl deal, or modify them here directly.
403 CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
404 CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
405 CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${X_CFLAGS} ${MOTIF_INC} ${PTHREAD_CFLAGS}"
406 LIBS="${X_LIBS} ${LIBS} ${PTHREAD_LIBS}"
408 dnl All of the makefiles we need to generate go here...
413 util/tradcpp/Makefile
417 lib/DtXinerama/Makefile
420 lib/tt/mini_isam/Makefile
423 lib/tt/lib/api/Makefile
424 lib/tt/lib/api/dnd/Makefile
425 lib/tt/lib/api/c/Makefile
426 lib/tt/lib/tttk/Makefile
427 lib/tt/lib/db/Makefile
428 lib/tt/lib/mp/Makefile
429 lib/tt/lib/util/Makefile
431 lib/tt/bin/shell/Makefile
432 lib/tt/bin/ttauth/Makefile
433 lib/tt/bin/scripts/Makefile
434 lib/tt/bin/tttar/Makefile
435 lib/tt/bin/tt_type_comp/Makefile
436 lib/tt/bin/tttrace/Makefile
437 lib/tt/bin/dbck/Makefile
438 lib/tt/bin/ttdbserverd/Makefile
439 lib/tt/bin/ttsession/Makefile
443 lib/DtSearch/Makefile
444 lib/DtSearch/raima/Makefile
446 lib/DtWidget/Makefile
449 lib/DtHelp/il/Makefile
453 lib/DtTerm/Term/Makefile
455 lib/DtTerm/TermView/Makefile
456 lib/DtTerm/util/Makefile
457 lib/DtTerm/TermPrim/Makefile
465 programs/backdrops/Makefile
467 programs/palettes/Makefile
469 programs/icons/Makefile
471 programs/dsdm/Makefile
473 programs/dtmail/Makefile
474 programs/dtmail/dtmail/Makefile
475 programs/dtmail/MotifApp/Makefile
476 programs/dtmail/dtmailpr/Makefile
477 programs/dtmail/libDtMail/Makefile
478 programs/dtmail/libDtMail/RFC/Makefile
479 programs/dtmail/libDtMail/Common/Makefile
481 programs/dtpad/Makefile
483 programs/dtfile/Makefile
484 programs/dtfile/dtcopy/Makefile
486 programs/dtwm/Makefile
488 programs/dtlogin/Makefile
489 programs/dtlogin/config/Makefile
491 programs/dtsession/Makefile
493 programs/dthello/Makefile
495 programs/dtstyle/Makefile
497 programs/dtexec/Makefile
499 programs/dtdbcache/Makefile
501 programs/dticon/Makefile
503 programs/dtterm/Makefile
505 programs/dtcalc/Makefile
507 programs/dtaction/Makefile
509 programs/dtspcd/Makefile
511 programs/dtscreen/Makefile
513 programs/dtcm/Makefile
514 programs/dtcm/libDtCmP/Makefile
515 programs/dtcm/server/Makefile
516 programs/dtcm/dtcm/Makefile
518 programs/dtsearchpath/Makefile
519 programs/dtsearchpath/libCliSrv/Makefile
520 programs/dtsearchpath/dtsp/Makefile
521 programs/dtsearchpath/dtappg/Makefile
523 programs/dtappintegrate/Makefile
525 programs/dtprintegrate/Makefile
527 programs/dtconfig/Makefile
528 programs/dtconfig/sun/Makefile
530 programs/dtcreate/Makefile
532 programs/dtprintinfo/Makefile
534 programs/fontaliases/Makefile
535 programs/fontaliases/bdf/Makefile
536 programs/fontaliases/linux/Makefile
537 programs/fontaliases/linux/C/Makefile
538 programs/fontaliases/linux/en_US.UTF-8/Makefile
539 programs/fontaliases/sun/Makefile
540 programs/fontaliases/sun/C/Makefile
541 programs/fontaliases/netbsd/Makefile
542 programs/fontaliases/netbsd/C/Makefile
543 programs/fontaliases/openbsd/Makefile
544 programs/fontaliases/openbsd/C/Makefile
545 programs/fontaliases/freebsd/Makefile
546 programs/fontaliases/freebsd/C/Makefile
548 programs/dtdspmsg/Makefile
550 programs/dtimsstart/Makefile
552 programs/dtpdm/Makefile
554 programs/dtsr/Makefile
556 programs/dtpdmd/Makefile
558 programs/types/Makefile
560 programs/tttypes/Makefile
562 programs/util/Makefile
563 programs/util/dttypes/Makefile
565 programs/dtopen/Makefile
567 programs/localized/Makefile
568 programs/localized/util/Makefile
569 programs/localized/C/Makefile
570 programs/localized/C/app-defaults/Makefile
571 programs/localized/C/config/Makefile
572 programs/localized/C/backdrops/Makefile
573 programs/localized/C/types/Makefile
574 programs/localized/C/palettes/Makefile
575 programs/localized/C/msg/Makefile
576 programs/localized/de_DE.UTF-8/Makefile
577 programs/localized/de_DE.UTF-8/app-defaults/Makefile
578 programs/localized/de_DE.UTF-8/config/Makefile
579 programs/localized/de_DE.UTF-8/backdrops/Makefile
580 programs/localized/de_DE.UTF-8/types/Makefile
581 programs/localized/de_DE.UTF-8/palettes/Makefile
582 programs/localized/de_DE.UTF-8/msg/Makefile
583 programs/localized/fr_FR.UTF-8/Makefile
584 programs/localized/fr_FR.UTF-8/app-defaults/Makefile
585 programs/localized/fr_FR.UTF-8/config/Makefile
586 programs/localized/fr_FR.UTF-8/backdrops/Makefile
587 programs/localized/fr_FR.UTF-8/types/Makefile
588 programs/localized/fr_FR.UTF-8/palettes/Makefile
589 programs/localized/fr_FR.UTF-8/msg/Makefile
590 programs/localized/it_IT.UTF-8/Makefile
591 programs/localized/it_IT.UTF-8/app-defaults/Makefile
592 programs/localized/it_IT.UTF-8/config/Makefile
593 programs/localized/it_IT.UTF-8/backdrops/Makefile
594 programs/localized/it_IT.UTF-8/types/Makefile
595 programs/localized/it_IT.UTF-8/palettes/Makefile
596 programs/localized/it_IT.UTF-8/msg/Makefile
597 programs/localized/es_ES.UTF-8/Makefile
598 programs/localized/es_ES.UTF-8/app-defaults/Makefile
599 programs/localized/es_ES.UTF-8/config/Makefile
600 programs/localized/es_ES.UTF-8/backdrops/Makefile
601 programs/localized/es_ES.UTF-8/types/Makefile
602 programs/localized/es_ES.UTF-8/palettes/Makefile
603 programs/localized/es_ES.UTF-8/msg/Makefile
609 dnl not currently building
610 dnl programs/dthelp/Makefile
611 dnl programs/dthelp/dthelpgen/Makefile
612 dnl programs/dthelp/dthelpprint/Makefile
613 dnl programs/dthelp/parser/pass1/helptag/Makefile
614 dnl programs/dthelp/parser/pass1/Makefile
615 dnl programs/dthelp/parser/pass1/eltdef/Makefile
616 dnl programs/dthelp/parser/pass1/build/Makefile
617 dnl programs/dthelp/parser/Makefile
618 dnl programs/dthelp/parser/canon1/Makefile
619 dnl programs/dthelp/parser/pass2/Makefile
620 dnl programs/dthelp/dthelpview/Makefile