|
|
@ -1,21 +1,23 @@
|
|
|
|
# $Id$
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
|
|
|
|
AC_INIT(src/main.c)
|
|
|
|
AC_INIT([elk],[3.99.8])
|
|
|
|
|
|
|
|
AC_CONFIG_SRCDIR([src/main.c])
|
|
|
|
|
|
|
|
|
|
|
|
AC_PREREQ(2.50)
|
|
|
|
AC_PREREQ([2.71])
|
|
|
|
AC_CONFIG_AUX_DIR(.auto)
|
|
|
|
AC_CONFIG_AUX_DIR(.auto)
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
AC_CONFIG_MACRO_DIRS([m4])
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE(elk, 3.99.8)
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
dnl AM_MAINTAINER_MODE
|
|
|
|
dnl AM_MAINTAINER_MODE
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
LT_INIT([win32-dll])
|
|
|
|
AC_STDC_HEADERS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_INLINE
|
|
|
@ -24,6 +26,24 @@ AC_TYPE_SIZE_T
|
|
|
|
# Check whether we are doing a native build
|
|
|
|
# Check whether we are doing a native build
|
|
|
|
AM_CONDITIONAL(NATIVE_BUILD, test "${cross_compiling}" = "no")
|
|
|
|
AM_CONDITIONAL(NATIVE_BUILD, test "${cross_compiling}" = "no")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH([x11],
|
|
|
|
|
|
|
|
[AS_HELP_STRING([--with-x11],
|
|
|
|
|
|
|
|
[enable support for libx11])],
|
|
|
|
|
|
|
|
[],
|
|
|
|
|
|
|
|
[with_x11=no])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH([xt],
|
|
|
|
|
|
|
|
[AS_HELP_STRING([--with-xt],
|
|
|
|
|
|
|
|
[enable support for libxt])],
|
|
|
|
|
|
|
|
[],
|
|
|
|
|
|
|
|
[with_xt=no])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH([xaw],
|
|
|
|
|
|
|
|
[AS_HELP_STRING([--with-xaw],
|
|
|
|
|
|
|
|
[enable support for libxaw])],
|
|
|
|
|
|
|
|
[],
|
|
|
|
|
|
|
|
[with_xaw=no])
|
|
|
|
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(inttypes.h,
|
|
|
|
AC_CHECK_HEADERS(inttypes.h,
|
|
|
|
[STDINT_HEADER="<inttypes.h>"],
|
|
|
|
[STDINT_HEADER="<inttypes.h>"],
|
|
|
|
[AC_CHECK_HEADERS(sys/inttypes.h,
|
|
|
|
[AC_CHECK_HEADERS(sys/inttypes.h,
|
|
|
@ -320,13 +340,9 @@ AC_CHECK_FUNCS(fpurge)
|
|
|
|
|
|
|
|
|
|
|
|
AC_CACHE_CHECK([for BSD-style flushing],
|
|
|
|
AC_CACHE_CHECK([for BSD-style flushing],
|
|
|
|
[ac_cv_have_bsd_flush],
|
|
|
|
[ac_cv_have_bsd_flush],
|
|
|
|
[AC_TRY_COMPILE(
|
|
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[FILE *f;
|
|
|
|
[#include <stdio.h>],
|
|
|
|
|
|
|
|
[FILE *f;
|
|
|
|
|
|
|
|
f->_cnt = 0;
|
|
|
|
f->_cnt = 0;
|
|
|
|
f->_ptr = f->_base;],
|
|
|
|
f->_ptr = f->_base;]])],[ac_cv_have_bsd_flush=yes],[ac_cv_have_bsd_flush=no])])
|
|
|
|
ac_cv_have_bsd_flush=yes,
|
|
|
|
|
|
|
|
ac_cv_have_bsd_flush=no)])
|
|
|
|
|
|
|
|
if test "${ac_cv_have_bsd_flush}" = "yes"; then
|
|
|
|
if test "${ac_cv_have_bsd_flush}" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_BSD_FLUSH, 1, [Define if you have BSD-style flushing])
|
|
|
|
AC_DEFINE(HAVE_BSD_FLUSH, 1, [Define if you have BSD-style flushing])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -339,8 +355,7 @@ AC_CHECK_HEADERS(termio.h termios.h)
|
|
|
|
AC_CHECK_FUNCS(getrlimit)
|
|
|
|
AC_CHECK_FUNCS(getrlimit)
|
|
|
|
AC_CACHE_CHECK([for struct rlimit],
|
|
|
|
AC_CACHE_CHECK([for struct rlimit],
|
|
|
|
[ac_cv_have_struct_rlimit],
|
|
|
|
[ac_cv_have_struct_rlimit],
|
|
|
|
[AC_TRY_COMPILE(
|
|
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_SYS_TIME_H
|
|
|
|
[#ifdef HAVE_SYS_TIME_H
|
|
|
|
|
|
|
|
# include <sys/time.h>
|
|
|
|
# include <sys/time.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_RESOURCE_H
|
|
|
|
#ifdef HAVE_SYS_RESOURCE_H
|
|
|
@ -348,10 +363,7 @@ AC_CACHE_CHECK([for struct rlimit],
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif],
|
|
|
|
#endif]], [[struct rlimit rl;]])],[ac_cv_have_struct_rlimit=yes],[ac_cv_have_struct_rlimit=no])])
|
|
|
|
[struct rlimit rl;],
|
|
|
|
|
|
|
|
ac_cv_have_struct_rlimit=yes,
|
|
|
|
|
|
|
|
ac_cv_have_struct_rlimit=no)])
|
|
|
|
|
|
|
|
if test "${ac_cv_have_struct_rlimit}" = "yes"; then
|
|
|
|
if test "${ac_cv_have_struct_rlimit}" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_STRUCT_RLIMIT, 1, [Define if you have struct rlimit])
|
|
|
|
AC_DEFINE(HAVE_STRUCT_RLIMIT, 1, [Define if you have struct rlimit])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -453,14 +465,14 @@ LDFLAGS_save="${LDFLAGS}"
|
|
|
|
AC_CACHE_CHECK([if \$CXX really works],
|
|
|
|
AC_CACHE_CHECK([if \$CXX really works],
|
|
|
|
[ac_cv_my_have_cxx],
|
|
|
|
[ac_cv_my_have_cxx],
|
|
|
|
[AC_LANG_PUSH(C++)
|
|
|
|
[AC_LANG_PUSH(C++)
|
|
|
|
AC_TRY_COMPILE([],,ac_cv_my_have_cxx=yes, ac_cv_my_have_cxx=no)
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_my_have_cxx=yes],[ac_cv_my_have_cxx=no])
|
|
|
|
AC_LANG_POP(C++)])
|
|
|
|
AC_LANG_POP(C++)])
|
|
|
|
AM_CONDITIONAL(HAVE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
|
|
|
|
AM_CONDITIONAL(HAVE_CXX, test "${ac_cv_my_have_cxx}" = "yes")
|
|
|
|
|
|
|
|
|
|
|
|
AC_CACHE_CHECK([if \$CC accepts -Wall],
|
|
|
|
AC_CACHE_CHECK([if \$CC accepts -Wall],
|
|
|
|
[ac_cv_c_Wall],
|
|
|
|
[ac_cv_c_Wall],
|
|
|
|
[CFLAGS="-Wall ${CFLAGS_save}"
|
|
|
|
[CFLAGS="-Wall ${CFLAGS_save}"
|
|
|
|
AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_c_Wall=yes],[ac_cv_c_Wall=no])])
|
|
|
|
if test "x${ac_cv_c_Wall}" != "xno"; then
|
|
|
|
if test "x${ac_cv_c_Wall}" != "xno"; then
|
|
|
|
CFLAGS_save="-Wall ${CFLAGS_save}"
|
|
|
|
CFLAGS_save="-Wall ${CFLAGS_save}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -470,7 +482,7 @@ CFLAGS_warn="-Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wmissing-prototy
|
|
|
|
AC_CACHE_CHECK([if \$CC accepts ${CFLAGS_warn}],
|
|
|
|
AC_CACHE_CHECK([if \$CC accepts ${CFLAGS_warn}],
|
|
|
|
[ac_cv_c_Wwarn],
|
|
|
|
[ac_cv_c_Wwarn],
|
|
|
|
[CFLAGS="${CFLAGS_warn} ${CFLAGS_save}"
|
|
|
|
[CFLAGS="${CFLAGS_warn} ${CFLAGS_save}"
|
|
|
|
AC_TRY_COMPILE([],,ac_cv_c_Wwarn=yes, ac_cv_c_Wwarn=no)])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_c_Wwarn=yes],[ac_cv_c_Wwarn=no])])
|
|
|
|
if test "x${ac_cv_c_Wwarn}" != "xno"; then
|
|
|
|
if test "x${ac_cv_c_Wwarn}" != "xno"; then
|
|
|
|
CFLAGS_save="${CFLAGS_warn} ${CFLAGS_save}"
|
|
|
|
CFLAGS_save="${CFLAGS_warn} ${CFLAGS_save}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -490,48 +502,51 @@ AC_PATH_X
|
|
|
|
if test -n "${x_includes}"; then x_cflags="-I${x_includes}"; fi
|
|
|
|
if test -n "${x_includes}"; then x_cflags="-I${x_includes}"; fi
|
|
|
|
if test -n "${x_libraries}"; then x_libs="-I${x_libraries}"; fi
|
|
|
|
if test -n "${x_libraries}"; then x_libs="-I${x_libraries}"; fi
|
|
|
|
|
|
|
|
|
|
|
|
AC_CHECK_LIB(X11, XOpenDisplay,
|
|
|
|
ac_cv_my_have_x11=no
|
|
|
|
[ac_cv_my_have_x11=yes
|
|
|
|
AS_IF([test "x$with_x11" != xno],
|
|
|
|
X_CFLAGS="${x_cflags}"
|
|
|
|
[AC_CHECK_LIB(X11, XOpenDisplay,
|
|
|
|
X_LIBS="${x_libs} -lX11"],
|
|
|
|
[ac_cv_my_have_x11=yes
|
|
|
|
[ac_cv_my_have_x11=no],
|
|
|
|
X_CFLAGS="${x_cflags}"
|
|
|
|
[[${x_libs}]])
|
|
|
|
X_LIBS="${x_libs} -lX11"],
|
|
|
|
|
|
|
|
[ac_cv_my_have_x11=no],
|
|
|
|
|
|
|
|
[[${x_libs}]])])
|
|
|
|
AM_CONDITIONAL(HAVE_X11, test "${ac_cv_my_have_x11}" = "yes")
|
|
|
|
AM_CONDITIONAL(HAVE_X11, test "${ac_cv_my_have_x11}" = "yes")
|
|
|
|
AC_SUBST(X_CFLAGS)
|
|
|
|
AC_SUBST(X_CFLAGS)
|
|
|
|
AC_SUBST(X_LIBS)
|
|
|
|
AC_SUBST(X_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
if test "${cross_compiling}" = "no"; then
|
|
|
|
ac_cv_my_have_xt=no
|
|
|
|
AC_CHECK_LIB(Xt, XtFree,
|
|
|
|
AS_IF([test "x$with_xt" != xno],
|
|
|
|
[ac_cv_my_have_xt=yes
|
|
|
|
[AC_CHECK_LIB(Xt, XtFree,
|
|
|
|
AC_CHECK_LIB(Xmu, XmuDrawLogo,
|
|
|
|
if test "${cross_compiling}" = "no"; then
|
|
|
|
[XT_CFLAGS="${x_cflags}"
|
|
|
|
[ac_cv_my_have_xt=yes
|
|
|
|
XT_LIBS="${x_libs} -lXmu -lXt -lSM -lICE -lXext -lX11"],
|
|
|
|
AC_CHECK_LIB(Xmu, XmuDrawLogo,
|
|
|
|
[XT_CFLAGS="${x_cflags}"
|
|
|
|
[XT_CFLAGS="${x_cflags}"
|
|
|
|
XT_LIBS="${x_libs} -lXt -lSM -lICE -lXext -lX11"],
|
|
|
|
XT_LIBS="${x_libs} -lXmu -lXt -lSM -lICE -lXext -lX11"],
|
|
|
|
[[-lXt -lSM -lICE -lXext -lX11 ${x_libs}]])],
|
|
|
|
[XT_CFLAGS="${x_cflags}"
|
|
|
|
[ac_cv_my_have_xt=no],
|
|
|
|
XT_LIBS="${x_libs} -lXt -lSM -lICE -lXext -lX11"],
|
|
|
|
[[-lSM -lICE -lXext -lX11 ${x_libs}]])
|
|
|
|
[[-lXt -lSM -lICE -lXext -lX11 ${x_libs}]])],
|
|
|
|
else
|
|
|
|
[ac_cv_my_have_xt=no],
|
|
|
|
ac_cv_my_have_xt=no
|
|
|
|
[[-lSM -lICE -lXext -lX11 ${x_libs}]])
|
|
|
|
fi
|
|
|
|
fi])
|
|
|
|
AM_CONDITIONAL(HAVE_XT, test "${ac_cv_my_have_xt}" = "yes")
|
|
|
|
AM_CONDITIONAL(HAVE_XT, test "${ac_cv_my_have_xt}" = "yes")
|
|
|
|
AC_SUBST(XT_CFLAGS)
|
|
|
|
AC_SUBST(XT_CFLAGS)
|
|
|
|
AC_SUBST(XT_LIBS)
|
|
|
|
AC_SUBST(XT_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
if test "${cross_compiling}" = "no"; then
|
|
|
|
ac_cv_my_have_xaw=no
|
|
|
|
AC_CHECK_LIB(Xaw, XawTextSearch,
|
|
|
|
AS_IF([test "x$with_xaw" != xno],
|
|
|
|
[ac_cv_my_have_xaw=yes
|
|
|
|
[if test "${cross_compiling}" = "no"; then
|
|
|
|
XAW_CFLAGS="${x_cflags}"
|
|
|
|
AC_CHECK_LIB(Xaw, XawTextSearch,
|
|
|
|
XAW_LIBS="${x_libs} -lXaw ${XT_LIBS}"],
|
|
|
|
[ac_cv_my_have_xaw=yes
|
|
|
|
[ac_cv_my_have_xaw=no],
|
|
|
|
XAW_CFLAGS="${x_cflags}"
|
|
|
|
[[${XT_LIBS}]])
|
|
|
|
XAW_LIBS="${x_libs} -lXaw ${XT_LIBS}"],
|
|
|
|
else
|
|
|
|
[ac_cv_my_have_xaw=no],
|
|
|
|
ac_cv_my_have_xaw="no (cross-compiling)"
|
|
|
|
[[${XT_LIBS}]])
|
|
|
|
fi
|
|
|
|
fi])
|
|
|
|
AM_CONDITIONAL(HAVE_XAW, test "${ac_cv_my_have_xaw}" = "yes")
|
|
|
|
AM_CONDITIONAL(HAVE_XAW, test "${ac_cv_my_have_xaw}" = "yes")
|
|
|
|
AC_SUBST(XAW_CFLAGS)
|
|
|
|
AC_SUBST(XAW_CFLAGS)
|
|
|
|
AC_SUBST(XAW_LIBS)
|
|
|
|
AC_SUBST(XAW_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ac_cv_my_have_motif=no
|
|
|
|
if test "${cross_compiling}" = "no"; then
|
|
|
|
if test "${cross_compiling}" = "no"; then
|
|
|
|
AC_CHECK_LIB(Xm, XmStringConcat,
|
|
|
|
AC_CHECK_LIB(Xm, XmStringConcat,
|
|
|
|
[ac_cv_my_have_motif=yes
|
|
|
|
[ac_cv_my_have_motif=yes
|
|
|
@ -539,15 +554,13 @@ if test "${cross_compiling}" = "no"; then
|
|
|
|
MOTIF_LIBS="${x_libs} -lXm ${XT_LIBS}"],
|
|
|
|
MOTIF_LIBS="${x_libs} -lXm ${XT_LIBS}"],
|
|
|
|
[ac_cv_my_have_motif=no],
|
|
|
|
[ac_cv_my_have_motif=no],
|
|
|
|
[[${XT_LIBS}]])
|
|
|
|
[[${XT_LIBS}]])
|
|
|
|
else
|
|
|
|
|
|
|
|
ac_cv_my_have_motif="no (cross-compiling)"
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_MOTIF, test "${ac_cv_my_have_motif}" = "yes")
|
|
|
|
AM_CONDITIONAL(HAVE_MOTIF, test "${ac_cv_my_have_motif}" = "yes")
|
|
|
|
AC_SUBST(MOTIF_CFLAGS)
|
|
|
|
AC_SUBST(MOTIF_CFLAGS)
|
|
|
|
AC_SUBST(MOTIF_LIBS)
|
|
|
|
AC_SUBST(MOTIF_LIBS)
|
|
|
|
|
|
|
|
|
|
|
|
INCLUDES="${INCLUDES} -I\$(top_srcdir)/include -I\$(top_builddir)/include"
|
|
|
|
AM_CPPFLAGS="${INCLUDES} -I\$(top_srcdir)/include -I\$(top_builddir)/include"
|
|
|
|
AC_SUBST(INCLUDES)
|
|
|
|
AC_SUBST(AM_CPPFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
dnl Export variables
|
|
|
|
dnl Export variables
|
|
|
|
AC_SUBST(ELK_CFLAGS)
|
|
|
|
AC_SUBST(ELK_CFLAGS)
|
|
|
@ -620,4 +633,3 @@ Xaw support: ${ac_cv_my_have_xaw}
|
|
|
|
Motif support: ${ac_cv_my_have_motif}
|
|
|
|
Motif support: ${ac_cv_my_have_motif}
|
|
|
|
build documentation: ${ac_cv_my_have_groff}
|
|
|
|
build documentation: ${ac_cv_my_have_groff}
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|