1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(./the.c)
dnl ---------------------- check for C compiler -----------------
dnl Checks for one of the C compilers below - change if yours not there.
CC_LIST="c89 acc gcc cc"
MH_PROG_CC
AC_CONFIG_HEADER(config.h)
AC_ISC_POSIX
dnl Checks for system first
AC_CANONICAL_SYSTEM
AC_PROG_GCC_TRADITIONAL
case "$target" in
*hp-hpux*)
SYS_DEFS="-D_HPUX_SOURCE"
;;
*ibm-aix*)
SYS_DEFS="-D_ALL_SOURCE"
;;
*dec-osf4*)
AC_DEFINE(HAVE_BROKEN_SYS_ACL_H)
;;
*dec-osf*)
;;
*sequent-dynix*)
;;
*solaris*)
;;
sparc*sunos*)
;;
*linux*)
;;
esac
AC_SUBST(SYS_DEFS)
dnl ---------------------- check for Curses argument -----------------
dnl allow --with-xcurses to link with XCurses
AC_ARG_WITH(xcurses,
[ --with-xcurses link with XCurses],
[with_xcurses=$withval],
[with_xcurses=no],
)
dnl allow --with-ncurses to link with ncurses
AC_ARG_WITH(ncurses,
[ --with-ncurses link with ncurses],
[with_ncurses=$withval],
[with_ncurses=no],
)
dnl allow --with-extcurses to link with AIX Extended curses
AC_ARG_WITH(extcurses,
[ --with-extcurses link with AIX Extended curses],
[with_extcurses=$withval],
[with_extcurses=no],
)
dnl allow --with-cursesincdir to specify where Curses header file is
AC_ARG_WITH(cursesincdir,
[ --with-cursesincdir=DIR specify where curses header file is],
[with_cursesincdir=$withval],
[with_cursesincdir=no],
)
dnl allow --with-curseslibdir to specify where Curses library file is
AC_ARG_WITH(curseslibdir,
[ --with-curseslibdir=DIR specify where curses library file is],
[with_curseslibdir=$withval],
[with_curseslibdir=no],
)
dnl ---------------------- check for REXX argument -----------------
dnl allow --with-regina to link with Regina
AC_ARG_WITH(regina,
[ --with-regina link with Regina],
[with_regina=$withval],
[with_regina=no],
)
dnl allow --with-rexximc to link with REXX/imc
AC_ARG_WITH(rexximc,
[ --with-rexximc link with REXX/imc],
[with_rexximc=$withval],
[with_rexximc=no],
)
dnl allow --with-rexx6000 to link with AIX REXX/6000
AC_ARG_WITH(rexx6000,
[ --with-rexx6000 link with AIX REXX/6000],
[with_rexx6000=$withval],
[with_rexx6000=no],
)
dnl allow --with-orexx to link with IBM Object Rexx
AC_ARG_WITH(orexx,
[ --with-orexx link with IBM Object Rexx],
[with_orexx=$withval],
[with_orexx=no],
)
dnl allow --with-rexxincdir to specify where REXX header file is
AC_ARG_WITH(rexxincdir,
[ --with-rexxincdir=DIR specify where REXX header file is],
[with_rexxincdir=$withval],
[with_rexxincdir=no],
)
dnl allow --with-rexxlibdir to specify where REXX library file is
AC_ARG_WITH(rexxlibdir,
[ --with-rexxlibdir=DIR specify where REXX library file is],
[with_rexxlibdir=$withval],
[with_rexxlibdir=no],
)
dnl ---------------------- check packages -----------------------
dnl Check for X libraries if using XCurses
dnl
MH_XLIBS=""
MH_XINC_DIR=""
if test "$with_xcurses" = yes; then
MH_CHECK_X_LIB
fi
MH_CHECK_CURSES
MH_CHECK_REXX
dnl --------------------- Check for other programs. ---------------
AC_PROG_LN_S
AC_PROG_MAKE_SET
MH_CHECK_LIB(dld m dl s)
if test "$with_regina" = yes; then
MH_CHECK_LEX(fl l)
MH_EXTRA_LIBS="${MH_EXTRA_LIBS} ${MHLEXLIB}"
fi
AC_SUBST(MH_EXTRA_LIBS)
dnl -------------------- Checks for header files. -----------------
AC_HEADER_STDC
AC_CHECK_HEADERS( \
ctype.h \
sys/types.h \
sys/mode.h \
sys/stat.h \
sys/file.h \
sys/wait.h \
sys/acl.h \
unistd.h \
stdlib.h \
memory.h \
fcntl.h \
string.h \
stdarg.h \
stat.h \
dirent.h \
time.h \
linux/stat.h \
)
MH_HAVE_PROTO
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
MH_FUNC_ACL_GET
AC_CHECK_FUNCS(rename getopt lstat readlink getacl chown)
if test "$ac_cv_func_getopt_func" = no; then
MH_XTRA_OBJS="$MH_XTRA_OBJS getopt.o"
fi
MH_CHECK_CHTYPE
MH_CHECK_BROKEN_SYSVR4_CURSES
MH_CURSES_FUNCS
dnl --------------- allow --enable-debug to compile in debug mode --------
AC_ARG_ENABLE(debug,
[ --enable-debug turn on debugging],
[with_debug=$enableval],
[with_debug=no],
)
cflags_g="`echo $CFLAGS | grep -c '\-g'`"
cflags_O="`echo $CFLAGS | grep -c '\-O'`"
if test "$with_debug" = yes; then
if test "$cflags_g" = "0"; then
CFLAGS="${CFLAGS} -g"
fi
if test "$cflags_O" != "0"; then
CFLAGS="`echo ${CFLAGS} | sed -e s/-O.//`"
fi
else
if test "$cflags_O" = "0"; then
CFLAGS="${CFLAGS} -O"
fi
if test "$cflags_g" != "0"; then
CFLAGS="`echo ${CFLAGS} | sed -e s/-g//`"
fi
fi
dnl --------------- allow --enable-trace to log trace information --------
AC_ARG_ENABLE(trace,
[ --enable-trace turn on tracing],
[with_trace=$enableval;AC_DEFINE(TRACE)],
[with_trace=no]
)
if test "$with_trace" = yes; then
MH_XTRA_OBJS="$MH_XTRA_OBJS trace.o"
fi
AC_SUBST(MH_XTRA_OBJS)
dnl --------------- allow --enable-purify to enable linking with Purify
AC_ARG_ENABLE(purify,
[ --enable-purify link with Purify (TM)],
[with_purify=$enableval],
[with_purify=no],
)
if test "$with_purify" = yes; then
PURIFY="purify"
else
PURIFY=""
fi
AC_SUBST(PURIFY)
dnl ---------------------- check for Xaw3d library -------------------
dnl allow --with-xaw3d to link with XCurses
AC_ARG_WITH(xaw3d,
[ --with-xaw3d link with Xaw3d],
[with_xaw3d=$withval],
[with_xaw3d=no],
)
dnl --------------- Force definition of pre-compiler macro UNIX ----------
AC_DEFINE(UNIX)
dnl --------------- Force definition of this build number ----------------
AC_DEFINE(BUILD2501)
dnl --------------- Find us an xterm if using XCurses --------------------
MH_FIND_XTERM
dnl --------------- Get us an install package ----------------------------
AC_PROG_INSTALL
thisdir="`pwd`"
AC_SUBST(thisdir)
AC_OUTPUT(Makefile)
|