File: configure.in

package info (click to toggle)
dcl 7.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 17,208 kB
  • sloc: fortran: 48,501; makefile: 4,265; ansic: 3,993; sh: 137; f90: 14
file content (165 lines) | stat: -rw-r--r-- 3,148 bytes parent folder | download
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
dnl
dnl template file to create configure script for DCL
dnl

configure.in:
AC_INIT(INSTALL)

AC_CONFIG_HEADER(config.h)

DCLVERSION=7.3.3
DCLVERNUM=733
dnl #if FORTRAN
DCLLANG=f77
dnl #elif C
dnl DCLLANG=c
dnl #endif

DCLNWS=2

CFLAGS=${CFLAGS--O}
FFLAGS=${FFLAGS--O}

DCL_PROG_CC
AC_PROG_CPP
DCL_PROG_AWK
DCL_PROG_SED
AC_PROG_RANLIB

dnl Check Fortran Compiler
dnl #if FORTRAN
DCL_PROG_FC
dnl #elif C
dnl DCL_PROG_FC_for_C
dnl #endif

dnl Check LaTeX program
DCL_PROG_JLATEX
DCL_PROG_DVIPDF


dnl shared library
dnl #if FORTRAN
TODO_SHARED_LIBRARY=
LINKOPT=
EXTSHLIB=dummy
AC_SUBST(TODO_SHARED_LIBRARY)
AC_SUBST(LINKOPT)
AC_SUBST(EXTSHLIB)
dnl #elif C
dnl DCL_SHARED
dnl #endif

AC_SUBST(CFLAGS)

dnl old src
AC_SUBST(OLDSRC)
AC_ARG_WITH(oldsrc,dnl
[  --with-oldsrc           compile dcl source codes older than ver.5],
if test "$withval" = yes; then OLDSRC=oldsrc; \
else OLDSRC=; fi, OLDSRC=
)dnl

dnl OSLIB
dnl #if FORTRAN
DCL_CHECK_OSLIB_OPTIONS
dnl #elif C
dnl OSGARG_OPT=getarg
dnl OSQARN_OPT=iargc
dnl AC_SUBST(OSGARG_OPT)
dnl AC_SUBST(OSQARN_OPT)
dnl #endif

dnl CSGI
dnl #if FORTRAN
DCL_CHECK_CSGI
dnl #elif C
dnl DCL_CHECK_CSGI_C
dnl #endif

dnl DCLDIR
DCL_SET_DCLDIR

dnl bitlib
dnl #if FORTRAN
DCL_FORTRAN_TYPES
dnl #endif

DCL_CHECK_VALUES
DCL_CHECK_CLOCK_VALUES

AC_SUBST(DCLVERSION)
AC_SUBST(DCLVERNUM)
AC_SUBST(DCLLANG)

AC_SUBST(DCLNWS)

# Checks for libraries.
#PKG_PROG_PKG_CONFIG
AC_ARG_WITH([gtk3], AS_HELP_STRING([--with-gtk3], [Build using GTK+ 3.0 (default)]), [with_gtk3=yes], [with_gtk3=no])
AC_ARG_WITH([gtk2], AS_HELP_STRING([--with-gtk2], [Build using GTK+ 2.0]), [with_gtk2=yes], [with_gtk2=no])
AC_ARG_WITH([socket], AS_HELP_STRING([--with-socket], [Build without GTK+ (Using Socket)]), [with_socket=yes], [with_socket=no])

AS_IF([test "x$with_socket" = "xyes"],[
    GTK_CFLAGS=""
    GTK_LIBS=""
    GTKVERSION=""
    DRV_EXT="socket"
],[
    AS_IF([test "x$with_gtk2" = "xyes"], [
	PKG_CHECK_MODULES([GTK2], [gtk+-2.0],[AC_DEFINE([HAVE_GTK2], [1], [Define if using GTK+2])
            GTK_CFLAGS=${GTK2_CFLAGS}
            GTK_LIBS=${GTK2_LIBS}
            GTKVERSION=2
            DRV_EXT="gtk"
       ])
    ],[
        AS_IF([test "x$with_gtk3" = "xyes"], [
            PKG_CHECK_MODULES([GTK3], [gtk+-3.0],[AC_DEFINE([HAVE_GTK3], [1], [Define if using GTK+3])
                GTK_CFLAGS=${GTK3_CFLAGS}
                GTK_LIBS=${GTK3_LIBS}
                GTKVERSION=3
                DRV_EXT="gtk"
             ])
         ],[
            PKG_CHECK_MODULES([GTK3], [gtk+-3.0])
                GTK_CFLAGS=${GTK3_CFLAGS}
                GTK_LIBS=${GTK3_LIBS}
                GTKVERSION=3
                DRV_EXT="gtk"
         ])
     ])
])

AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTKVERSION)
AC_SUBST(DRV_EXT)

expunge () {
  list=$1

  list=`reverse_list ${list}`

  newlist=""
  for arg in ${list}
  do
    return=`echo ${newlist} | grep -- ${arg}`
    if test -z "${return}" ; then
      newlist="${arg} ${newlist}"
    fi
  done

  echo ${newlist}
}

reverse_list () {
  newlist=""
  for arg in $*
  do
    newlist="${arg} ${newlist}"
  done
  echo ${newlist}
}

AC_OUTPUT(Mkinclude Makefile)