Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2007 22:07:34 +0100
From:      Rene Ladan <r.c.ladan@gmail.com>
To:        ports@freebsd.org, List for discussing optimization of BOINC apps <boinc_opt@ssl.berkeley.edu>
Subject:   astro/boinc-setiathome-enhanced:  configure.ac wrong?
Message-ID:  <46004D16.1030606@gmail.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------070208060806000908080906
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi,

as the attachment boinc-setiathome-enhanced-5.13.log shows, the
astro/boinc-setiathome-enhanced port fails to configure on the ia64
platform.  As I only have an i386, on which the port builds fine, I
can't pinpoint the error myself, but I'm thinking that the configure.ac
or maybe one of the m4 files (all attached) are somehow wrong.

I rebuild the configure script locally on my i386-CURRENT box using
aclocal19 and autoconf259 because the boinc infrastructure on FreeBSD
differs from that at Berkeley and to shortcut some checks.

The error log suggests that it can't find the test executable which it
uses to determine the default output name (a.out in i386).

Maybe some auto* guru has an idea?

Thanks,
Rene
-- 
GPG fingerprint = E738 5471 D185 7013 0EE0  4FC8 3C1D 6F83 12E1 84F6
(subkeys.pgp.net)

"It won't fit on the line."
		-- me, 2001


--------------070208060806000908080906
Content-Type: text/plain;
 name="configure.ac"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="configure.ac"

#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.


AC_PREREQ(2.57)
AC_INIT(setiathome_enhanced, 5.13, ports@setiathome.ssl.berkeley.edu)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(dist-zip)
AC_CONFIG_SRCDIR([client/analyze.h])

# Make sure we use the same initial CFLAGS and CXXFLAGS unless otherwise told.
if test -z "${CXXFLAGS}" 
then
  CXXFLAGS="${CFLAGS}"
elif test -z "${CFLAGS}" 
then
  CFLAGS="${CXXFLAGS}"
fi


AC_ARG_ENABLE(dynamic-graphics, 
    AS_HELP_STRING([--disable-dynamic-graphics],
                   [disable building the client graphics in a shared library]))
		   

if test "x$enable_dynamic_graphics" != xno ; then
  enable_dynamic_graphics=yes
fi
  

AC_ARG_ENABLE(graphics, 
    AC_HELP_STRING([--disable-graphics],
                   [disable building the client graphics]))

if test "x$enable_graphics" != xno ; then
  enable_graphics=yes
else
  enable_dynamic_graphics=no
  enable_graphics=no
fi


AC_ARG_ENABLE(server, 
    AC_HELP_STRING([--disable-server],
                   [disable building the seti@home server components]),
    [],
    [enable_server=yes])

AC_ARG_ENABLE(client, 
    AC_HELP_STRING([--disable-client],
                   [disable building the client]),
    [],
    [enable_client=yes])

m4_divert_once([HELP_ENABLE],
  AC_HELP_STRING([], [Default: --enable-server --enable-client: 
                      builds both server and client]))

if test "${enable_server}" = yes ; then
    if test "${enable_client}" = yes ; then
        configured_to_build='server & client'
    else
        configured_to_build='server only'
    fi
else
    if test "${enable_client}" = yes ; then
        configured_to_build='client only'
    else
        AC_MSG_WARN([Youve disabled both the server and the client. Nothing useful will be built])
    fi
fi

AC_MSG_NOTICE(["--- Configuring SETI_BOINC AC_PACKAGE_VERSION (${configured_to_build}) ---"])


AC_COPYRIGHT([
Copyright (C) 2004 Regents of the University of California

SETI_BOINC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.

SETI_BOINC is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
more details.

You should have received a copy of the GNU General Public License along
with SETI_BOINC; see the file COPYING.  If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Contributor(s):
])

AC_REVISION([$Revision: 1.60.2.25 $])

major_version=`echo AC_PACKAGE_VERSION | sed 's/\..*//'`
minor_version=`echo AC_PACKAGE_VERSION | sed 's/.*\.//' | sed 's/^0//'`
AC_SUBST([MAJOR_VERSION], [$major_version])
AC_SUBST([MINOR_VERSION], [$minor_version])
AC_DEFINE_UNQUOTED([VERSION_MAJOR],$major_version, [SETI@home major version number])
AC_DEFINE_UNQUOTED([VERSION_MINOR],$minor_version, [SETI@home minor version number])
AC_DEFINE_UNQUOTED([SAH_APP_NAME],["$PACKAGE_NAME"], [Define to the BOINC application name for setiathome])
SAH_TOP_DIR=`pwd`
AC_SUBST([SAH_TOP_DIR])

AM_MAINTAINER_MODE

# Checks for programs.
PATH="/usr/xpg4/bin:${PATH}"
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_AWK
AC_PROG_LN_S
AC_PATH_PROG(TR,[tr])
AC_PATH_PROGS(AR,[ar lib])
AC_PATH_PROG(GREP,[grep])
AC_PATH_PROG(AUTOCONF,[autoconf])
AC_PATH_PROG(AUTOHEADER,[autoheader])
AC_PATH_PROGS(INDENT,[astyle indent])
AC_PATH_PROGS(CP,[cp copy])
AC_PATH_PROGS(LN,[ln cp copy])
AC_PATH_PROG(SORT,[sort])
AC_PATH_PROG(UNIQ,[uniq])
AC_PATH_PROG(CAT,[cat type])
AC_PATH_PROG(MV,[mv])
AC_PATH_PROGS(RM,[rm Rm del erase delete])

AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
SAH_LINK_DLL
AC_SUBST(PICFLAGS,${lt_prog_compiler_pic})
AC_SUBST(SED)

SAH_OPTION_BITNESS 

dnl Determine the BOINC platform given the target arch-platform-os.
BOINC_PLATFORM

if test -n `echo $INDENT | grep astyle`
then
  AC_SUBST([INDENT_FLAGS],["--c --indent-classes --indent-switches --brackets=attach --convert-tabs"])
else
  AC_SUBST([INDENT_FLAGS],["-kr"])
fi
AC_PROG_MAKE_SET
SAH_DLLEXT
SAH_LIBEXT
if test -n "$EXEEXT"
then
  DOTEXEEXT=".$EXEEXT"
fi
AC_SUBST(DOTEXEEXT)
AC_SYS_LARGEFILE
ACX_PTHREAD([AC_DEFINE(HAVE_PTHREAD,1, [Have pthread])])

STATIC_LIB_LIST="stdc++ gcc gcc_eh gtk* gdk* gmodule gthread glib wx* tiff jpeg
png Xi glut socket z fftw3f"

case ${target} in
        *-linux*)       STATIC_LIB_LIST="${STATIC_LIB_LIST} nsl ssl crypto"
        ;;
        *-solaris*)     STATIC_LIB_LIST="${STATIC_LIB_LIST} X* ssl crypto"
        ;;
esac

# Checks for libraries.
CHECK_SSL
SAH_CHECK_LIB([crypto], [RSA_new], 
    [BOINC_EXTRA_LIBS="${BOINC_EXTRA_LIBS} -L${SSLDIR}/lib ${sah_lib_last}"])
SAH_CHECK_LIB([ssl], [fopen],
    [BOINC_EXTRA_LIBS="${BOINC_EXTRA_LIBS} -L${SSLDIR}/lib ${sah_lib_last}"])
SAH_CHECK_LIB([cygipc],[shmget],
    AC_DEFINE([HAVE_LIBCYGIPC],[1],[Define to 1 if you have the cygipc library]))
SAH_CHECK_LIB([aio], [aio_fork],
    AC_DEFINE([HAVE_LIBAIO],[1],[Define to 1 if you have the aio library]))
SAH_CHECK_LIB([dl], [dlopen],
   AC_DEFINE([HAVE_LIBDL],[1],[Define to 1 if you have the dl library]))
SAH_CHECK_LIB([elf], [elf_hash],
    AC_DEFINE([HAVE_LIBELF],[1],[Define to 1 if you have the elf library]))
SAH_CHECK_LIB([m], [sin],
    AC_DEFINE([HAVE_LIBM],[1],[Define to 1 if you have the math library]))
SAH_CHECK_LIB([fftw3f], [fftwf_plan_dft_1d],
    AC_DEFINE([HAVE_LIBFFTW3F],[1],[Define to 1 if you have the fftw3f library]))
SAH_CHECK_LIB([nsl], [gethostbyname], 
    AC_DEFINE([HAVE_LIBNSL],[1],[Define to 1 if you have the nsl library]))
SAH_CHECK_LIB([rt], [sched_get_priority_min], 
    AC_DEFINE([HAVE_LIBRT],[1],[Define to 1 if you have the rt library]))
SAH_CHECK_LIB([socket], [bind], 
    AC_DEFINE([HAVE_LIBSOCKET],[1],[Define to 1 if you have the socket library]))
SAH_CHECK_LIB([z], [uncompress], 
    AC_DEFINE([HAVE_LIBZ],[1],[Define to 1 if you have the z library]))
SAH_CHECK_JPEGLIB
SAH_CHECK_LIB([stdc++],[sscanf],
    AC_DEFINE([HAVE_LIBSTDC__],[1],[Define to 1 if you have the stdc++ library]))
SAH_CHECK_LIB([gcc_eh],[_Unwind_Resume], 
    AC_DEFINE([HAVE_LIBGCC_EH],[1],[Define to 1 if you have the gcc_eh library]))
SAH_CHECK_LIB([gcc],[sscanf], 
    AC_DEFINE([HAVE_LIBGCC],[1],[Define to 1 if you have the gcc library]))
SAH_CHECK_LIB([pthread],[pthread_join],
    AC_DEFINE([HAVE_LIBPTHREAD],[1],[Define to 1 if you have the pthread library]))
SAH_CHECK_LIB([c],[atexit], 
    AC_DEFINE([HAVE_LIBC],[1],[Define to 1 if you have the c library]))
SAH_CHECK_LDFLAG([-nodefaultlibs])
AC_LANG(C++)
SAH_CHECK_SETILIB
SAH_CHECK_HEALPIX
SAH_OPTIMIZATIONS
SAH_CHECK_IPP


SAH_REQUIRES([boinc],[SAH_CHECK_BOINC],["${no_boinc}" = yes],
[
ERROR: trying to build the seti_boinc client or server but BOINC was not
found.

You can get boinc at http://boinc.ssl.berkeley.edu/
],
[exit 1])

SAH_SERVER_REQUIRES([mysql],[SAH_CHECK_MYSQL],["${no_mysql}" = yes])
SAH_SERVER_REQUIRES([informix],[SAH_CHECK_INFORMIX],["${no_informix}" = yes])
SAH_SERVER_REQUIRES([s4 libraries],[SAH_FIND_S4PATH],["${no_s4}" = yes])

if test "$enable_graphics" = yes ; then
  SAH_GRX_LIBS
  AX_CHECK_GL
  AX_CHECK_GLU
  AX_CHECK_GLUT
  if test "$no_gl" = yes -o "$no_glu" = yes -o "$no_glut" = yes ; then
     have_glut=no
     enable_graphics=no
     enable_dynamic_graphics=no
     AC_MSG_WARN([
================================================================================
WARNING: GL/GLU/GLUT not found.

The GL, GLU, and GLUT libraries are required in order to build the graphical 
parts of the BOINC application API library.

==> only building non-graphical parts of the BOINC API Library for now.

================================================================================
       ])
else
     AC_DEFINE([BOINC_APP_GRAPHICS],1,[Define to 1 to build a graphical application])
     SAH_GRX_INCLUDES
     GRAPHICS_CFLAGS="${GRX_CFLAGS} ${GL_CFLAGS} ${GLU_CFLAGS} ${GLUT_CFLAGS}"
     SAH_STATICIZE_LDFLAGS(["${GL_LIBS} ${GLU_LIBS} ${GLUT_LIBS} ${GRX_LIBS} ${sah_cv_static_lib_jpeg_fopen}"],[GRAPHICS_LIBS])
     
case ${target} in
        powerpc-apple*)       GRAPHICS_LIBS="${GRAPHICS_LIBS} -framework AppKit -framework CoreServices"
        ;;
esac
     SAH_RAW_LDFLAGS(["${PTHREAD_CFLAGS} -L${BOINCDIR}/lib -lboinc_graphics_impl -lboinc ${GRAPHICS_LIBS}"],[GRAPHICS_LIBS_RAW])
     have_glut=yes
     enable_graphics=yes
  fi
fi
AC_SUBST([GRAPHICS_CFLAGS])
AC_SUBST([GRAPHICS_LIBS])
AC_SUBST([GRAPHICS_LIBS_RAW])

AC_CACHE_SAVE

# Checks for header files.
AC_HEADER_STDC
SAH_LARGEFILE_BREAKS_CXX
SAH_HEADER_STDCXX
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h memory.h malloc.h stdlib.h string.h strings.h sys/ioctl.h sys/statvfs.h sys/time.h unistd.h dirent.h math.h ieeefp.h floatingpoint.h complex.h fftw3.h])
AC_CACHE_SAVE

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_C_LONG_DOUBLE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_BLOCKS
AC_STRUCT_TM
AC_CHECK_SIZEOF([long int])
AC_CHECK_SIZEOF([long double])
AC_CHECK_TYPES([long long,_int64,int64_t,bool,_int32,int32_t])
AC_CACHE_SAVE

# Checks for library functions.
AC_LANG(C)
AC_FUNC_FORK
AC_HEADER_MAJOR
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([ _aligned_malloc memalign atexit exit _exit floor getcwd memset munmap putenv sqrt strchr strstr atoll dlopen sincosf sincos sinf cosf atanf])

if test "${enable_dynamic_graphics}" = "yes"; then
  if test "${ac_cv_func_dlopen}" = "yes" -o "${ac_cv_lib_dl_dlopen}" = "yes" ; then
    enable_dynamic_graphics=yes
    AC_DEFINE([ENABLE_DLOPEN],[1],[Define to 1 if building graphics is a shared library])
  else
    enable_dynamic_graphics=no
  fi
fi

SAH_CHECK_NAMESPACES
AH_TEMPLATE([HAVE_STD_MIN],[Define to 1 if min is in namespace std::])
AH_TEMPLATE([HAVE_STD_MAX],[Define to 1 if max is in namespace std::])
AH_TEMPLATE([HAVE_STD_TRANSFORM],[Define to 1 if transform is in namespace std::])
SAH_FUNCS_IN_NAMESPACE([['min(0,0)'] ['max(0,0)'] ['transform((char *)0,(char *)0,(char *)0,(int(*)(int))malloc)']],std)

AM_CONDITIONAL(USE_MY_IMAGELIBS, [false])
AM_CONDITIONAL(USE_MY_GLUT, [false])
AM_CONDITIONAL(USE_MY_LIBJPEG, [false])
AM_CONDITIONAL(ENABLE_SERVER, [test "${enable_server}" = yes])
AM_CONDITIONAL(ENABLE_CLIENT, [test "${enable_client}" = yes])
AM_CONDITIONAL(ENABLE_GUI, [test "${enable_graphics}" = yes])
AM_CONDITIONAL(ENABLE_DLOPEN, [test "${enable_dynamic_graphics}" = yes])
AM_CONDITIONAL(LINUX, [test -n "`echo ${target} | grep linux`"])

AC_CACHE_SAVE

AH_TOP([
#ifndef _SAH_CONFIG_H_
#define _SAH_CONFIG_H_

#ifdef _WIN32
#include "win-config.h"
#else
])


AH_BOTTOM([ 

/* Define USE_NAMESPACES if you may access more than one database from the
 * same program
 */

#endif

/*
 * Use fftw if we have the library
 */
#if defined(HAVE_LIBFFTW3F) && defined(HAVE_FFTW3_H)
#define USE_FFTWF
#endif

#if defined(USE_INFORMIX) && defined(USE_MYSQL) && defined(HAVE_NAMESPACES)
#define USE_NAMESPACES
#endif

#include "std_fixes.h"

#endif
])

AC_CONFIG_FILES([Makefile
                 client/Makefile
		 tools/Makefile
                 db/Makefile
                 db/tools/Makefile
		 db/schema_to_class
                ])
AC_CONFIG_HEADERS([config.h])

AC_OUTPUT
chmod +x db/schema_to_class

--------------070208060806000908080906--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46004D16.1030606>