7 AC_CONFIG_HEADER([config.h])
9 AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Package Name])
10 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [NEWT Version String])
19 # Are we using GNU ld?
20 AC_MSG_CHECKING([for GNU ld])
21 LD=`$CC -print-prog-name=ld 2>&5`
23 if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then
33 AC_CHECK_HEADERS([sys/select.h alloca.h])
34 AC_CHECK_HEADER([slang.h], [], [
35 old_CPPFLAGS=${CPPFLAGS}
36 CPPFLAGS="${CPPFLAGS} -I/opt/local/include"
37 unset ac_cv_header_slang_h
38 AC_CHECK_HEADER([slang.h])
39 if test x$ac_cv_header_slang_h = x; then
40 CPPFLAGS="${old_CPPFLAGS}"
42 LDFLAGS="${LDFLAGS} -L/opt/local/lib"
45 if test x$ac_cv_header_slang_h = x; then
46 old_CPPFLAGS=${CPPFLAGS}
47 CPPFLAGS="${CPPFLAGS} -I/sw/include"
48 AC_CHECK_HEADER([slang.h])
49 if test x$ac_cv_header_slang_h = x; then
50 CPPFLAGS=${old_CPPFLAGS}
52 LDFLAGS="${LDFLAGS} -L/sw/lib"
55 AC_CHECK_HEADERS([popt.h libintl.h])
57 AC_MSG_CHECKING([for python versions])
58 AC_ARG_WITH([python], [ --without-python do not compile python support])
59 if test "x$with_python" = "xno"; then
60 AC_MSG_RESULT([skipped])
63 PYTHONVERS=$(ls /usr/include/python*/Python.h 2> /dev/null | sed 's|.*\(python[[0-9]]*\.[[0-9]]*\).*|\1|g' | tr '\n' ' ')
64 AC_MSG_RESULT([$PYTHONVERS])
66 AC_SUBST([PYTHONVERS])
68 AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so])
69 if test "x$with_tcl" = "xno"; then
72 AC_MSG_CHECKING([for tcl configuration])
74 # check in a few common install locations
75 if test x"${ac_cv_c_tclconfig}" = x ; then
76 for i in `ls -d ${libdir} 2>/dev/null` \
77 `ls -d /usr/lib 2>/dev/null` \
78 `ls -d /usr/lib64 2>/dev/null` \
79 `ls -d /usr/local/lib 2>/dev/null` \
80 `ls -d /usr/contrib/lib 2>/dev/null` \
81 `ls -d /usr/pkg/lib 2>/dev/null` \
82 `ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
83 `ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
84 `ls -d /usr/lib/tcl8.5 2>/dev/null` \
85 `ls -d /usr/lib/tcl8.4 2>/dev/null` \
86 `ls -d /opt/local/lib 2>/dev/null` \
88 if test -f "$i/tclConfig.sh" ; then
89 ac_cv_c_tclconfig=`(cd $i; pwd)`
95 if test x"${ac_cv_c_tclconfig}" != x ; then
96 AC_MSG_RESULT([found])
97 . ${ac_cv_c_tclconfig}/tclConfig.sh
98 AC_SUBST([TCL_LIB_FLAG])
101 CPPFLAGS="$CPPFLAGS -DUSE_INTERP_RESULT"
103 AC_MSG_RESULT([NOT found])
106 AC_SUBST([WHIPTCLLIB])
108 AC_ARG_WITH([gpm-support], [ --with-gpm-support compile with GPM support])
110 if test "x$with_gpm_support" = "xyes"; then
111 AC_DEFINE([USE_GPM], 1, [Define to 1 if GPM support is enabled])
114 AC_ARG_ENABLE([nls], [ --disable-nls compile without NLS support])
116 if test "x$enable_nls" != "xno"; then
117 AC_CHECK_LIB([c], [gettext], [ ], [
118 AC_CHECK_LIB([intl], [gettext], [
121 if test "x$enable_nls" != "xcheck"; then
122 AC_MSG_FAILURE([--enable-nls was specified, but the configure check failed])
128 if test "x$enable_nls" != "xno"; then
129 AC_DEFINE([ENABLE_NLS], 1, [Define to 1 if NLS support is enabled])
133 AC_ARG_WITH(colorsfile, [ --with-colorsfile=file set default location of colors file])
135 if test "x$with_colorsfile" != "xno"; then
136 if test "x$with_colorsfile" != "xyes"; then
137 if test "x$with_colorsfile" != "x"; then
138 AC_DEFINE_UNQUOTED(NEWT_COLORS_FILE, "$with_colorsfile", [Default NEWT_COLORS_FILE ])
143 AC_CONFIG_FILES([Makefile libnewt.pc])