1dnl Process this file with autoconf to produce a configure script. 2AC_INIT 3AC_CONFIG_SRCDIR([lib/Xm/Form.c]) 4AC_PREREQ(2.52) 5AC_CONFIG_AUX_DIR(.) 6AC_CHECK_FILE(/usr/X/include/X11/X.h, 7 AC_PREFIX_DEFAULT(/usr/X), 8 AC_PREFIX_DEFAULT(/usr)) 9AC_CHECK_FILE(/usr/X11R6/include/X11/X.h, 10 AC_PREFIX_DEFAULT(/usr/X11R6), 11 AC_PREFIX_DEFAULT(/usr)) 12 13dnl AM_MAINTAINER_MODE 14AC_CANONICAL_TARGET 15 16dnl The version of the Motif libraries 17CURRENT=4 18REVISION=4 19AGE=0 20AC_SUBST(CURRENT) 21AC_SUBST(REVISION) 22AC_SUBST(AGE) 23 24dnl This is really dumb but it seems to be bug 25AM_INIT_AUTOMAKE(motif,2.3.8,no-define) 26 27LIBTOOL_VERSION=$CURRENT:$REVISION:$AGE 28 29dnl 30dnl Override a default in libtool. 31dnl 32dnl AC_DISABLE_STATIC 33 34AC_CONFIG_HEADERS(include/config.h lib/Xm/Xm.h) 35 36dnl Checks for programs. 37AC_PROG_CC 38AC_PROG_CPP 39AM_PROG_LIBTOOL 40 41AC_EXEEXT 42 43dnl AC_PROG_YACC 44dnl Do this the old fashioned way. 'bison -y' doesn't cut it 45AC_CHECK_PROGS(YACC, byacc, yacc) 46 47dnl AC_PROG_SPLINT 48AC_CHECK_PROGS(SPLINT, splint) 49 50AM_PROG_LEX 51AC_PROG_INSTALL 52AC_PROG_LN_S 53AC_PROG_MAKE_SET 54 55 56dnl Checks for libraries. 57 58AC_PATH_X 59AC_PATH_XTRA 60LT_LIB_XTHREADS 61 62dnl Checks for Xos_r.h 63 64AC_CHECK_HEADERS([X11/Xos_r.h]) 65AC_CHECK_HEADERS([X11/Xpoll.h]) 66 67dnl Compile in EditRes support if we can find Xmu 68 69save_LIBS="$LIBS" 70save_CFLAGS="$CFLAGS" 71LIBS="$X_LIBS $LIBS" 72CFLAGS="$X_CFLAGS $CFLAGS" 73AC_CHECK_HEADERS(X11/Xmu/Editres.h, 74AC_CHECK_LIB(Xmu, _XEditResCheckMessages, 75X_XMU=-lXmu 76AC_DEFINE(HAVE_LIBXMU, 1, This System has libXmu) 77, X_XMU="", -lXt -lX11) 78AC_CHECK_LIB(Xmu,XmuNCopyISOLatin1Lowered , 79AC_DEFINE(HAVE_XMU_N_COPY_ISO,1,Have XmuNCopyISOLatin1Lowered) 80, , -lXt -lX11) 81,,[[#include <X11/Intrinsic.h>]] 82) 83 84 85AC_SUBST(X_XMU) 86LIBS="$save_LIBS" 87CFLAGS="$save_CFLAGS" 88AM_CONDITIONAL(OM_XMU, test x$X_XMU != x) 89 90dnl Checks for header files. 91AC_HEADER_DIRENT 92AC_HEADER_STDC 93AC_HEADER_SYS_WAIT 94AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/malloc.h strings.h sys/file.h sys/time.h unistd.h wchar.h) 95AC_CHECK_HEADERS(wctype.h, AC_DEFINE(HAS_WIDECHAR_FUNCTIONS,1,System supports wchar)) 96AC_CHECK_HEADER(langinfo.h,,AC_DEFINE(CSRG_BASED,1,System Has langinfo.h)) 97AC_CHECK_HEADER(X11/Xos_r.h,,AC_DEFINE(NEED_XOS_R_H,1,System Missing Xos_r.h)) 98AC_CHECK_HEADER(X11/Xpoll.h,,AC_DEFINE(NEED_XPOLL_H,1,system Missing X11/Xpoll.h)) 99dnl Checks for typedefs, structures, and compiler characteristics. 100AC_C_CONST 101AC_TYPE_MODE_T 102AC_TYPE_OFF_T 103AC_TYPE_PID_T 104AC_TYPE_SIZE_T 105AC_HEADER_TIME 106AC_STRUCT_TM 107AC_TYPE_UID_T 108WEAK_ALIAS_SUPPORT 109 110dnl Checks for library functions. 111AC_FUNC_ALLOCA 112AC_FUNC_MEMCMP 113AC_FUNC_SETPGRP 114AC_TYPE_SIGNAL 115AC_FUNC_STRCOLL 116AC_FUNC_STRFTIME 117AC_FUNC_FORK([]) 118AC_FUNC_VPRINTF 119AM_FUNC_VOID_SPRINTF 120AC_CHECK_FUNCS(wcslen wcscpy wcsncpy wcschr wcscat wcsncat getcwd gettimeofday mkdir re_comp regcmp select strcspn strerror strstr strtod strtol uname) 121AC_CHECK_FUNCS(strdup,,AC_DEFINE(NEED_STRDUP, 1, no strdup)) 122AC_CHECK_FUNCS(strcasecmp,,AC_DEFINE(NEED_STRCASECMP, 1, no strcasecmp)) 123AC_CHECK_FUNCS(putenv,,AC_DEFINE(NO_PUTENV, 1, No PUTENV)) 124AC_CHECK_FUNCS(regcomp,,AC_DEFINE(NO_REGCOMP, 1, no regcmp)) 125AC_CHECK_FUNCS(memmove,,AC_DEFINE(NO_MEMMOVE, 1, no memmove)) 126AC_CHECK_TYPE(XICProc,,AC_DEFINE(NO_XICPROC, 1, XICProc isn't defined), [#include <X11/Xlib.h>]) 127 128AC_ARG_ENABLE(message-catalog, [ --enable-message-catalog 129 Enable building of the message catalog (default=no)]) 130if test "$enable_message_catalog" != "yes" 131then 132 AC_DEFINE(NO_MESSAGE_CATALOG, 1, No Defined Message Catalog) 133fi 134AM_CONDITIONAL(MessageCatalog, test x$enable_message_catalog = xyes) 135 136AC_ARG_ENABLE(themes, [ --enable-themes Enable themes (default=no)]) 137if test "$enable_themes" = "yes" 138then 139 if test -f $srcdir/lib/Xm/Theme.h 140 then 141 AC_DEFINE(USE_XMTHEMES, 1, "Use XmThemes") 142 XMTHEME_DIST = "Theme.h ThemeP.h DynLibP.h Theme.c DynLib.c" 143 else 144 AC_MSG_WARN([--enable-themes specified, but I don't have the code. Disabled]) 145 enable_themes="no" 146 fi 147fi 148AC_SUBST(XMTHEME_DIST) 149AM_CONDITIONAL(OM_XMTHEMES, test "$enable_themes" = "yes") 150 151AC_ARG_ENABLE(debug-themes, [ --enable-debug-themes Enable themes debugging (default=no)]) 152if test "$enable_themes" = "yes" 153then 154 if test "$enable_debug_themes" = "yes" 155 then 156 AC_DEFINE(DEBUGTHEMES, 1, "Debug Themes") 157 fi 158fi 159 160if test x$GCC = xyes 161then 162 CFLAGS="$CFLAGS -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment" 163 if ! $CC -v 2>&1 | grep clang > /dev/null && test ` $CC -dumpversion | sed -e 's/\(^.\).*/\1/'` = "4" ; then 164 CFLAGS="$CFLAGS -fno-tree-ter" 165 fi 166fi 167AC_DEFINE(NO_OL_COMPAT, 1, "No OL Compatability") 168 169CDE_INSTALLATION_TOP="\${prefix}/dt" 170AC_SUBST(CDE_INSTALLATION_TOP) 171 172CDE_CONFIGURATION_TOP="\${prefix}/etc/dt" 173AC_SUBST(CDE_CONFIGURATION_TOP) 174 175LIBDIR="${libdir}/X11" 176AC_SUBST(LIBDIR) 177 178MWMRCDIR="${libdir}/X11" 179AC_SUBST(MWMRCDIR) 180 181INCDIR="${includedir}/X11" 182AC_SUBST(INCDIR) 183 184XMBINDDIR_FALLBACK="${libdir}/X11/bindings" 185AC_SUBST(XMBINDDIR_FALLBACK) 186 187RM="rm -f" 188AC_SUBST(RM) 189 190AC_ARG_ENABLE(motif22-compatibility, [ --disable-motif22-compatibility 191 Disable binary compatibility with OpenMotif 2.2]) 192AC_ARG_ENABLE(utf8, [ --disable-utf8 193 Disable UTF-8 support]) 194 195case "$host_os" in 196 freebsd*) CFLAGS="$CFLAGS -DCSRG_BASED -DXNO_MTSAFE_API -DXNO_MTSAFE_PWDAPI"; 197 LDFLAGS="$LDFLAGS -L/usr/local/lib";; 198 cygwin*) CFLAGS="$CFLAGS -DXNO_MTSAFE_DIRENTDAPI";; 199 solaris* | sunos*) X_LIBS="$X_LIBS -L/usr/X/lib" && 200 if test x$enable_motif22_compatibility = x 201 then 202 enable_motif22_compatibility="no" 203 fi; 204 if test x$enable_utf8 = x 205 then 206 enable_utf8="no" 207 fi; 208 if test x$enable_xft = x 209 then 210 enable_xft="no" 211 fi;; 212esac 213 214if test x$enable_motif22_compatibility = x 215then 216 enable_motif22_compatibility="yes" 217fi 218 219if test "$enable_motif22_compatibility" = "yes" 220then 221 AC_DEFINE([OM22_COMPATIBILITY], [1], [Compatibility with OpenMotif 2.2]) 222 OM22_COMPATIBILITY_FALSE=! 223 OM22_COMPATIBILITY_TRUE= 224else 225 OM22_COMPATIBILITY_FALSE= 226 OM22_COMPATIBILITY_TRUE=! 227fi 228AC_SUBST(OM22_COMPATIBILITY_FALSE) 229AC_SUBST(OM22_COMPATIBILITY_TRUE) 230 231if test x$enable_utf8 = x 232then 233 enable_utf8="yes" 234fi 235 236if test "$enable_utf8" = "yes" 237then 238 AC_DEFINE([UTF8_SUPPORTED], [1], [UTF8 is supported]) 239 AC_SEARCH_LIBS([iconv_open], [iconv], , 240 AC_SEARCH_LIBS([libiconv_open], [iconv])) 241fi 242 243AC_ARG_ENABLE(printing, [ --disable-printing 244 Disable printing support]) 245 246if test x$enable_printing = x 247then 248 enable_printing="yes" 249fi 250 251if test "$enable_printing" = "yes" 252then 253 AC_MSG_CHECKING([for libXp]) 254 AC_CHECK_HEADERS(X11/extensions/Print.h, 255 AC_CHECK_LIB(Xp, XpCreateContext, ,enable_printing="no"), 256 enable_printing="no") 257fi 258 259if test "$enable_printing" = "yes" 260then 261 LIB_XP=-lXp 262 AC_DEFINE([PRINTING_SUPPORTED], [1], [Printing is supported]) 263 PRINTING_SUPPORTED_FALSE=! 264 PRINTING_SUPPORTED_TRUE= 265else 266 LIB_XP= 267 PRINTING_SUPPORTED_FALSE= 268 PRINTING_SUPPORTED_TRUE=! 269fi 270AC_SUBST(PRINTING_SUPPORTED_FALSE) 271AC_SUBST(PRINTING_SUPPORTED_TRUE) 272 273AM_CONDITIONAL(PRINTING, test "$enable_printing" = "yes") 274AC_SUBST(LIB_XP) 275 276AC_FIND_XFT 277AC_IMAGE_SUPPORT 278 279 280 281# AM_CONDITIONAL(Motif22Compatibility, test x$enable_motif22_compatibility = xyes) 282 283AC_CONFIG_FILES([Makefile \ 284bindings/Makefile \ 285bitmaps/Makefile \ 286clients/Makefile \ 287clients/mwm/Makefile \ 288clients/mwm/WmWsmLib/Makefile \ 289clients/uil/Makefile \ 290clients/xmbind/Makefile \ 291config/Makefile \ 292config/util/Makefile \ 293include/Makefile \ 294include/Dt/Makefile \ 295lib/Makefile \ 296lib/Xm/Makefile \ 297lib/Mrm/Makefile \ 298localized/Makefile \ 299localized/util/Makefile \ 300doc/Makefile \ 301doc/man/Makefile \ 302doc/man/man1/Makefile \ 303doc/man/man3/Makefile \ 304doc/man/man4/Makefile \ 305doc/man/man5/Makefile \ 306tools/Makefile \ 307tools/wml/Makefile \ 308demos/Makefile \ 309demos/lib/Makefile \ 310demos/lib/Xmd/Makefile \ 311demos/lib/Wsm/Makefile \ 312demos/lib/Exm/Makefile \ 313demos/lib/Exm/wml/Makefile \ 314demos/programs/Makefile \ 315demos/programs/Exm/Makefile \ 316demos/programs/Exm/app_in_c/Makefile \ 317demos/programs/Exm/app_in_uil/Makefile \ 318demos/programs/Exm/simple_app/Makefile \ 319demos/programs/airport/Makefile \ 320demos/programs/animate/Makefile \ 321demos/programs/drag_and_drop/Makefile \ 322demos/programs/draw/Makefile \ 323demos/programs/earth/Makefile \ 324demos/programs/filemanager/Makefile \ 325demos/programs/fileview/Makefile \ 326demos/programs/getsubres/Makefile \ 327demos/programs/hellomotif/Makefile \ 328demos/programs/hellomotifi18n/Makefile \ 329demos/programs/hellomotifi18n/C/Makefile \ 330demos/programs/hellomotifi18n/C/uid/Makefile \ 331demos/programs/hellomotifi18n/english/Makefile \ 332demos/programs/hellomotifi18n/english/uid/Makefile \ 333demos/programs/hellomotifi18n/french/Makefile \ 334demos/programs/hellomotifi18n/french/uid/Makefile \ 335demos/programs/hellomotifi18n/hebrew/Makefile \ 336demos/programs/hellomotifi18n/hebrew/uid/Makefile \ 337demos/programs/hellomotifi18n/japan/Makefile \ 338demos/programs/hellomotifi18n/japan/uid/Makefile \ 339demos/programs/hellomotifi18n/japanese/Makefile \ 340demos/programs/hellomotifi18n/japanese/uid/Makefile \ 341demos/programs/hellomotifi18n/swedish/Makefile \ 342demos/programs/hellomotifi18n/swedish/uid/Makefile \ 343demos/programs/i18ninput/Makefile \ 344demos/programs/panner/Makefile \ 345demos/programs/periodic/Makefile \ 346demos/programs/piano/Makefile \ 347demos/programs/popups/Makefile \ 348demos/programs/sampler2_0/Makefile \ 349demos/programs/setdate/Makefile \ 350demos/programs/todo/Makefile \ 351demos/programs/workspace/Makefile \ 352demos/programs/tooltips/Makefile \ 353demos/programs/FontSel/Makefile \ 354demos/programs/ButtonBox/Makefile \ 355demos/programs/ColorSel/Makefile \ 356demos/programs/Column/Makefile \ 357demos/programs/Combo2/Makefile \ 358demos/programs/Ext18List/Makefile \ 359demos/programs/Ext18List/pixmaps/Makefile \ 360demos/programs/IconB/Makefile \ 361demos/programs/Outline/Makefile \ 362demos/programs/Paned/Makefile \ 363demos/programs/TabStack/Makefile \ 364demos/programs/Tree/Makefile \ 365demos/programs/pixmaps/Makefile \ 366demos/unsupported/Makefile \ 367demos/unsupported/Exm/Makefile \ 368demos/unsupported/aicon/Makefile \ 369demos/unsupported/dainput/Makefile \ 370demos/unsupported/dogs/Makefile \ 371demos/unsupported/hellomotif/Makefile \ 372demos/unsupported/motifshell/Makefile \ 373demos/unsupported/uilsymdump/Makefile \ 374demos/unsupported/xmapdef/Makefile \ 375demos/unsupported/xmfonts/Makefile \ 376demos/unsupported/xmforc/Makefile \ 377demos/unsupported/xmform/Makefile \ 378demos/doc/Makefile \ 379demos/doc/programGuide/Makefile \ 380demos/doc/programGuide/ch05/Makefile \ 381demos/doc/programGuide/ch05/Scale/Makefile \ 382demos/doc/programGuide/ch06/Makefile \ 383demos/doc/programGuide/ch06/spin_box/Makefile \ 384demos/doc/programGuide/ch06/combo_box/Makefile \ 385demos/doc/programGuide/ch08/Makefile \ 386demos/doc/programGuide/ch08/Notebook/Makefile \ 387demos/doc/programGuide/ch08/Container/Makefile \ 388demos/doc/programGuide/ch16/Makefile \ 389demos/doc/programGuide/ch17/Makefile \ 390demos/doc/programGuide/ch17/simple_drop/Makefile \ 391demos/doc/programGuide/ch17/simple_drag/Makefile \ 392lib/Xm/xmstring.list \ 393]) 394AC_OUTPUT 395