Package: autoconf
Version: 2.59a-3
Severity: normal

After upgrading from Woody to Sarge, the configure script as generated by
autoconf from the attached configure.in exits with a syntax error. The same
source generated a working configure script with the version of autoconf in
Woody.

This is the last I see in the output from configure:

  checking for memcmp... yes
  checking for getopt in unistd.h... yes
  checking for snprintf... yes
  ./configure: line 8587: syntax error: unexpected end of file

The last info in config.log is only information about the last successful
test, nothing that seems to indicate what is wrong.

autoconf gives no error or warning messages when generating the configure
script.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.26
Locale: LANG=sv, LC_CTYPE=sv (charmap=ISO-8859-1) (ignored: LC_ALL set to 
sv_SE.ISO8859-1)

Versions of packages autoconf depends on:
ii  debianutils                   2.8.4      Miscellaneous utilities specific t
ii  m4                            1.4.2-1    a macro processing language
ii  perl                          5.8.4-8    Larry Wall's Practical Extraction 

-- no debconf information
dnl Process this file with autoconf to produce a configure script.
dnl
dnl Copyright (c) 2000-2001 Peter Karlsson
dnl
dnl $Id: configure.in,v 1.48 2001/11/15 18:28:41 peterk Exp $
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, version 2
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl

dnl Initialization ---------------------------------------------------------
AC_INIT(turqstat.cpp)
AC_CONFIG_HEADER(config.h)

findfirst=no

dnl Extra parameters -------------------------------------------------------
AC_ARG_WITH(qt,
[  --without-qt            do not look for Qt or build Qt version],
[if test "$withval" = "yes"; then
  qt=yes
else
  qt=no
fi],
[qt=yes])

AC_ARG_WITH(locale,
[  --without-locale        do not build with locale support],
[if test "$withval" = "yes"; then
  locale=yes
else
  locale=no
fi],
[locale=yes])

AC_ARG_WITH(nntp,
[  --without-nntp          do not build with NNTP support],
[if test "$withval" = "yes"; then
  nntp=yes
else
  nntp=no
fi],
[nntp=yes])

dnl Checks for programs ----------------------------------------------------
dnl Since PROG_CC and PROG_CXX seems to think we are cross-compiling under
dnl OS/2, because we haven't detected EXEEXT yet, hack around it.
dnl This probably only works with bash, though :-(
if test "$OSTYPE" = "os2"; then
  ac_exeext=.exe
  EXEEXT=.exe
fi

AC_PROG_CC
AC_PROG_CXX

unset ac_exeext EXEEXT

dnl Figure out whether or not we need .exe suffix (EMX, CygWin (AC_EXEEXT
dnl normally only catches CygWin)), -lstdcpp instead of -lstdc++ (EMX), and
dnl turqstat.def to set the application title (EMX)

AC_CACHE_CHECK([for EMX environment], ac_cv_emx,
  AC_TRY_COMPILE(, [#ifndef __EMX__
Syntax Error
#endif ], have_emx=yes, have_emx=no)
  ac_cv_emx="$have_emx")

AC_CACHE_CHECK([for DJGPP environemnt], ac_cv_djgpp,
  AC_TRY_COMPILE(, [#ifndef __DJGPP__
Syntax Error
#endif ], have_djgpp=yes, have_djgpp=no)
  ac_cv_djgpp="$have_djgpp")

if test "$ac_cv_emx" = "yes"; then
  standardcpplib=stdcpp
  EXEEXT=.exe
  ac_exeext=.exe
  ac_cv_exeext=.exe
  DEF=turqstat.def

  AC_MSG_CHECKING(for __findfirst and __findnext)
  AC_TRY_COMPILE([ #include <emx/syscalls.h> ],
    [ struct _find s; int r = __findfirst("*.*", 0x2f, &s);
    r = __findnext(&s) ],
    findfirst=yes
    AC_DEFINE(HAVE_EMX_FINDFIRST) AC_MSG_RESULT(yes),
    AC_MSG_RESULT(no))

elif test "$ac_cv_djgpp" = "yes"; then
  if test "$nntp" = "yes"; then
    nntp=no
    AC_MSG_WARN(Disabling NNTP support when compiling for MS-DOS)
  fi
  standardcpplib=stdcxx
  DEF=

  AC_MSG_CHECKING(for findfirst and findnext)
  AC_TRY_COMPILE([ #include <dir.h> ],
    [ struct ffblk f; int r = findfirst("*.*", &f, 0x2f);
    r = findnext(&f) ],
    findfirst=yes
    AC_DEFINE(HAVE_DJGPP_FINDFIRST) AC_MSG_RESULT(yes),
    AC_MSG_RESULT(no))
else
  standardcpplib=stdc++
  DEF=
fi

AC_SUBST(DEF)

AC_EXEEXT

if test "$nntp" = "yes"; then
  AC_DEFINE(HAVE_NNTP)
  NONNTP=''
else
  NONNTP='# '
fi
AC_SUBST(NONNTP)

dnl We read binary data, so we need to know the endian ---------------------
AC_C_BIGENDIAN

dnl Checks for libraries ---------------------------------------------------
LIBS="-l$standardcpplib $LIBS"

dnl Does not work with gcc 3:
dnl AC_LANG_CPLUSPLUS
dnl AC_CHECK_LIB($standardcpplib, std::cout)
dnl AC_LANG_C

if test "$ac_cv_mingw32" = "yes"; then
  AC_CHECK_LIB(crtdll, _findfirst)
  findfirst=yes
fi

if test "$nntp" = "yes"; then
  AC_CHECK_LIB(socket, socket)
  AC_CHECK_LIB(nsl, gethostbyname)
fi

dnl Check for header files -------------------------------------------------
AC_CHECK_HEADERS(limits.h)
if test "$ac_cv_header_limits_h" = "no"; then
  AC_MSG_ERROR(limits.h is needed to compile)
fi

AC_CHECK_HEADERS(stdint.h errno.h sys/errno.h)
if test "$locale" = "yes"; then
  AC_CHECK_HEADERS(locale.h)
fi

AC_CHECK_HEADERS(wchar.h wctype.h)
if test "$ac_cv_header_wctype_h" = "no"; then
  AC_CACHE_CHECK([for towupper in ctype.h], ac_cv_have_towupper_in_ctype_h,
  AC_TRY_COMPILE([ #include <ctype.h>
    void towupper(void); ], [],
    ac_cv_have_towupper_in_ctype_h=no,
    ac_cv_have_towupper_in_ctype_h=yes))
  if test "$ac_cv_have_towupper_in_ctype_h" = "yes"; then
    AC_DEFINE(HAVE_TOWUPPER_IN_CTYPE_H)
  fi
fi

if test "$nntp" = "yes"; then
  AC_CHECK_HEADERS(netdb.h netinet/in.h)
  AC_CACHE_CHECK([for sys/socket.h], ac_cv_header_sys_socket_h,
    AC_TRY_COMPILE([#include <sys/types.h>
  #include <sys/socket.h>], [],
      ac_cv_header_sys_socket_h=yes,
      ac_cv_header_sys_socket_h=no))
  if test "$ac_cv_header_sys_socket_h" = "yes"; then
    AC_DEFINE(HAVE_SYS_SOCKET_H)
  fi

  if test "$ac_cv_header_sys_socket_h" = "no"; then
    AC_CHECK_HEADERS(winsock.h)
    if test "$ac_cv_header_winsock_h" = "yes"; then
      LIBS="-lwsock32 $LIBS"
    fi
  fi
fi

dnl Specialized headers and tests

if test "$findfirst" = "no"; then
  AC_HEADER_DIRENT
fi

AC_CACHE_CHECK([for CHAR_BIT in limits.h], ac_cv_have_char_bit,
  AC_TRY_COMPILE([ #include <limits.h> ], [  int i = CHAR_BIT; ],
    ac_cv_have_char_bit=yes,
    ac_cv_have_char_bit=no))
if test "$ac_cv_have_char_bit" = "yes"; then
  AC_DEFINE(HAVE_CHAR_BIT)
fi

dnl Check for typedefs, structures, and compiler characteristics -----------
AC_C_CONST

AC_MSG_CHECKING(for tm_gmtoff in struct tm)
AC_TRY_COMPILE([ #include <time.h> ], [  struct tm t; t.tm_gmtoff = 0; ],
  AC_DEFINE(HAVE_TM_GMTOFF) AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no))

dnl This is mostly copied from the standard AC_CHECK_SIZEOF macro
AC_CACHE_CHECK([size of time_t], ac_cv_sizeof_time_t,
  AC_TRY_RUN([#include <time.h>
#include <stdio.h>
main()
{
  FILE *f = fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(time_t));
  exit(0);
}], ac_cv_sizeof_time_t=`cat conftestval`,
    ac_cv_sizeof_time_t=4,
    ac_cv_sizeof_time_t=4))
AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t)

dnl Check for library functions --------------------------------------------
AC_FUNC_STRFTIME
if test "$ac_cv_func_strftime" = "no"; then
  AC_MSG_ERROR(strftime is needed by this program)
fi
AC_CHECK_FUNC(memcmp, , AC_MSG_ERROR(memcmp is needed by this program))

AC_MSG_CHECKING(for getopt in unistd.h)
AC_TRY_COMPILE([ #include <unistd.h> ],
  [ int argc; char **argv; int c = getopt(argc, argv, "x"); int d = optarg; ],
  AC_DEFINE(HAVE_GETOPT_IN_UNISTD) AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
  AC_MSG_CHECKING(for getopt in stdio.h)
  AC_TRY_COMPILE([ #include <stdio.h> ],
    [ int argc; char **argv; int c = getopt(argc, argv, "x"); int d = optarg; ],
    AC_DEFINE(HAVE_GETOPT_IN_STDIO) AC_MSG_RESULT(yes),
    AC_MSG_RESULT(no)
    AC_MSG_CHECKING(for getopt in getopt.h)
    AC_TRY_COMPILE([ #include <getopt.h> ],
      [ int argc; char **argv; int c = getopt(argc, argv, "x"); int d = optarg; ],
      AC_DEFINE(HAVE_GETOPT_IN_GETOPT) AC_MSG_RESULT(yes),
      AC_MSG_RESULT(no)
      AC_DEFINE(USE_OWN_GETOPT))))

AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF),
  AC_CHECK_FUNC(_snprintf, AC_DEFINE(HAVE_USNPRINTF)))

AC_CACHE_CHECK([for sleep in unistd.h], ac_cv_sleep,
  AC_TRY_COMPILE([#include <unistd.h>
                  struct s *sleep(const char *);],
    [],
    ac_cv_sleep=no, ac_cv_sleep=yes))
if test "$ac_cv_sleep" = "yes"; then
  AC_DEFINE(HAVE_SLEEP)
else
  AC_CACHE_CHECK([for _sleep in stdlib.h], ac_cv__sleep,
    AC_TRY_COMPILE([#include <stdlib.h>
                    struct s *_sleep(const char *);],
      [],
      ac_cv__sleep=no, ac_cv__sleep=yes))
  if test "$ac_cv__sleep" = "yes"; then
    AC_DEFINE(HAVE_U_SLEEP)
  fi
fi

AC_CHECK_FUNC(strcasestr, AC_DEFINE(HAVE_STRCASESTR))
AC_CHECK_FUNC(stristr,    AC_DEFINE(HAVE_STRISTR))
AC_CHECK_FUNC(strcasecmp, AC_DEFINE(HAVE_STRCASECMP))
AC_CHECK_FUNC(stricmp,    AC_DEFINE(HAVE_STRICMP))
AC_CHECK_FUNC(strlwr,     AC_DEFINE(HAVE_STRLWR))

if test "$locale" = "yes"; then
  AC_CACHE_CHECK([for DosQueryCtryInfo in os2.h], ac_cv_dosqueryctryinfo,
    AC_TRY_COMPILE([ #define INCL_DOSNLS
    #include <os2.h> ],
    [ COUNTRYINFO countryinfo;
      COUNTRYCODE country = { 0, 0 };
      ULONG datalength;
      DosQueryCtryInfo(sizeof countryinfo, &country, &countryinfo, &datalength);
    ], ac_cv_dosqueryctryinfo=yes, ac_cv_dosqueryctryinfo=no))
  if test "$ac_cv_dosqueryctryinfo" = "yes"; then
    AC_DEFINE(HAVE_OS2_COUNTRYINFO)
  fi
fi

if test "$locale" = "yes"; then
  AC_CACHE_CHECK([for GetDateFormat in windows.h], ac_cv_getdateformat,
    AC_TRY_COMPILE([#include <windows.h>],
    [ SYSTEMTIME wintime; char *out; size_t len;
      GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &wintime, NULL, out, len);
    ], ac_cv_getdateformat=yes, ac_cv_getdateformat=no))
  if test "$ac_cv_getdateformat" = "yes"; then
    AC_DEFINE(HAVE_WIN32_LOCALEINFO)
  fi
fi

AC_LANG_CPLUSPLUS
AC_CACHE_CHECK([if compiler needs explicit namespace], ac_cv_namespace,
  AC_TRY_COMPILE([#include <string>],
    [ string s = "Test"; ],
    ac_cv_namespace=no,
    AC_TRY_COMPILE([#include <string>
      using namespace std;],
      [string s = "Test"; ],
      ac_cv_namespace=yes,
      AC_MSG_ERROR(Cannot instantiate the string class))))
if test "$ac_cv_namespace" = "no"; then
  AC_DEFINE(HAVE_IMPLICIT_NAMESPACE)
fi

AC_CACHE_CHECK([for working wstring], ac_cv_wstring,
  AC_TRY_COMPILE([#include <wchar.h>
  #include <string>
  using namespace std;],
  [ wstring s; const wchar_t *p = s.c_str(); ],
  ac_cv_wstring=yes, ac_cv_wstring=no))
if test "$ac_cv_wstring" = "yes"; then
  AC_DEFINE(HAVE_WORKING_WSTRING)
fi

if test "$ac_cv_wstring" = "no"; then
  AC_CHECK_LIB(w, wcscat)
fi

AC_CACHE_CHECK([for fstream::form], ac_cv_fstream_form,
  AC_TRY_COMPILE([#include <fstream>
    using namespace std;],
    [ fstream f; f.form(""); ],
    ac_cv_fstream_form=yes, ac_cv_fstream_form=no))
if test "$ac_cv_fstream_form" = "yes"; then
  AC_DEFINE(HAVE_FSTREAM_FORM_METHOD)
fi

AC_LANG_C

dnl Check for variables ----------------------------------------------------

AC_MSG_CHECKING(for timezone in time.h)
AC_TRY_COMPILE([ #include <time.h> ], [ timezone = 0; ],
  AC_DEFINE(HAVE_TIMEZONE) AC_MSG_RESULT(yes)
  timezone=yes,
  AC_MSG_RESULT(no)
  AC_MSG_CHECKING(for _timezone in time.h)
  AC_TRY_COMPILE([ #include <time.h> ], [ _timezone = 0; ],
    AC_DEFINE(HAVE_UTIMEZONE) AC_MSG_RESULT(yes)
    utimezone=yes,
    AC_MSG_RESULT(no)))

dnl Check for other stuff --------------------------------------------------
AC_MSG_CHECKING(if platform uses backslashes in paths)
if test "$ac_cv_emx" = "yes" || test "$ac_cv_mingw32" = "yes" || test "$ac_cv_cygwin" = "yes" || test "$ac_cv_djgpp" = "yes"; then
  AC_MSG_RESULT(yes)
  AC_DEFINE(BACKSLASH_PATHS)
else
  AC_MSG_RESULT(no)
fi

dnl Comment out install target in makefiles for OS/2, DOS and Win32 targets
if test "$ac_cv_emx" = "yes" || test "$ac_cv_mingw32" = "yes" || test "$ac_cv_cygwin" = "yes" || test "$ac_cv_djgpp" = "yes"; then
  NOINST='# '
else
  NOINST=''
fi

AC_SUBST(NOINST)

AC_CHECK_PROG(HAVEDOT, dot, yes, no)

dnl Check for Qt -----------------------------------------------------------
if test "$qt" = "yes"; then
  QT=''
  NOQT='# '

dnl Locate Qt headers
  AC_MSG_CHECKING(for Qt include files)
  if test "$QTDIR" != ""; then
    if test -f $QTDIR'/include/qapp.h'; then
      QTINCLUDE=$QTDIR'/include'
    fi
  fi
  if test "$QTINCLUDE" = ""; then
    if test -f '/usr/lib/qt2/include/qapp.h'; then
      QTINCLUDE='/usr/lib/qt2/include'
      QTDIR='/usr/lib/qt2'
    elif test -f '/usr/include/qt/qapp.h'; then
      QTINCLUDE='/usr/include/qt'
    elif test -f '/usr/local/include/qt/qapp.h'; then
      QTINCLUDE='/usr/local/include/qt'
    elif test -f '/usr/local/qt2/include/qapp.h'; then
      QTINCLUDE='/usr/local/qt2/include'
      QTDIR='/usr/local/qt2'
    elif test -f '/usr/local/qt/include/qapp.h'; then
      QTINCLUDE='/usr/local/qt/include'
      QTDIR='/usr/local/qt'
    fi
  fi
  if test "$QTINCLUDE" = ""; then
    AC_MSG_RESULT(no)
    AC_MSG_ERROR(Cannot find Qt; either define QTDIR or use --without-qt)
  else
    AC_MSG_RESULT($QTINCLUDE)
  fi

dnl Locate Qt lib
  AC_LANG_CPLUSPLUS
  AC_CHECK_LIB(qt, qApp, QTLIB='-lqt')
  AC_LANG_C
  if test "$QTLIB" = ""; then
    AC_MSG_CHECKING(for Qt library path)
    if test -f $QTDIR'/lib/libqt.a'; then
      QTLIB='-L'$QTDIR'/lib -lqt'
    fi
    if test "$QTLIB" = ""; then
      if test -f '/usr/local/lib/libqt.a'; then
        QTLIB='-L/usr/local/lib -lqt'
      elif test -f '/usr/local/qt/lib/libqt.a'; then
        QTLIB='-L/usr/local/qt/lib -lqt'
      fi
    fi
    if test "$QTLIB" = ""; then
      AC_MSG_RESULT(no)
      AC_MSG_ERROR(Cannot find libqt.a; either define QTDIR or use --without-qt)
    else
      AC_MSG_RESULT($QTLIB)
    fi
  fi

dnl Locate moc
  AC_PATH_PROG(QTMOC, moc, moc,
    $PATH:/bin:/usr/bin:/usr/local/bin:/usr/local/qt/bin:$QTDIR/bin)

dnl Locate msg2qm
  AC_PATH_PROG(QTMSGTOQM, msg2qm, msg2qm,
    $PATH:/bin:/usr/bin:/usr/local/bin:/usr/local/qt/bin:$QTDIR/bin)

else
  QT='# '
  NOQT=''
  QTINCLUDE='/usr/include/qt'
  QTMOC='moc'
  QTLIB='-lqt'
fi

AC_SUBST(QT)
AC_SUBST(NOQT)
AC_SUBST(QTINCLUDE)
AC_SUBST(QTMOC)
AC_SUBST(QTLIB)

dnl Create output ----------------------------------------------------------
AC_OUTPUT(Makefile po/Makefile mappings/Makefile doxygen.conf)

Reply via email to