home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
the25.zip
/
thesrc251.zip
/
configure.in
< prev
next >
Wrap
Text File
|
1998-05-07
|
6KB
|
255 lines
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-unirexx to link with uni-REXX
AC_ARG_WITH(unirexx,
[ --with-unirexx link with uni-REXX],
[with_unirexx=$withval],
[with_unirexx=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(BUILD2502)
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)