| 1 |
AC_INIT |
| 2 |
AC_CONFIG_SRCDIR([newt_pr.h]) |
| 3 |
|
| 4 |
PACKAGE=newt |
| 5 |
VERSION=0.52.25 |
| 6 |
SONAME=0.52 |
| 7 |
|
| 8 |
AC_CONFIG_HEADERS([config.h]) |
| 9 |
|
| 10 |
AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Package Name]) |
| 11 |
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [NEWT Version String]) |
| 12 |
AC_SUBST([VERSION]) |
| 13 |
AC_SUBST([SONAME]) |
| 14 |
AC_PROG_CC |
| 15 |
AC_PROG_LN_S |
| 16 |
AC_PROG_GREP |
| 17 |
AC_SYS_LARGEFILE |
| 18 |
|
| 19 |
AC_CHECK_SIZEOF([long]) |
| 20 |
AC_CHECK_SIZEOF([long long]) |
| 21 |
AC_CHECK_SIZEOF([void *]) |
| 22 |
|
| 23 |
# Are we using GNU ld? |
| 24 |
AC_MSG_CHECKING([for GNU ld]) |
| 25 |
LD=$($CC -print-prog-name=ld 2>&5) |
| 26 |
|
| 27 |
if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld") = 0; then |
| 28 |
# Not |
| 29 |
GNU_LD="" |
| 30 |
AC_MSG_RESULT([no]) |
| 31 |
else |
| 32 |
GNU_LD="$LD" |
| 33 |
AC_MSG_RESULT([yes]) |
| 34 |
AC_SUBST([GNU_LD]) |
| 35 |
fi |
| 36 |
|
| 37 |
AC_CHECK_HEADERS([sys/select.h alloca.h]) |
| 38 |
AC_CHECK_HEADER([slang.h], [], [ |
| 39 |
old_CPPFLAGS=${CPPFLAGS} |
| 40 |
CPPFLAGS="${CPPFLAGS} -I/opt/local/include" |
| 41 |
unset ac_cv_header_slang_h |
| 42 |
AC_CHECK_HEADER([slang.h]) |
| 43 |
if test x$ac_cv_header_slang_h = x; then |
| 44 |
CPPFLAGS="${old_CPPFLAGS}" |
| 45 |
else |
| 46 |
LDFLAGS="${LDFLAGS} -L/opt/local/lib" |
| 47 |
fi |
| 48 |
]) |
| 49 |
if test x$ac_cv_header_slang_h = x; then |
| 50 |
old_CPPFLAGS=${CPPFLAGS} |
| 51 |
CPPFLAGS="${CPPFLAGS} -I/sw/include" |
| 52 |
AC_CHECK_HEADER([slang.h]) |
| 53 |
if test x$ac_cv_header_slang_h = x; then |
| 54 |
CPPFLAGS=${old_CPPFLAGS} |
| 55 |
else |
| 56 |
LDFLAGS="${LDFLAGS} -L/sw/lib" |
| 57 |
fi |
| 58 |
fi |
| 59 |
AC_CHECK_HEADERS([popt.h libintl.h]) |
| 60 |
|
| 61 |
AC_MSG_CHECKING([for python versions]) |
| 62 |
AC_ARG_WITH([python], [ --without-python do not compile python support], |
| 63 |
[], [with_python="yes"]) |
| 64 |
if test "x$with_python" = "xno"; then |
| 65 |
AC_MSG_RESULT([skipped]) |
| 66 |
PYTHONVERS= |
| 67 |
else |
| 68 |
if test "x$with_python" = "xyes"; then |
| 69 |
PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | \ |
| 70 |
sed 's|.*\(python[[0-9]]*\.[[0-9]]*\).*|\1|g' | tr '\n' ' ') |
| 71 |
else |
| 72 |
PYTHONVERS="$with_python" |
| 73 |
fi |
| 74 |
AC_MSG_RESULT([$PYTHONVERS]) |
| 75 |
fi |
| 76 |
AC_SUBST([PYTHONVERS]) |
| 77 |
|
| 78 |
AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so]) |
| 79 |
if test "x$with_tcl" = "xno"; then |
| 80 |
WHIPTCLLIB= |
| 81 |
else |
| 82 |
AC_MSG_CHECKING([for tcl configuration]) |
| 83 |
|
| 84 |
# check in a few common install locations |
| 85 |
if test x"${ac_cv_c_tclconfig}" = x ; then |
| 86 |
for i in $(ls -d ${libdir} 2>/dev/null) \ |
| 87 |
$(ls -d /usr/lib 2>/dev/null) \ |
| 88 |
$(ls -d /usr/lib64 2>/dev/null) \ |
| 89 |
$(ls -d /usr/local/lib 2>/dev/null) \ |
| 90 |
$(ls -d /usr/contrib/lib 2>/dev/null) \ |
| 91 |
$(ls -d /usr/pkg/lib 2>/dev/null) \ |
| 92 |
$(ls -d /usr/local/lib/tcl8.5 2>/dev/null) \ |
| 93 |
$(ls -d /usr/local/lib/tcl8.4 2>/dev/null) \ |
| 94 |
$(ls -d /usr/lib/tcl8.5 2>/dev/null) \ |
| 95 |
$(ls -d /usr/lib/tcl8.4 2>/dev/null) \ |
| 96 |
$(ls -d /opt/local/lib 2>/dev/null) \ |
| 97 |
; do |
| 98 |
if test -f "$i/tclConfig.sh" ; then |
| 99 |
ac_cv_c_tclconfig=$( (cd $i; pwd) ) |
| 100 |
break |
| 101 |
fi |
| 102 |
done |
| 103 |
fi |
| 104 |
|
| 105 |
if test x"${ac_cv_c_tclconfig}" != x ; then |
| 106 |
AC_MSG_RESULT([found]) |
| 107 |
. ${ac_cv_c_tclconfig}/tclConfig.sh |
| 108 |
AC_SUBST([TCL_LIB_FLAG]) |
| 109 |
WHIPTCLLIB=whiptcl |
| 110 |
# needed with tcl8.6 |
| 111 |
CPPFLAGS="$CPPFLAGS -DUSE_INTERP_RESULT" |
| 112 |
else |
| 113 |
AC_MSG_RESULT([NOT found]) |
| 114 |
fi |
| 115 |
fi |
| 116 |
AC_SUBST([WHIPTCLLIB]) |
| 117 |
|
| 118 |
AC_ARG_WITH([gpm-support], [ --with-gpm-support compile with GPM support]) |
| 119 |
|
| 120 |
if test "x$with_gpm_support" = "xyes"; then |
| 121 |
AC_DEFINE([USE_GPM], 1, [Define to 1 if GPM support is enabled]) |
| 122 |
fi |
| 123 |
|
| 124 |
AC_ARG_ENABLE([nls], [ --disable-nls compile without NLS support]) |
| 125 |
|
| 126 |
if test "x$enable_nls" != "xno"; then |
| 127 |
AC_CHECK_LIB([c], [gettext], [ ], [ |
| 128 |
AC_CHECK_LIB([intl], [gettext], [ |
| 129 |
LIBS="-lintl" |
| 130 |
AC_SUBST([LIBS])], [ |
| 131 |
if test "x$enable_nls" != "xcheck"; then |
| 132 |
AC_MSG_FAILURE([--enable-nls was specified, but the configure check failed]) |
| 133 |
else |
| 134 |
enable_nls=no |
| 135 |
fi |
| 136 |
]) |
| 137 |
]) |
| 138 |
if test "x$enable_nls" != "xno"; then |
| 139 |
AC_DEFINE([ENABLE_NLS], 1, [Define to 1 if NLS support is enabled]) |
| 140 |
fi |
| 141 |
fi |
| 142 |
|
| 143 |
AC_ARG_WITH(colorsfile, [ --with-colorsfile=file set default location of colors file]) |
| 144 |
|
| 145 |
if test "x$with_colorsfile" != "xno"; then |
| 146 |
if test "x$with_colorsfile" != "xyes"; then |
| 147 |
if test "x$with_colorsfile" != "x"; then |
| 148 |
AC_DEFINE_UNQUOTED(NEWT_COLORS_FILE, "$with_colorsfile", [Default NEWT_COLORS_FILE ]) |
| 149 |
fi |
| 150 |
fi |
| 151 |
fi |
| 152 |
|
| 153 |
AC_CONFIG_FILES([Makefile libnewt.pc]) |
| 154 |
AC_OUTPUT |
| 155 |
|