Skip to content

Commit

Permalink
Moved configure to suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosinski committed Apr 5, 2008
1 parent a87e19a commit ce3d948
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 381 deletions.
5 changes: 4 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ After untarring the distribution and then doing "cd gptl", construct a
macros.make file by editing one of the templates provided (currenty there's
macros.make.linux, and macros.make.sicortex) that is closest to the machine
you're building the library on. Step-by-step instructions for setting each
configuration option are embedded in that file. Then:
configuration option are embedded in that file. If unsure of some settings,
you can run "./suggestions". This is an autoconf "configure" script which has
been modified to just print suggestions, rather than creating any output
files. After creating macros.make:

% make all
% make install
Expand Down
141 changes: 0 additions & 141 deletions aclocal.m4

This file was deleted.

18 changes: 11 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(private.h)
AC_LANG(C)

echo "This script provides suggestions for settings to apply in macros.make"
echo "You can pass things like FC=gfortran or CC=pathcc to it to override defaults."
AC_PROG_MAKE_SET
AC_PROG_CC()
#AC_PROG_FC()
echo "Assuming C compiler is $CC"
AC_PROG_FC()
echo "Assuming Fortran compiler is $FC"
dnl This barfs when CC is pgcc and F77 pgf90
AC_FC_FUNC(z_zz,z_zz)
case $z_zz in
z_zz__) echo FORTRANDOUBLEUNDERSCORE ;;
z_zz_) echo FORTRANUNDERSCORE ;;
Z_ZZ) echo FORTRANCAPS ;;
z_zz__) echo "Fortran name mangling: -DFORTRANDOUBLEUNDERSCORE" ;;
z_zz_) echo "Fortran name mangling: -DFORTRANUNDERSCORE" ;;
Z_ZZ) echo "Fortran name mangling: -DFORTRANCAPS" ;;
*) echo "Fortran name mangling: none" ;;
esac

dnl For proper handling of const and inline
AC_C_INLINE
dnl Checks for library functions.
AC_FUNC_VPRINTF
echo "Inlining: -Dinline=$ac_cv_c_inline"
dnl AC_FUNC_VPRINTF
2 changes: 1 addition & 1 deletion macros.make.linux
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endif

# For gcc, -Dinline=inline is a no-op. For other C compilers, things like
# -Dinline=__inline__ may be required. Autoconf test AC_C_INLINE can find the
# right definition.
# right definition. If unsure, try running "./suggestions CC=<your_C_compiler>"
INLINEFLAG = -Dinline=inline

# To build the Fortran interface, set FORTRAN=yes and define the entries under
Expand Down
13 changes: 8 additions & 5 deletions macros.make.sicortex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Where to install GPTL library, include files, and man pages
INSTALLDIR = /home/jrosinski/mips
INSTALLDIR = $(HOME)/mips

# C compiler and flags: symbols, high optimization, inlining
CC = pathcc
Expand All @@ -24,16 +24,19 @@ else
LDFLAGS += -lpthread
endif

# For gcc, -Dinline=inline is a no-op. For other C compilers, things like -Dinline=__inline__
# may be required. Autoconf test AC_C_INLINE can find the right definition.
# For gcc, -Dinline=inline is a no-op. For other C compilers, things like
# -Dinline=__inline__ may be required. Autoconf test AC_C_INLINE can find the
# right definition. If unsure, try running "./suggestions CC=<your_C_compiler>"
INLINEFLAG = -Dinline=inline

# To build the Fortran interface, set FORTRAN=yes and define the entries under
# ifeq ($(FORTRAN),yes). Otherwise, set FORTRAN=no and skip this section.
FORTRAN = yes
ifeq ($(FORTRAN),yes)
# Fortran name mangling: possibilities are: leave UNDERSCORING blank (none),
# -DFORTRANDOUBLEUNDERSCORE (e.g. g77), and -DFORTRANUNDERSCORE (e.g. gfortran)
# Fortran name mangling: possibilities are: leave UNDERSCORING blank meaning none
# (e.g. xlf90), -DFORTRANDOUBLEUNDERSCORE (e.g. g77), and -DFORTRANUNDERSCORE
# (e.g. gfortran, pathf95)
#
# UNDERSCORING =
UNDERSCORING = -DFORTRANUNDERSCORE
UNDERSCORING = -DFORTRANDOUBLEUNDERSCORE
Expand Down
Loading

0 comments on commit ce3d948

Please sign in to comment.