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])
5 AC_PREFIX_DEFAULT(/usr/dt)
9 dnl todo: determine what version of autoconf we depend on
14 dnl global CDE versioning
20 AC_SUBST(CDE_VERSION_MAJOR)
21 AC_SUBST(CDE_VERSION_MINOR)
22 AC_SUBST(CDE_VERSION_MICRO)
24 dnl SOURCE_DEFINES - needed for some OS's
27 dnl CPP_COMPILER_FLAGS - CPP/C/C++ compiler flags
30 dnl CXX_COMPILER_FLAGS - C++ compiler flags
33 dnl C_COMPILER_FLAGS - C compiler flags
37 dnl These OS version checks are deprecated and should be replaced with
38 dnl feature checks where appropriate
49 dnl For now, we need to fake the OSMAJORVERSION, OSMINORVERSION. In Linux
50 dnl this never mattered anyway as it was always the kernel version. We will
51 dnl choose defaults here. These need to be removed in the code in favor
52 dnl of actual checks for functionality. So this should be considered
63 SOURCE_CPP_DEFINES="-D_POSIX_SOURCE -D_DEFAULT_SOURCE \
64 -D_BSD_SOURCE -D_SVID_SOURCE"
65 CPP_COMPILER_FLAGS="-fno-strict-aliasing -Wno-write-strings \
99 AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
100 AM_CONDITIONAL([BSD], [test "$build_bsd" = "yes"])
101 AM_CONDITIONAL([FREEBSD], [test "$build_freebsd" = "yes"])
102 AM_CONDITIONAL([OPENBSD], [test "$build_openbsd" = "yes"])
103 AM_CONDITIONAL([NETBSD], [test "$build_netbsd" = "yes"])
104 AM_CONDITIONAL([SOLARIS], [test "$build_solaris" = "yes"])
105 AM_CONDITIONAL([AIX], [test "$build_aix" = "yes"])
106 AM_CONDITIONAL([HPUX], [test "$build_hpux" = "yes"])
108 dnl Add osmajor/minor version to cppflags.
109 OSVERSION="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION"
111 dnl set CSRG_BASED define for the BSD's
112 if test "$build_bsd" = "yes"
114 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DCSRG_BASED"
124 case "$target_or_host" in
140 ppc-*-linux* | powerpc-*)
145 AM_CONDITIONAL([I386], [test "$is_i386" = yes])
146 AM_CONDITIONAL([X86_64], [test "$is_x86_64" = yes])
147 AM_CONDITIONAL([ARM], [test "$is_arm" = yes])
148 AM_CONDITIONAL([SPARC], [test "$is_sparc" = yes])
149 AM_CONDITIONAL([MIPS], [test "is_mips" = yes])
150 AM_CONDITIONAL([PPC], [test "is_ppc" = yes])
152 dnl our main libraries
153 dnl we use single quotes so that $top_builder is evaluated in the makefiles,
155 AC_SUBST(LIBTT, '$(top_builddir)/lib/tt/lib/libtt.la')
156 AC_SUBST(LIBXIN, '$(top_builddir)/lib/DtXinerama/libDtXinerama.la')
157 AC_SUBST(LIBWIDGET, '$(top_builddir)/lib/DtWidget/libDtWidget.la')
158 AC_SUBST(LIBTERM, '$(top_builddir)/lib/DtTerm/libDtTerm.la')
159 AC_SUBST(LIBSVC, '$(top_builddir)/lib/DtSvc/libDtSvc.la')
160 AC_SUBST(LIBSEARCH, '$(top_builddir)/lib/DtSearch/lbiDtSearch.la')
161 AC_SUBST(LIBPRINT, '$(top_builddir)/lib/DtPrint/libDtPrint.la')
162 AC_SUBST(LIBMRM, '$(top_builddir)/lib/DtMrm/libDtMrm.la')
163 AC_SUBST(LIBMMDB, '$(top_builddir)/lib/DtMmdb/libDtMmdb.la')
164 AC_SUBST(LIBHELP, '$(top_builddir)/lib/DtHelp/libDtHelp.la')
165 AC_SUBST(LIBCSA, '$(top_builddir)/lib/csa/libcsa.la')
167 AC_SUBST(DTCLIENTLIBS, '$(LIBPRINT) $(LIBHELP) $(LIBWIDGET) $(LIBSVC) $(LIBTT)')
169 dnl set up come convenience replacements for global include dirs
170 AC_SUBST(DT_INCDIR, '-I$(top_builddir)/include/Dt')
171 AC_SUBST(DTI_INCDIR, '-I$(top_builddir)/include/DtI')
172 AC_SUBST(TT_INCDIR, '-I$(top_builddir)/include/Tt')
173 AC_SUBST(XM_INCDIR, '-I$(top_builddir)/include/Xm')
174 AC_SUBST(CSA_INCDIR, '-I$(top_builddir)/include/csa')
175 AC_SUBST(SPC_INCDIR, '-I$(top_builddir)/include/SPC')
177 AC_ARG_ENABLE(japanese, [--build-japanese Build Japanese (default=no)])
178 AM_CONDITIONAL([JAPANESE], [test "build_japanese" = "yes"])
180 AC_ARG_ENABLE(german, [--build-german Build German (default=no)])
181 AM_CONDITIONAL([GERMAN], [test "build_german" = "yes"])
183 AC_ARG_ENABLE(italian, [--build-italian Build Italian (default=no)])
184 AM_CONDITIONAL([ITALIAN], [test "build_italian" = "yes"])
186 AC_ARG_ENABLE(french, [--build-french Build French (default=no)])
187 AM_CONDITIONAL([FRENCH], [test "build_french" = "yes"])
189 AC_ARG_ENABLE(spanish, --build-spanish Build Spanish (default=no)])
190 AM_CONDITIONAL([SPANISH], [test "build_spanish" = "yes"])
195 CDE_LOGFILES_TOP=/var/dt
196 CDE_CONFIGURATION_TOP=/etc/dt
199 AC_SUBST(CDE_CONFIGURATION_TOP)
200 AC_SUBST(CDE_LOGFILES_TOP)
201 AC_SUBST(CDE_USER_TOP)
224 AC_C_FLEXIBLE_ARRAY_MEMBER
235 AC_CHECK_PROGS(KSH, ksh)
236 AC_CHECK_PROGS(BDFTOPCF, bdftopcf)
237 AC_CHECK_PROGS(MKFONTIDR, mkfontdir)
238 AC_CHECK_PROGS(GZIP, gzip)
239 AC_CHECK_PROGS(M4, m4)
240 AC_CHECK_PROGS(RPCGEN, rpcgen)
244 AC_CHECK_HEADERS([locale.h])
247 AC_CHECK_LIB(tirpc, main, [TIRPCINC="-DOPT_TIRPC -I/usr/include/tirpc"; TIRPCLIB=-ltirpc])
253 AC_CHECK_LIB(X11, XOpenDisplay, [XTOOLLIB="-lX11"])
254 AC_CHECK_LIB(Xt, XtInitialize, [XTOOLLIB="-lXt ${XTOOLLIB}"])
255 AC_CHECK_LIB(ICE, IceCloseConnection, [XTOOLLIB="-lICE ${XTOOLLIB}"])
256 AC_CHECK_LIB(SM, SmcOpenConnection, [XTOOLLIB="-lSM ${XTOOLLIB}"])
259 dnl set CPPFLAGS, CFLAGS, and CXXFLAGS.
260 dnl The Autoconf manual says that these are user variables and
261 dnl shouldn't be modified. It suggests that you create a special
262 dnl variable and presumably add those to your Makefile.am files. We
263 dnl have 192 of these currently, so... The user will just have to
264 dnl deal, or modify them here directly.
265 CPPFLAGS="${CPPFLAGS} ${SOURCE_CPP_DEFINES} ${CPP_COMPILER_FLAGS} ${OSVERSION}"
266 CFLAGS="${CFLAGS} ${C_COMPILER_FLAGS} ${PTHREAD_CFLAGS}"
267 CXXFLAGS="${CXXFLAGS} ${CXX_COMPILER_FLAGS} ${PTHREAD_CFLAGS}"
268 LIBS="${LIBS} ${PTHREAD_LIBS}"
270 dnl All of the makefiles we need to generate go here...
276 lib/DtXinerama/Makefile
279 lib/tt/mini_isam/Makefile
282 lib/tt/lib/api/Makefile
283 lib/tt/lib/api/dnd/Makefile
284 lib/tt/lib/api/c/Makefile
285 lib/tt/lib/tttk/Makefile
286 lib/tt/lib/db/Makefile
287 lib/tt/lib/mp/Makefile
288 lib/tt/lib/util/Makefile
290 lib/tt/bin/shell/Makefile
291 lib/tt/bin/ttauth/Makefile
292 lib/tt/bin/scripts/Makefile
293 lib/tt/bin/tttar/Makefile
294 lib/tt/bin/tt_type_comp/Makefile
295 lib/tt/bin/tttrace/Makefile
296 lib/tt/bin/dbck/Makefile
297 lib/tt/bin/ttdbserverd/Makefile
298 lib/tt/bin/ttsession/Makefile
301 lib/DtSvc/DtUtil1/Makefile
302 lib/DtSvc/DtUtil2/Makefile
303 lib/DtSvc/DtEncap/Makefile
304 lib/DtSvc/DtCodelibs/Makefile
305 lib/DtSvc/DtXpm/Makefile
307 lib/DtSearch/Makefile
308 lib/DtSearch/raima/Makefile
310 lib/DtWidget/Makefile
313 lib/DtHelp/il/Makefile
317 lib/DtTerm/Term/Makefile
319 lib/DtTerm/TermView/Makefile
320 lib/DtTerm/util/Makefile
321 lib/DtTerm/TermPrim/Makefile
329 programs/backdrops/Makefile
331 programs/icons/Makefile
333 programs/dthelp/Makefile
334 programs/dthelp/dthelpgen/Makefile
335 programs/dthelp/dthelpprint/Makefile
336 programs/dthelp/parser/pass1/helptag/Makefile
337 programs/dthelp/parser/pass1/Makefile
338 programs/dthelp/parser/pass1/eltdef/Makefile
339 programs/dthelp/parser/pass1/build/Makefile
340 programs/dthelp/parser/Makefile
341 programs/dthelp/parser/canon1/Makefile
342 programs/dthelp/parser/pass2/Makefile
343 programs/dthelp/dthelpview/Makefile
345 programs/dsdm/Makefile
347 programs/dtmail/Makefile
348 programs/dtmail/dtmail/Makefile
349 programs/dtmail/MotifApp/Makefile
350 programs/dtmail/dtmailpr/Makefile
351 programs/dtmail/libDtMail/Makefile
352 programs/dtmail/libDtMail/RFC/Makefile
353 programs/dtmail/libDtMail/Common/Makefile
355 programs/dtpad/Makefile
357 programs/dtfile/Makefile
358 programs/dtfile/dtcopy/Makefile