Skip to content

Commit

Permalink
new configure, some improvement...
Browse files Browse the repository at this point in the history
  • Loading branch information
urbach committed Dec 4, 2006
1 parent a27da3b commit 0787f23
Show file tree
Hide file tree
Showing 10 changed files with 222 additions and 90 deletions.
8 changes: 6 additions & 2 deletions Makefile.global
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ Makefile: $(srcdir)/Makefile.in $(abs_top_builddir)/config.status
$(abs_top_builddir)/config.status: $(top_srcdir)/configure
( cd ${abs_top_builddir} && $(SHELL) ./config.status --recheck )

$(abs_top_builddir)/config.h: $(abs_top_builddir)/stamp-h
$(abs_top_builddir)/stamp-h: $(top_srcdir)config.h.in config.status
./config.status

#$(top_srcdir)/configure: $(top_srcdir)/configure.in
#$(top_srcdir)/configure:
# ( cd $(top_builddir) && $(AUTOCONF) )
# ( cd $(top_srcdir) && $(AUTOCONF) )

#extern modules

Expand All @@ -30,7 +34,7 @@ $(LINKLIBS): %.a: Makefile
#dep rule

$(addsuffix .d,$(ALLOBJ)): %.d: ${srcdir}/%.c Makefile
@ $(CCDEP) ${DEPFLAGS} ${INCLUDES} ${DEFS} $< > $@
@ $(CCDEP) ${DEPFLAGS} ${CPPFLAGS} ${INCLUDES} ${DEFS} $< > $@

${top_builddir}/fixed_volume.h: ${top_srcdir}/fixed_volume.h.in ${top_builddir}/config.status
cd ${abs_top_builddir} && CONFIG_FILES=fixed_volume.h CONFIG_HEADERS= $(SHELL) ${top_builddir}/config.status
Expand Down
18 changes: 12 additions & 6 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,37 @@ CCDEP = @CCDEP@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEPFLAGS = @DEPFLAGS@
CPPFLAGS = @CPPFLAGS@
CCLD = $(CC)
LEX = @LEX@
AUTOCONF = @AUTOCONF@
LIBS = @LIBS@
SHELL = @SHELL@
OPTARGS = @OPTARGS@
SOPTARGS = @SOPTARGS@
DEFS = @DEFS@

INCLUDES = @INCLUDES@
LINK = $(CCLD) -o $@ ${LDFLAGS} ${OPTARGS}
LINKLIBS = ${top_builddir}/linalg/liblinalg.a \
${top_builddir}/solver/libsolver.a
COMPILE = ${CC} $(DEFS) $(INCLUDES) -o $@ ${CFLAGS} ${OPTARGS}
COMPILE = ${CC} $(DEFS) $(INCLUDES) -o $@ ${CFLAGS}

MODULES = init_gauge_field init_geometry_indices init_spinor_field \
init_bispinor_field init_moment_field init_gauge_tmp \
read_input gamma linsolve xchange_field xchange_gauge \
xchange_deri expo hybrid_update observables start \
geometry_eo linalg_eo ranlxd io Hopping_Matrix \
geometry_eo linalg_eo ranlxd io mpi_init update_tm \
boundary deriv_Sb tm_operators getopt sighandler \
mpi_init update_tm Hopping_Matrix_nocom \
test/check_geometry test/check_xchange invert_eo \
measure_rectangles get_rectangle_staples \
derivative_psf ext_integrator polyakov_loop \
2mn_integrator get_staples update_backward_gauge \
reweight_kappac init_dirac_halfspinor xchange_halffield \
source_generation

SMODULES = Hopping_Matrix_nocom Hopping_Matrix

### eigenvalues_bi max_eigenvalues_bi Nondegenerate_Matrix \
PROGRAMS = hmc_tm thermal_cycle_tm benchmark invert gwc2ildg ildg2gwc single2double double2single reducenoise gen_sources
Expand All @@ -61,13 +64,16 @@ flex_read_input: read_input.l
${LEX} -i -t $< > read_input.c

${addsuffix .o, ${MODULES}}: %.o: ${srcdir}/%.c %.d Makefile
${COMPILE} -c $<
${COMPILE} ${OPTARGS} -c $<

${addsuffix .o, ${SMODULES}}: %.o: ${srcdir}/%.c %.d Makefile
${COMPILE} ${SOPTARGS} -c $<

${addsuffix .o, ${PROGRAMS}}: %.o: ${srcdir}/%.c %.d Makefile
${COMPILE} -c $<

${PROGRAMS}: %: %.o ${addsuffix .o, ${MODULES}} ${LINKLIBS}
${LINK} ${addsuffix .o, ${MODULES}} $@.o $(LIBS)
${PROGRAMS}: %: %.o ${addsuffix .o, ${MODULES}} ${addsuffix .o, ${SMODULES}} ${LINKLIBS}
${LINK} ${addsuffix .o, ${MODULES}} ${addsuffix .o, ${SMODULES}} $@.o $(LIBS)

dep: $(addsuffix .d,$(ALLOBJ))

Expand Down
64 changes: 53 additions & 11 deletions config.guess
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.

timestamp='2005-09-19'
timestamp='2006-11-30'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
Expand Down Expand Up @@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
Expand Down Expand Up @@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
Expand Down Expand Up @@ -764,7 +769,14 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
Expand All @@ -779,8 +791,11 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
x86:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
Expand Down Expand Up @@ -817,6 +832,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
Expand Down Expand Up @@ -851,7 +869,11 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
Expand All @@ -870,7 +892,11 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
Expand Down Expand Up @@ -919,6 +945,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
Expand Down Expand Up @@ -964,7 +993,7 @@ EOF
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
Expand All @@ -974,7 +1003,11 @@ EOF
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
Expand Down Expand Up @@ -1176,6 +1209,12 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
Expand Down Expand Up @@ -1263,6 +1302,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac

#echo '(No uname command or uname output not recognized.)' 1>&2
Expand Down
Loading

0 comments on commit 0787f23

Please sign in to comment.