]>
Commit | Line | Data |
---|---|---|
a96ec985 TK |
1 | AC_INIT |
2 | AC_CONFIG_SRCDIR([newt_pr.h]) | |
ad1ae0b1 | 3 | |
4 | PACKAGE=newt | |
6e3a852c | 5 | VERSION=0.52.23 |
ad1ae0b1 | 6 | SONAME=0.52 |
7 | ||
a96ec985 | 8 | AC_CONFIG_HEADERS([config.h]) |
ad1ae0b1 | 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 | |
ad1ae0b1 | 15 | AC_PROG_LN_S |
83fe9fde | 16 | AC_PROG_GREP |
fb4dc6ac | 17 | AC_SYS_LARGEFILE |
83fe9fde | 18 | |
7cdac0c4 ML |
19 | AC_CHECK_SIZEOF([long]) |
20 | AC_CHECK_SIZEOF([long long]) | |
21 | AC_CHECK_SIZEOF([void *]) | |
22 | ||
83fe9fde ML |
23 | # Are we using GNU ld? |
24 | AC_MSG_CHECKING([for GNU ld]) | |
9bc5a279 | 25 | LD=$($CC -print-prog-name=ld 2>&5) |
83fe9fde | 26 | |
9bc5a279 | 27 | if test $($LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld") = 0; then |
83fe9fde ML |
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 | |
ad1ae0b1 | 36 | |
37 | AC_CHECK_HEADERS([sys/select.h alloca.h]) | |
83fe9fde ML |
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]) | |
ad1ae0b1 | 60 | |
61 | AC_MSG_CHECKING([for python versions]) | |
4feae867 ML |
62 | AC_ARG_WITH([python], [ --without-python do not compile python support], |
63 | [], [with_python="yes"]) | |
69a5ca9b OS |
64 | if test "x$with_python" = "xno"; then |
65 | AC_MSG_RESULT([skipped]) | |
66 | PYTHONVERS= | |
67 | else | |
4feae867 ML |
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 | |
69a5ca9b OS |
74 | AC_MSG_RESULT([$PYTHONVERS]) |
75 | fi | |
ad1ae0b1 | 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 | |
673e3009 | 80 | WHIPTCLLIB= |
ad1ae0b1 | 81 | else |
83fe9fde ML |
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 | |
9bc5a279 TK |
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) \ | |
83fe9fde ML |
97 | ; do |
98 | if test -f "$i/tclConfig.sh" ; then | |
9bc5a279 | 99 | ac_cv_c_tclconfig=$( (cd $i; pwd) ) |
83fe9fde ML |
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]) | |
673e3009 | 109 | WHIPTCLLIB=whiptcl |
0e416e72 ML |
110 | # needed with tcl8.6 |
111 | CPPFLAGS="$CPPFLAGS -DUSE_INTERP_RESULT" | |
83fe9fde ML |
112 | else |
113 | AC_MSG_RESULT([NOT found]) | |
114 | fi | |
ad1ae0b1 | 115 | fi |
673e3009 | 116 | AC_SUBST([WHIPTCLLIB]) |
ad1ae0b1 | 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 | ||
970ce9d5 | 124 | AC_ARG_ENABLE([nls], [ --disable-nls compile without NLS support]) |
125 | ||
126 | if test "x$enable_nls" != "xno"; then | |
83fe9fde ML |
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 | |
970ce9d5 | 141 | fi |
142 | ||
34e56d12 ML |
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 | ||
aa4c11f3 | 153 | AC_CONFIG_FILES([Makefile libnewt.pc]) |
ad1ae0b1 | 154 | AC_OUTPUT |
155 |