2 AC_CONFIG_SRCDIR([newt_pr.h])
8 AC_CONFIG_HEADERS([config.h])
10 AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Package Name])
11 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [NEWT Version String])
19 AC_CHECK_SIZEOF([long])
20 AC_CHECK_SIZEOF([long long])
21 AC_CHECK_SIZEOF([void *])
23 # Are we using GNU ld?
24 AC_MSG_CHECKING([for GNU ld])
25 LD=`$CC -print-prog-name=ld 2>&5`
27 if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then
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}"
46 LDFLAGS="${LDFLAGS} -L/opt/local/lib"
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}
56 LDFLAGS="${LDFLAGS} -L/sw/lib"
59 AC_CHECK_HEADERS([popt.h libintl.h])
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])
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' ' ')
72 PYTHONVERS="$with_python"
74 AC_MSG_RESULT([$PYTHONVERS])
76 AC_SUBST([PYTHONVERS])
78 AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so])
79 if test "x$with_tcl" = "xno"; then
82 AC_MSG_CHECKING([for tcl configuration])
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` \
98 if test -f "$i/tclConfig.sh" ; then
99 ac_cv_c_tclconfig=`(cd $i; pwd)`
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])
111 CPPFLAGS="$CPPFLAGS -DUSE_INTERP_RESULT"
113 AC_MSG_RESULT([NOT found])
116 AC_SUBST([WHIPTCLLIB])
118 AC_ARG_WITH([gpm-support], [ --with-gpm-support compile with GPM support])
120 if test "x$with_gpm_support" = "xyes"; then
121 AC_DEFINE([USE_GPM], 1, [Define to 1 if GPM support is enabled])
124 AC_ARG_ENABLE([nls], [ --disable-nls compile without NLS support])
126 if test "x$enable_nls" != "xno"; then
127 AC_CHECK_LIB([c], [gettext], [ ], [
128 AC_CHECK_LIB([intl], [gettext], [
131 if test "x$enable_nls" != "xcheck"; then
132 AC_MSG_FAILURE([--enable-nls was specified, but the configure check failed])
138 if test "x$enable_nls" != "xno"; then
139 AC_DEFINE([ENABLE_NLS], 1, [Define to 1 if NLS support is enabled])
143 AC_ARG_WITH(colorsfile, [ --with-colorsfile=file set default location of colors file])
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 ])
153 AC_CONFIG_FILES([Makefile libnewt.pc])