]> git.ipfire.org Git - thirdparty/newt.git/blame - configure.ac
l10n: Added Low German translation
[thirdparty/newt.git] / configure.ac
CommitLineData
ad1ae0b1 1AC_INIT([newt_pr.h])
2
3PACKAGE=newt
e271d0b0 4VERSION=$(awk '/^Version: / {print $2}' $srcdir/newt.spec)
ad1ae0b1 5SONAME=0.52
6
7AC_CONFIG_HEADER([config.h])
8
9AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Package Name])
10AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [NEWT Version String])
11AC_SUBST([VERSION])
12AC_SUBST([SONAME])
13AC_PROG_CC
14AC_PROG_INSTALL
15AC_PROG_LN_S
83fe9fde
ML
16AC_PROG_GREP
17
18# Are we using GNU ld?
19AC_MSG_CHECKING([for GNU ld])
20LD=`$CC -print-prog-name=ld 2>&5`
21
22if test `$LD -v 2>&1 | $ac_cv_path_GREP -c "GNU ld"` = 0; then
23 # Not
24 GNU_LD=""
25 AC_MSG_RESULT([no])
26else
27 GNU_LD="$LD"
28 AC_MSG_RESULT([yes])
29 AC_SUBST([GNU_LD])
30fi
ad1ae0b1 31
32AC_CHECK_HEADERS([sys/select.h alloca.h])
83fe9fde
ML
33AC_CHECK_HEADER([slang.h], [], [
34 old_CPPFLAGS=${CPPFLAGS}
35 CPPFLAGS="${CPPFLAGS} -I/opt/local/include"
36 unset ac_cv_header_slang_h
37 AC_CHECK_HEADER([slang.h])
38 if test x$ac_cv_header_slang_h = x; then
39 CPPFLAGS="${old_CPPFLAGS}"
40 else
41 LDFLAGS="${LDFLAGS} -L/opt/local/lib"
42 fi
43])
44if test x$ac_cv_header_slang_h = x; then
45 old_CPPFLAGS=${CPPFLAGS}
46 CPPFLAGS="${CPPFLAGS} -I/sw/include"
47 AC_CHECK_HEADER([slang.h])
48 if test x$ac_cv_header_slang_h = x; then
49 CPPFLAGS=${old_CPPFLAGS}
50 else
51 LDFLAGS="${LDFLAGS} -L/sw/lib"
52 fi
53fi
54AC_CHECK_HEADERS([popt.h libintl.h])
ad1ae0b1 55
56AC_MSG_CHECKING([for python versions])
57PYTHONVERS=$(echo /usr/include/python*/Python.h | sed "s|/usr/include/||g"| sed "s|/Python.h||g" 2> /dev/null)
58AC_MSG_RESULT([$PYTHONVERS])
59AC_SUBST([PYTHONVERS])
60
61AC_ARG_WITH([tcl], [ --without-tcl do not compile whiptcl.so])
62if test "x$with_tcl" = "xno"; then
63 WHIPTCLSO=
64else
83fe9fde
ML
65 AC_MSG_CHECKING([for tcl configuration])
66
67 # check in a few common install locations
68 if test x"${ac_cv_c_tclconfig}" = x ; then
69 for i in `ls -d ${libdir} 2>/dev/null` \
70 `ls -d /usr/lib 2>/dev/null` \
71 `ls -d /usr/lib64 2>/dev/null` \
72 `ls -d /usr/local/lib 2>/dev/null` \
73 `ls -d /usr/contrib/lib 2>/dev/null` \
74 `ls -d /usr/pkg/lib 2>/dev/null` \
75 `ls -d /usr/local/lib/tcl8.5 2>/dev/null` \
76 `ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
77 `ls -d /usr/lib/tcl8.5 2>/dev/null` \
78 `ls -d /usr/lib/tcl8.4 2>/dev/null` \
79 `ls -d /opt/local/lib 2>/dev/null` \
80 ; do
81 if test -f "$i/tclConfig.sh" ; then
82 ac_cv_c_tclconfig=`(cd $i; pwd)`
83 break
84 fi
85 done
86 fi
87
88 if test x"${ac_cv_c_tclconfig}" != x ; then
89 AC_MSG_RESULT([found])
90 . ${ac_cv_c_tclconfig}/tclConfig.sh
91 AC_SUBST([TCL_LIB_FLAG])
92 WHIPTCLSO=whiptcl.so
93 else
94 AC_MSG_RESULT([NOT found])
95 fi
ad1ae0b1 96fi
97AC_SUBST([WHIPTCLSO])
98
99AC_ARG_WITH([gpm-support], [ --with-gpm-support compile with GPM support])
100
101if test "x$with_gpm_support" = "xyes"; then
102 AC_DEFINE([USE_GPM], 1, [Define to 1 if GPM support is enabled])
103fi
104
970ce9d5 105AC_ARG_ENABLE([nls], [ --disable-nls compile without NLS support])
106
107if test "x$enable_nls" != "xno"; then
83fe9fde
ML
108 AC_CHECK_LIB([c], [gettext], [ ], [
109 AC_CHECK_LIB([intl], [gettext], [
110 LIBS="-lintl"
111 AC_SUBST([LIBS])], [
112 if test "x$enable_nls" != "xcheck"; then
113 AC_MSG_FAILURE([--enable-nls was specified, but the configure check failed])
114 else
115 enable_nls=no
116 fi
117 ])
118 ])
119 if test "x$enable_nls" != "xno"; then
120 AC_DEFINE([ENABLE_NLS], 1, [Define to 1 if NLS support is enabled])
121 fi
970ce9d5 122fi
123
aa4c11f3 124AC_CONFIG_FILES([Makefile libnewt.pc])
ad1ae0b1 125AC_OUTPUT
126