[go: up one dir, main page]

File: configure.in

package info (click to toggle)
ifeffit 2%3A1.2.11d-9.1
  • links: PTS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd
  • size: 12,444 kB
  • ctags: 6,492
  • sloc: fortran: 35,441; ansic: 8,454; makefile: 4,815; python: 3,274; perl: 3,146; sh: 2,721; ada: 1,003; tcl: 95
file content (139 lines) | stat: -rw-r--r-- 4,075 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Copyright (C) 2000 Matt Newville <newville@cars.uchicago.edu>
#
# This file is free software; the author gives unlimited permission 
# to copy and/or distribute it, with or without modifications, as 
# long as this notice is preserved.
#
AC_INIT(ifeffit, 1.2.10, newville@cars.uchicago.edu)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(ifeffit,1.2.10)
AC_PROG_CC(gcc cc )
AC_PROG_CPP(gcc cc)
## AC_PROG_F77(gfortran g77 g95 f77 f90)

AC_ISC_POSIX
AC_HEADER_STDC
#  change for Debian (CUS)
#AC_PROG_RANLIB
AC_PROG_LIBTOOL
AC_INCLUDES_DEFAULT

AC_PATH_PROGS(PERL,   perl perl5 perl5.8 perl5.6 perl5.005, NO_PERL )
AC_PATH_PROGS(PYTHON, python python2 python2.5 python2.4 python2.3 python2.2 python2.1, NO_PYTHON)

# use Debian version of readline (CUS)
#AC_CONFIG_SUBDIRS(readline)

################################
FCLIST='gfortran g77 g95 f77 f90 xlf'
AC_ARG_WITH(fortran, 
            [ --with-fortran=compiler specify fortran compiler g77 g95 gfortran],  
	    [if test "$withval"; then  FCLIST=$withval; fi])

AC_PROG_F77($FCLIST)
AC_F77_LIBRARY_LDFLAGS


################################
# get terminal capabilities library (typically -L/usr/lib -lncurses)

TERMCAP_LIB=`$SHELL ./iconf_term`
AC_ARG_WITH(termcap-link, 
            [  --with-termcap-link=libraries to use for linking terminal capabilities],  
	    [if test "$withval" ; then TERMCAP_LIB=$withval;  fi])

AC_SUBST(TERMCAP_LIB)

################################
# test selected memory size
ARRSIZE=large
AC_ARG_WITH(arraysize, 
            [  --with-arraysize=size  specify array size:  tiny,small,medium,large,huge],  
	    [if test "$withval" = no; then  
               ARRSIZE=large; 
            else     
               ARRSIZE=$withval;
            fi])
AC_SUBST(ARRSIZE)
##
##
VERSION=`$SHELL ./iconf_iff $prefix $ARRSIZE $PACKAGE $ac_default_prefix `

## simple script to fix bad ordering of FLIBS with gcc

MN_FLIBS=`$SHELL ./iconf_flib  "$FLIBS"`

AC_MSG_RESULT([===  Fortran LIBS: $MN_FLIBS])

AC_SUBST(MN_FLIBS)

# tests for PGPLOT

pgdir=''
use_pgplot=true
pwd=`pwd`
PGPLOT_LIBS="$pwd/src/pgstub/libnopgplot.a";
AC_ARG_WITH(pgplot, [  --with-pgplot=dir       specify directory of libpgplot.a],
     [if test "$withval" = no; then  
           use_pgplot=false ; pgdir=''; 
      else 
           use_pgplot=true  ; pgdir=$withval ; 
      fi],  use_pgpglot=true)

# use test_plot script to test PGPLOT install
if $use_pgplot; then  PGPLOT_LIBS=`$SHELL ./iconf_pgplot $pgdir`; fi


# or specify full link argument!!
AC_ARG_WITH(pgplot-link, 
            [  --with-pgplot-link=link      specify all libraries for PGPLOT linking],
            [if test "$withval" ; then 
                use_pgplot=true; PGPLOT_LIBS=$withval; fi],  use_pgpglot=true)

AC_MSG_RESULT([will link to PGPLOT using $PGPLOT_LIBS])
AC_SUBST(use_pgplot)
AC_SUBST(PGPLOT_LIBS)
AC_SUBST(pgdir)
################################


# AC_CONFIG_SUBDIRS(fortran/f2c fortran/libf2c readline)
#          fortran/Makefile f2c_comp 
#          readline/Makefile

AC_OUTPUT([src/Makefile
	  src/pgstub/Makefile  
	  src/cldata/Makefile 
	  src/fefftab/Makefile 
          src/lib/Makefile 
 	  src/cmdline/Makefile 
          src/autobk/Makefile
          src/feffit/Makefile
          src/diffkk/Makefile
	  src/test/Makefile 
	  src/feff6/Makefile
          Makefile ])

# $SHELL ./config.status

AC_MSG_RESULT([===])
AC_MSG_RESULT([===  $PACKAGE $VERSION Configuration Results:])
if $use_pgplot ; then
   AC_MSG_RESULT([===  linking to PGPLOT with: $PGPLOT_LIBS]) ; 
else
   AC_MSG_RESULT([===  WARNING: Plotting will not work!]) ;
fi

if  test "$TERMCAP_LIB" = "-L -l" ;  then
   AC_MSG_RESULT([===])
   AC_MSG_RESULT([===  could not find TERMCAP Libraries : 'make' will fail.]) ; 
   AC_MSG_RESULT([===])
   AC_MSG_RESULT([===  Please set TERMCAP_LIB in src/cmdline/Makefile or use the])
   AC_MSG_RESULT([===  --termcap-link argument before running make])
else
   AC_MSG_RESULT([===  using TERMCAP_LIB   $TERMCAP_LIB]);
   AC_MSG_RESULT([===])
   AC_MSG_RESULT([===  ready for next step: type 'make' then 'make install'])
fi