1dnl 2dnl New-style (automake, libtool, autoconf) configuration script 3dnl for LessTif's test/ tree 4dnl 5dnl $Header: /cvsroot/lesstif/lesstif/test/configure.in,v 1.179 2006/06/10 09:45:23 dannybackx Exp $ 6dnl 7 8AC_INIT 9AC_CONFIG_SRCDIR([common/Test.h]) 10 11AC_CANONICAL_HOST 12 13dnl version numbers (are not required/used in test/ !?) 14MAJOR_VERSION=0 15MINOR_VERSION=95 16PICO_VERSION=1 17 18AC_CONFIG_AUX_DIR(..) 19AM_INIT_AUTOMAKE(LessTif-Tests,$MAJOR_VERSION.$MINOR_VERSION) 20 21dnl AM_AUTOMAKE_OPTIONS(1.5 foreign dejagnu) 22 23 24LIBTOOL_VERSION=$MAJOR_VERSION:$MINOR_VERSION:0 25 26dnl 27dnl Override a default in libtool. (why that?) 28dnl 29AM_DISABLE_STATIC 30 31dnl 32dnl Replacement for acconfig.h 33dnl 34AH_TEMPLATE([HAVE_LIB_XP], [Define if libXp is available]) 35AH_TEMPLATE([HAVE_GL_GLWMDRAWA_H], [Define if the GL (Mesa) include files are available]) 36 37AC_PREREQ(2.59) 38AM_CONFIG_HEADER(LTTconfig.h) 39AC_PROG_CC 40AC_AIX 41AM_PROG_LIBTOOL 42 43dnl 44dnl OSF/Motif� 2.1 compatibility is the default version 45dnl 46version=2.1 47version_suffix="-2.1" 48include_version_suffix=-$version 49 50AC_ARG_ENABLE(build-21, 51[ --enable-build-21 build Motif-2.1 compatible version (default)], 52test $enableval = "yes" && version="2.1") 53 54version_suffix=-$version 55include_version_suffix=-$version 56xmVer=$version 57 58AM_CONDITIONAL(Version_1_2, test x$version = x1.2) 59AM_CONDITIONAL(Version_2_0, test x$version = x2.0) 60AM_CONDITIONAL(Version_2_1, test x$version = x2.1) 61 62AC_MSG_RESULT(Building OSF/Motif $version compatible version of LessTif Tests) 63 64AM_PROG_CC_STDC 65dnl No longer necessary - it's in AC_CANONICAL_HOST - AC_CYGWIN 66AC_EXEEXT 67AC_PROG_LN_S 68AM_MAINTAINER_MODE 69 70AC_MSG_CHECKING(compiler flags) 71dnl 72dnl Whether to compile with -g for debugging 73dnl 74AC_ARG_ENABLE(debug, 75[ --enable-debug build LessTif tests with debugging options (-g)(default)], 76, enable_debug=yes) 77 78dnl Don't touch compiler flags, if debugging was not explicitly specified. 79dnl Use environment variables, compiler defaults, etc. 80if test "x$enable_debug" = "xyes" ; then 81 if test "x$CC" = "xgcc" ; then 82 if test "$lt_cs_test_CFLAGS" = "set" ; then 83 if [ echo "$CFLAGS" | grep -v -e "\-g" > /dev/null ] ; then 84 if test $ac_cv_prog_cc_g = yes ; then 85 CFLAGS="$CFLAGS -g" 86 fi 87 fi 88 else 89 debug_flags=-Wall 90 if echo $CFLAGS | grep -e "\-g" > /dev/null ; then 91 CFLAGS=-g 92 else 93 CFLAGS= 94 fi 95 fi 96 else 97 if test "$lt_cs_test_CFLAGS" = "set" ; then 98 if [ echo "$CFLAGS" | grep -v -e "\-g" > /dev/null ] ; then 99 if test $ac_cv_prog_cc_g = yes ; then 100 CFLAGS="$CFLAGS -g" 101 fi 102 fi 103 else 104 debug_flags= 105 if test $ac_cv_prog_cc_g = yes ; then 106 CFLAGS=-g 107 else 108 CFLAGS= 109 fi 110 fi 111 fi 112fi 113AC_MSG_RESULT("$CFLAGS $debug_flags") 114 115 116AC_CHECK_PROG(AR, ar, ar, ar) 117AC_PROG_MAKE_SET 118AC_PROG_INSTALL 119 120dnl 121dnl check for ANSI C89 compatibility and then do never check 122dnl for such stuff again! 123dnl 124AC_HEADER_STDC 125AC_C_CONST 126 127# function checks 128AC_CHECK_FUNCS(access chdir close getcwd getpwnam getpwuid) 129AC_CHECK_FUNCS(mkdir open popen sbrk symlink) 130 131dnl Misc other stuff 132AC_CHECK_HEADERS(fcntl.h pwd.h) 133AC_CHECK_HEADERS(sys/param.h sys/stat.h sys/time.h sys/types.h) 134AC_CHECK_HEADERS(unistd.h) 135AC_HEADER_TIME 136 137dnl Search for X11 headers/libs 138AC_PATH_X 139AC_PATH_XTRA 140 141if test "x$x_includes" = "x"; then 142 x_includes="/usr/include" 143fi 144 145dnl Set the CFLAGS variable to the location of the found X-header files 146dnl This is necessary for the tests below to work ! 147dnl 148lt_save_CFLAGS="$CFLAGS" 149if test "x$x_includes" != x ; then 150 CFLAGS="$CFLAGS -I$x_includes" 151fi 152 153XTversion="" 154AC_XT_VERSION6 155 156if test "x$XTversion" = x ; then 157 AC_XT_VERSION5 158 if test "x$XTversion" = x; then 159 AC_MSG_ERROR(You must have X11 Revision 5 or higher to compile the Lesstif tests) 160 else 161 AC_MSG_RESULT(revision 5) 162 fi 163else 164 AC_MSG_RESULT(revision 6) 165fi 166 167dnl Check for print extensions 168LT_HAVE_LIBXP 169 170dnl Third party stuff 171AC_CHECK_HEADER(GL/GLwMDrawA.h,[AC_DEFINE(HAVE_GL_GLWMDRAWA_H)],[],[#include <X11/Intrinsic.h>]) 172 173dnl malloc debugging 174LT_WITH_DMALLOC 175 176AC_PATH_MOTIF 177if test -n "$motif_includes"; then 178 MOTIF_CFLAGS="-I$motif_includes" 179fi 180AC_SUBST(MOTIF_CFLAGS) 181if test -n "$motif_libraries"; then 182 MOTIF_LIBS="-L$motif_libraries" 183fi 184AC_SUBST(MOTIF_LIBS) 185 186AM_CONDITIONAL(MotifTests, test x$no_motif != xyes) 187 188 189AC_MSG_CHECKING(whether to link -lXp) 190if test $lt_cv_libxp = yes; 191then 192 XPLIB="-lXp -lXext" 193 AC_MSG_RESULT(yes) 194else 195 XPLIB="" 196 AC_MSG_RESULT(no) 197fi 198AC_SUBST(XPLIB) 199 200dnl Adjust some standard variables 201 202CFLAGS="$CFLAGS $debug_flag" 203GPROF_FLAGS="-pg" 204GPROF_CFLAGS="" 205EXTRACFLAGS="" 206extralibs="" 207run_libraries="" 208 209case ${with_static} in 210 yes) static_prefix=;; 211 no) static_prefix="#";; 212esac 213 214dnl 215dnl Now ensure that all required variables get substituted! 216dnl 217 218AC_SUBST(libdir) 219AC_SUBST(bindir) 220 221AC_SUBST(version_suffix) 222AC_SUBST(include_version_suffix) 223AC_SUBST(xmVer) 224 225AC_SUBST(CFLAGS) 226AC_SUBST(x_lib_path) 227AC_SUBST(x_libraries) 228AC_SUBST(x_inc_path) 229AC_SUBST(x_includes) 230AC_SUBST(motif_libraries) 231AC_SUBST(motif_includes) 232AC_SUBST(extralibs) 233 234AC_SUBST(subdirs) 235 236dnl for libtool 237AC_SUBST(LIBTOOL_VERSION) 238AC_SUBST(MAJOR_VERSION) 239AC_SUBST(MINOR_VERSION) 240AC_SUBST(PICO_VERSION) 241AC_SUBST(DLLTOOL) 242AC_SUBST(OBJDUMP) 243AC_SUBST(AS) 244 245dnl 246dnl Which output files do we generate ? 247dnl 248 249AC_CONFIG_FILES([Makefile \ 250common/Makefile \ 251config/Makefile \ 252Xm/Makefile \ 253Xm/arrowbg/Makefile \ 254Xm/arrowbutton/Makefile \ 255Xm/baseclass/Makefile \ 256Xm/bulletinboard/Makefile \ 257Xm/cascadebutton/Makefile \ 258Xm/cascadebuttong/Makefile \ 259Xm/command/Makefile \ 260Xm/cutpaste/Makefile \ 261Xm/dialogs/Makefile \ 262Xm/drag_drop/Makefile \ 263Xm/drag_help/Makefile \ 264Xm/drag_icon/Makefile \ 265Xm/drag_move/Makefile \ 266Xm/drag_pixmaps/Makefile \ 267Xm/drag_simple/Makefile \ 268Xm/drawingarea/Makefile \ 269Xm/drawnbutton/Makefile \ 270Xm/dynamic_drag/Makefile \ 271Xm/extobj/Makefile \ 272Xm/filesb/Makefile \ 273Xm/fonts/Makefile \ 274Xm/form/Makefile \ 275Xm/frame/Makefile \ 276Xm/geometry/Makefile \ 277Xm/imagecache/Makefile \ 278Xm/label/Makefile \ 279Xm/labelg/Makefile \ 280Xm/list/Makefile \ 281Xm/mainw/Makefile \ 282Xm/menushell/Makefile \ 283Xm/messagebox/Makefile \ 284Xm/misc/Makefile \ 285Xm/mwm/Makefile \ 286Xm/panedw/Makefile \ 287Xm/protocols/Makefile \ 288Xm/pushbg/Makefile \ 289Xm/pushbutton/Makefile \ 290Xm/region/Makefile \ 291Xm/reptype/Makefile \ 292Xm/resconvert/Makefile \ 293Xm/resind/Makefile \ 294Xm/rowcolumn/Makefile \ 295Xm/scale/Makefile \ 296Xm/screen/Makefile \ 297Xm/scrollbar/Makefile \ 298Xm/scrolledwindow/Makefile \ 299Xm/selectionbox/Makefile \ 300Xm/selections/Makefile \ 301Xm/separator/Makefile \ 302Xm/sepg/Makefile \ 303Xm/tearoff/Makefile \ 304Xm/text/Makefile \ 305Xm/textf/Makefile \ 306Xm/togglebg/Makefile \ 307Xm/togglebutton/Makefile \ 308Xm/tracking/Makefile \ 309Xm/traversal/Makefile \ 310Xm/vasimple/Makefile \ 311Xm/vendor/Makefile \ 312Xm/virtualkeys/Makefile \ 313Xm/xmos/Makefile \ 314Xm/xmstring/Makefile \ 315Xm-2.0/Makefile \ 316Xm-2.0/combobox/Makefile \ 317Xm-2.0/container/Makefile \ 318Xm-2.0/draw/Makefile \ 319Xm-2.0/grabshell/Makefile \ 320Xm-2.0/icong/Makefile \ 321Xm-2.0/messages/Makefile \ 322Xm-2.0/notebook/Makefile \ 323Xm-2.0/rendition/Makefile \ 324Xm-2.0/spinbox/Makefile \ 325Xm-2.0/translations/Makefile \ 326Xm-2.0/trait/Makefile \ 327Xm-2.0/xme/Makefile \ 328Xm-2.1/Makefile \ 329Xm-2.1/messages/Makefile \ 330Xm-2.1/print/Makefile \ 331Xm-2.1/translations/Makefile \ 332Mrm/Makefile \ 333Mrm/ch22/Makefile \ 334Mrm/mrm/Makefile \ 335Mrm/xmp/Makefile \ 336Uil/Makefile \ 337Uil/misc/Makefile \ 338extra/Makefile \ 339extra/cmap/Makefile \ 340extra/gl/Makefile \ 341extra/daniel/Makefile \ 342extra/megabutton/Makefile \ 343extra/newtoggleb/Makefile \ 344extra/smartmb/Makefile \ 345extra/spinbutton/Makefile \ 346extra/togglebplus/Makefile \ 347extra/Xlab/Makefile \ 348testall]) 349AC_OUTPUT 350 351dnl 352dnl The End. 353dnl 354