1dnl 2dnl Configuration script for LessTif 3dnl $Id: configure.in,v 1.1 2002/06/25 22:01:34 dannybackx Exp $ 4dnl 5dnl Copyright (C) 1995 Free Software Foundation, Inc. 6dnl Copyright (C) 1995-2002 LessTif Development Team 7dnl 8 9 10dnl First some auto*-related stuff 11AC_INIT(src/WEzdraw.c) 12AC_PREREQ(2.13) 13AC_CONFIG_AUX_DIR(.) 14 15dnl For cross-compiling?! 16AC_CANONICAL_HOST 17 18dnl Make some maintainer-specific stuff optional 19AM_MAINTAINER_MODE 20 21dnl The version of the LessTif libraries 22MAJOR_VERSION=2 23MINOR_VERSION=1 24PICO_VERSION=0 25 26AM_INIT_AUTOMAKE(movingmotif, $MAJOR_VERSION.$MINOR_VERSION.$PICO_VERSION) 27dnl AM_AUTOMAKE_OPTIONS(1.5) 28 29 30LIBTOOL_VERSION=$MAJOR_VERSION:$MINOR_VERSION:0 31 32dnl 33dnl Override a default in libtool. 34dnl 35AC_DISABLE_STATIC 36 37dnl AM_CONFIG_HEADER(include/LTconfig.h) 38dnl AC_CONFIG_HEADERS 39 40dnl Run test in a subshell; some versions of sh will print an error if 41dnl an executable is not found, even if stderr is redirected. 42dnl Redirect stdin to placate older versions of autoconf. Sigh. 43if (aclocal --print-ac-dir) </dev/null >/dev/null 2>&1 && test -w `aclocal --print-ac-dir`; then 44 ACLOCALDIR=`aclocal --print-ac-dir` 45 AC_SUBST(ACLOCALDIR) 46fi 47AM_CONDITIONAL(Aclocal, test x$ACLOCALDIR != x ) 48 49AC_CONFIG_SUBDIRS(test) 50 51dnl 52dnl Some generic stuff about the compiler and system library 53dnl 54lt_cs_test_CFLAGS=${CFLAGS+set} 55AC_PROG_CC 56 57AC_AIX 58AM_PROG_CC_STDC 59AC_CYGWIN 60AC_EXEEXT 61AC_OBJEXT 62AM_PROG_LIBTOOL 63dnl Check for the call of the day which the auto* people just prefer ;-) 64dnl AC_PROG_LIBTOOL 65 66dnl 67dnl Figure out whether libtool will create shared libraries 68dnl 69 70if ${CONFIG_SHELL-/bin/sh} ./libtool --features | grep "enable shared" > /dev/null 2>&1; then 71 lt_libtool_shared="yes" 72fi 73 74dnl 75dnl Figure out whether libtool will create static libraries 76dnl 77 78if ${CONFIG_SHELL-/bin/sh} ./libtool --features | grep "enable static" > /dev/null 2>&1; then 79 lt_libtool_static="yes" 80fi 81 82AM_CONDITIONAL(LibtoolShared, test x$lt_libtool_shared = xyes) 83AM_CONDITIONAL(LibtoolStatic, test x$lt_libtool_static = xyes) 84 85dnl 86dnl End libtool magic 87dnl 88 89 90dnl 91dnl Some checks for required tools 92dnl 93 94dnl Required for internal static libraries we build 95AC_CHECK_PROG(AR, ar, ar, ar) 96 97dnl 'cp' should always be available!? 98AC_CHECK_PROG(cp, cp, cp, cp) 99 100dnl 'rm' should always be available!? 101AC_CHECK_PROG(RM, rm, rm, rm) 102 103 104AC_PROG_MAKE_SET 105AC_PROG_INSTALL 106AC_PROG_LN_S 107 108dnl Some tools we use for code-generation 109AC_PROG_YACC 110AM_PROG_LEX 111 112dnl Check for exuberant ctags 113dnl AC_HAVE_EXCTAGS 114 115dnl auto* checks for ANSI C89 stuff 116AC_HEADER_STDC 117AC_C_CONST 118 119AC_CHECK_FUNCS(ltoa) 120 121dnl dnl Ok, now let's assume the system is ANSI C89 conforming and 122dnl dnl do not check for those standard funcs/headers again! 123dnl 124dnl AC_CHECK_HEADERS(fcntl.h libgen.h pwd.h) 125dnl AC_CHECK_HEADERS(sys/select.h sys/stat.h sys/systeminfo.h) 126dnl AC_CHECK_HEADERS(sys/time.h sys/types.h sys/wait.h) 127dnl AC_CHECK_HEADERS(unistd.h) 128dnl AC_CHECK_HEADERS(wchar.h wctype.h) 129dnl AC_HEADER_STAT 130dnl 131dnl dnl These checks in fact look for several headers (see autoconf docs) 132dnl AC_HEADER_DIRENT 133dnl AC_HEADER_TIME 134dnl 135dnl dnl Various other stuff. Most should be available on a 'typical' un*x system. 136dnl dnl Most/all should be specified in SUS V2, some are in 137dnl dnl Posix.1 (IEEE Std 1003.1: 1990) 138dnl AC_CHECK_FUNCS(acccess basename close dirname _exit execl execvp fork) 139dnl AC_CHECK_FUNCS(getcwd getdtablesize getitimer getopt) 140dnl AC_CHECK_FUNCS(getpid getpwnam getpwuid getrlimit getuid) 141dnl AC_CHECK_FUNCS(open pipe putenv) 142dnl AC_CHECK_FUNCS(setenv setitimer sigaction sleep snprintf) 143dnl AC_CHECK_FUNCS(stat strcasecmp strdup strncasecmp sysconf) 144dnl AC_CHECK_FUNCS(uname usleep vfprintf vsnprintf wait3 waitpid write) 145dnl 146dnl dnl select() is used in libXm and mwm 147dnl AC_CHECK_FUNCS(select) 148 149AC_FUNC_SELECT_ARGTYPES 150 151dnl 152dnl Check integer sizes 153dnl 154dnl The constants are only used when cross compiling; if I understand the 155dnl documentation well enough, those get substituted for the target. The 156dnl values given are the most common values, but may need customization if 157dnl someone is desparate enough to _want_ to cross compile to a 64 bit 158dnl machine from a 32 bit machine, for example. 159dnl AC_CHECK_SIZEOF(short, 2) 160dnl AC_CHECK_SIZEOF(int, 4) 161dnl AC_CHECK_SIZEOF(long, 4) 162dnl AC_CHECK_SIZEOF(long long, 8) 163 164dnl X11 path stuff 165AC_PATH_X 166AC_PATH_XTRA 167 168dnl rws 21 Apr 2000 169dnl According to the definition of AC_PATH_X from autoconf this next test is 170dnl bad. Here is the comment from there. 171dnl 172dnl # Screen out bogus values from the imake configuration. They are 173dnl # bogus both because they are the default anyway, and because 174dnl # using them would break gcc on systems where it needs fixed includes. 175dnl 176dnl if test "x$x_includes" = "x"; then 177dnl x_includes="/usr/include" 178dnl fi 179 180dnl 181dnl Set the CFLAGS variable to the location of the found X-header files 182dnl This is necessary for the tests below to work. 183dnl Don't lose original contents of CFLAGS though. 184dnl 185 186lt_cs_save_CFLAGS="$CFLAGS" 187if test "x$x_includes" != "x" ; then 188 CFLAGS="$CFLAGS -I$x_includes" 189fi 190 191dnl LT_HAVE_LIBXP 192 193dnl dnl 194dnl dnl Whether to link -lXp 195dnl dnl 196dnl AC_MSG_CHECKING(whether to link -lXp) 197dnl if test $lt_cv_libxp = yes; 198dnl then 199dnl XPLIB="-lXp -lXext" 200dnl AC_MSG_RESULT(yes) 201dnl else 202dnl XPLIB="" 203dnl AC_MSG_RESULT(no) 204dnl fi 205dnl AC_SUBST(XPLIB) 206 207AC_FIND_MOTIF 208dnl AC_PATH_MOTIF 209 210if test -n "$motif_includes"; then 211 if test "x$motif_includes" != "xNONE"; then 212 MOTIF_CFLAGS="-I$motif_includes" 213 fi 214fi 215AC_SUBST(MOTIF_CFLAGS) 216if test -n "$motif_libraries"; then 217 if test "x$motif_libraries" != "xNONE"; then 218 MOTIF_LIBS="-L$motif_libraries" 219 fi 220fi 221AC_SUBST(MOTIF_LIBS) 222 223 224dnl Adjust some standard variables 225 226if test "x$warn_flags" = x; then 227 CFLAGS="$lt_cs_save_CFLAGS" 228else 229 CFLAGS="$lt_cs_save_CFLAGS $warn_flags" 230fi 231GPROF_FLAGS="-pg" 232GPROF_CFLAGS="" 233EXTRACFLAGS="" 234extralibs="" 235run_libraries="" 236 237case ${with_static} in 238 yes) static_prefix=;; 239 no) static_prefix="#";; 240esac 241 242dnl 243dnl Now ensure that all required variables get substituted! 244dnl 245 246dnl AC_SUBST(libdir) 247AC_SUBST(bindir) 248 249dnl We might have a bit too much redundant data here, but who cares ... 250dnl AC_SUBST(version) 251AC_SUBST(version_suffix) 252AC_SUBST(lib_version_suffix) 253 254AC_SUBST(xmVERSION) 255AC_SUBST(xmREVISION) 256AC_SUBST(xmVer) 257 258AC_SUBST(Build12) 259AC_SUBST(Build20) 260AC_SUBST(Build21) 261 262AC_SUBST(BuildTestDir) 263 264AC_SUBST(CFLAGS) 265AC_SUBST(x_lib_path) 266AC_SUBST(x_libraries) 267AC_SUBST(x_inc_path) 268AC_SUBST(x_includes) 269AC_SUBST(motif_libraries) 270AC_SUBST(motif_includes) 271AC_SUBST(Editres) 272AC_SUBST(extralibs) 273AC_SUBST(subdirs) 274AC_SUBST(LIBTOOL_VERSION) 275AC_SUBST(AS) 276AC_SUBST(DLLTOOL) 277AC_SUBST(OBJDUMP) 278AC_SUBST(MAJOR_VERSION) 279AC_SUBST(MINOR_VERSION) 280AC_SUBST(PICO_VERSION) 281AC_SUBST(LAST_MAJOR_VERSION) 282AC_SUBST(LAST_MINOR_VERSION) 283AC_SUBST(LAST_PICO_VERSION) 284 285 286dnl 287dnl This need 'splain'in Lucy!!! 288dnl The new autoconf will be setting a default cache_file=/dev/null. 289dnl To avoid all of the problems associated with parseing the long list 290dnl of possibilities from the --enable-build-* and --enable-default-* 291dnl args our sub-configures need to know the result of these options. 292dnl We used to rely on the cache_file being shared, now we don't have a 293dnl cache file. So instead, let's explicitly export the vars that we 294dnl need to make an inteligent decision. 295dnl 296 297export lt_cv_default12 lt_cv_default20 lt_cv_default21 298 299dnl 300dnl Which output files do we generate ? 301dnl 302 303AC_OUTPUT( Makefile src/Makefile Docu/Makefile demo/Makefile demo/mindsrc/Makefile) 304 305dnl 306dnl The End. 307dnl 308