dnl added wi_EXTRA_PDIR and wi_ANSI_C
dnl $Id$
dnl
-AC_DEFUN(wi_EXTRA_IDIR, [
+AC_DEFUN([wi_EXTRA_IDIR], [
incdir="$1"
if test -r $incdir ; then
case "$CPPFLAGS" in
dnl
dnl
dnl
-AC_DEFUN(wi_EXTRA_LDIR, [
+AC_DEFUN([wi_EXTRA_LDIR], [
mylibdir="$1"
if test -r $mylibdir ; then
case "$LDFLAGS" in
dnl __FP__
dnl
dnl
-AC_DEFUN(wi_EXTRA_PDIR, [
+AC_DEFUN([wi_EXTRA_PDIR], [
progdir="$1"
if test -r $progdir ; then
case "$PATH" in
dnl If you want to look for subdirectories in include/lib directories,
dnl you pass the names in argument 3, otherwise pass a dash.
dnl
-AC_DEFUN(wi_EXTRA_DIRS, [echo "checking for extra include and lib directories..." 1>&6
+AC_DEFUN([wi_EXTRA_DIRS], [echo "checking for extra include and lib directories..." 1>&6
ifelse([$1], yes, [dnl
b1=`cd .. ; pwd`
b2=`cd ../.. ; pwd`
mylibdir="${exdir}/lib${subexdir}"
wi_EXTRA_LDIR($mylibdir)
- progdir="${exdir}/bin${subexdirr}"
+ progdir="${exdir}/bin${subexdir}"
wi_EXTRA_PDIR($progdir)
fi
done
dnl
dnl
dnl
-AC_DEFUN(wi_HPUX_CFLAGS,
+AC_DEFUN([wi_HPUX_CFLAGS],
[AC_MSG_CHECKING(if HP-UX ansi C compiler flags are needed)
AC_REQUIRE([AC_PROG_CC])
os=`uname -s | tr '[A-Z]' '[a-z]'`
dnl
dnl
dnl
-AC_DEFUN(wi_CFLAGS, [AC_REQUIRE([AC_PROG_CC])
+AC_DEFUN([wi_CFLAGS], [AC_REQUIRE([AC_PROG_CC])
wi_HPUX_CFLAGS
if test "$CFLAGS" = "" ; then
CFLAGS="-O"
dnl
dnl
dnl
-AC_DEFUN(wi_PROTOTYPES, [
+AC_DEFUN([wi_PROTOTYPES], [
AC_MSG_CHECKING(if the compiler supports function prototypes)
AC_TRY_COMPILE(,[extern void exit(int status);],[wi_cv_prototypes=yes
AC_DEFINE(PROTOTYPES)],wi_cv_prototypes=no)
dnl
dnl
dnl
-AC_DEFUN(wi_ANSI_C, [
+AC_DEFUN([wi_ANSI_C], [
AC_MSG_CHECKING(ANSI-style function definitions)
AC_TRY_COMPILE(,[int blubb(int x) { return 0; }],[wi_cv_ansi_funcs=yes
AC_DEFINE(ANSI_FUNCS)],wi_cv_ansi_funcs=no)
dnl
dnl
dnl
-AC_DEFUN(wi_HEADER_SYS_SELECT_H, [
+AC_DEFUN([wi_HEADER_SYS_SELECT_H], [
# See if <sys/select.h> is includable after <sys/time.h>
if test "$ac_cv_header_sys_time_h" = no ; then
AC_CHECK_HEADERS(sys/time.h sys/select.h)
dnl
dnl
dnl
-AC_DEFUN(wi_LIB_RESOLV, [
+AC_DEFUN([wi_LIB_RESOLV], [
# See if we could access two well-known sites without help of any special
# libraries, like resolv.
dnl
dnl
-AC_DEFUN(wi_LIB_NSL, [
+AC_DEFUN([wi_LIB_NSL], [
AC_MSG_CHECKING(if we can use -lnsl)
ac_save_LIBS="$LIBS";
LIBS="$LIBS -lnsl";
dnl
dnl
-AC_DEFUN(nc_PATH_PROG_ZCAT, [
+AC_DEFUN([nc_PATH_PROG_ZCAT], [
AC_PATH_PROG(GZCAT,gzcat)
AC_PATH_PROG(ZCAT,zcat)
if test "x$GZCAT" = x ; then
dnl
dnl
dnl
-AC_DEFUN(wi_SYSV_EXTRA_DIRS, [
+AC_DEFUN([wi_SYSV_EXTRA_DIRS], [
# Use System V because their curses extensions are required. This must
# be done early so we use the -I and -L in the library checks also.
# This is mostly a Solaris/SunOS hack. Note that doing this will also
dnl
dnl
dnl
-AC_DEFUN(wi_DEFINE_UNAME, [
+AC_DEFUN([wi_DEFINE_UNAME], [
# Get first 127 chars of all uname information. Some folks have
# way too much stuff there, so grab only the first 127.
unam=`uname -a 2>/dev/null | cut -c1-127`
dnl
dnl
dnl
-AC_DEFUN(wi_READLINE_WITH_NCURSES, [
+AC_DEFUN([wi_READLINE_WITH_NCURSES], [
# Readline and Ncurses could both define "backspace".
# Warn about this if we have both things in our definitions list.
dnl AC_EXT_DAYLIGHT
dnl Check for an external variable daylight. Stolen from w3c-libwww.
-AC_DEFUN(AC_EXT_DAYLIGHT,
+AC_DEFUN([AC_EXT_DAYLIGHT],
[ AC_MSG_CHECKING(int daylight variable)
AC_TRY_COMPILE([#include <time.h>], [return daylight;],
have_daylight=yes,
dnl AC_EXT_TIMEZONE
dnl Check for an external variable timezone. Stolen from tcl-8.0.
-AC_DEFUN(AC_EXT_TIMEZONE,
+AC_DEFUN([AC_EXT_TIMEZONE],
[
#
# Its important to include time.h in this check, as some systems (like convex)
AC_MSG_RESULT(no))
fi
])dnl
+
+pushdef([AC_PROG_INSTALL],
+[
+ dnl our own version, testing for a -p flag
+ popdef([AC_PROG_INSTALL])
+ dnl as AC_PROG_INSTALL works as it works we first have
+ dnl to save if the user didn't specify INSTALL, as the
+ dnl autoconf one overwrites INSTALL and we have no chance to find
+ dnl out afterwards
+ AC_PROG_INSTALL
+
+ # OK, user hasn't given any INSTALL, autoconf found one for us
+ # now we test, if it supports the -p flag
+ AC_MSG_CHECKING(for -p flag to install)
+ rm -f confinst.$$.* > /dev/null 2>&1
+ echo "Testtest" > confinst.$$.orig
+ ac_res=no
+ if ${INSTALL} -p confinst.$$.orig confinst.$$.new > /dev/null 2>&1 ; then
+ if test -f confinst.$$.new ; then
+ # OK, -p seems to do no harm to install
+ INSTALL="${INSTALL} -p"
+ ac_res=yes
+ fi
+ fi
+ rm -f confinst.$$.*
+ AC_MSG_RESULT($ac_res)
+ dnl the following tries to resolve some signs and wonders coming up
+ dnl with different autoconf/automake versions
+ dnl e.g.:
+ dnl *automake 1.4 install-strip sets A_M_INSTALL_PROGRAM_FLAGS to -s
+ dnl and has INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(A_M_INSTALL_PROGRAM_FLAGS)
+ dnl it header-vars.am, so there the actual INSTALL_PROGRAM gets the -s
+ dnl *automake 1.4a (and above) use INSTALL_STRIP_FLAG and only has
+ dnl INSTALL_PROGRAM = @INSTALL_PROGRAM@ there, but changes the
+ dnl install-@DIR@PROGRAMS targets to explicitly use that flag
+ dnl *autoconf 2.13 is dumb, and thinks it can use INSTALL_PROGRAM as
+ dnl INSTALL_SCRIPT, which breaks with automake <= 1.4
+ dnl *autoconf >2.13 (since 10.Apr 1999) has not that failure
+ dnl to clean up that mess we:
+ dnl +set INSTALL_PROGRAM to use INSTALL_STRIP_FLAG
+ dnl which cleans KDE's program with automake > 1.4;
+ dnl +set INSTALL_SCRIPT to only use INSTALL, to clean up autoconf's problems
+ dnl with automake<=1.4
+ dnl note that dues to this sometimes two '-s' flags are used
+ INSTALL_PROGRAM='${INSTALL} $(INSTALL_STRIP_FLAG)'
+ INSTALL_SCRIPT='${INSTALL}'
+])dnl
+