File: configure.in

package info (click to toggle)
gambit 0.2006.01.20-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 8,296 kB
  • ctags: 11,027
  • sloc: cpp: 87,515; sh: 8,367; ansic: 720; makefile: 692
file content (151 lines) | stat: -rw-r--r-- 4,769 bytes parent folder | download | duplicates (3)
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(sources/libgambit/libgambit.h)
AM_INIT_AUTOMAKE(gambit, 0.2006.01.20)
dnl AM_CONFIG_HEADER(config.h)

dnl User-specified options
dnl By default, we build the GUI
WITH_GUI=1
AC_ARG_ENABLE(gui,
[  --disable-gui             Don't build graphical interface ],
  WITH_GUI=0
  GUI_DIRS=""
)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL

dnl A number of the following checks are currently commented out.
dnl These are checks for functions and headers we do actually use,
dnl but for which we don't have any workarounds should they be missing.

dnl Checks for header files.
dnl AC_HEADER_STDC
dnl AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/time.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
dnl AC_C_CONST
dnl AC_C_INLINE
dnl AC_TYPE_PID_T
dnl AC_TYPE_SIZE_T
dnl AC_STRUCT_TM

dnl Checks for library functions.
dnl AC_FUNC_MEMCMP
dnl AC_TYPE_SIGNAL
dnl AC_CHECK_FUNCS(ftime putenv strdup strstr strtod strtol)
AC_CHECK_FUNCS(bcmp srand48 drand48)


if test "${WITH_GUI}" == 1; then
  dnl------------------------
  dnl Checking for wxWidgets
  dnl------------------------

  dnl check for wx-config
  WX_PATH_WXCONFIG(2.6.0, WXCONFIG=1)
  if test "$WXCONFIG" != 1; then
      AC_MSG_WARN([
            Did not find a version of wxWidgets; disabling build of
            graphical interface.  If you want to build the graphical interface,
            please check that wx-config is in path, the directory
            where wxWidgets libraries are installed (returned by
            'wx-config --libs' command) is in LD_LIBRARY_PATH or
            equivalent variable and wxWidgets is version 2.6.0 or above.
      ])
      GUI_DIRS=""
  fi

  AC_MSG_CHECKING(for wxWidgets port)
  if test `echo ${WX_CXXFLAGS} | grep -c __WXX11__` -eq 1; then
    AC_MSG_RESULT(universal)
    AC_MSG_WARN([
            Found universal port of wxWidgets; disabling build of graphical
            interface.  The graphical interface cannot be built with this
            port because this port does not implement drag-and-drop capability.
            Gambit recommends the GTK port of wxWidgets for best results.
    ])
    GUI_DIRS=""
  fi

  if test `echo ${WX_CXXFLAGS} | grep -c __WXMOTIF__` -eq 1; then
    AC_MSG_RESULT(Motif)
    AC_MSG_WARN([
            Found Motif port of wxWidgets; disabling build of graphical
            interface.  The graphical interface cannot be built with this
            port because this port does not implement drag-and-drop capability.
            Gambit recommends the GTK port of wxWidgets for best results.
    ])
    GUI_DIRS=""
  fi

  if test `echo ${WX_CXXFLAGS} | grep -c __WXGTK__` -eq 1; then
    AC_MSG_RESULT(GTK)
    WXPORT="GTK"
    GUI_DIRS="labenski gui"
  fi

  if test `echo ${WX_CXXFLAGS} | grep -c __WXMSW__` -eq 1; then
    AC_MSG_RESULT(Windows)
    WXPORT="MSW"
    GUI_DIRS="labenski gui"
    dnl Windows uses the resources file
    RC_OBJECT="gambitrc.o"
    RC_OBJECT_PATH="bitmaps/gambitrc.o"
    AC_SUBST(RC_OBJECT)
    AC_SUBST(RC_OBJECT_PATH)
  fi

  if test `echo ${WX_CXXFLAGS} | grep -c __WXMAC__` -eq 1; then
    AC_MSG_RESULT(Macintosh)
    WXPORT="MAC"
    GUI_DIRS="labenski gui"
  fi

  if test -z "$WXPORT"; then
    AC_MSG_WARN([
            Could not identify wxWidgets port.  Disabling build
            of Gambit graphical interface.
    ])
    GUI_DIRS=""
  fi	
fi

AC_SUBST(GUI_DIRS)

AC_SUBST(WX_CXXFLAGS)
AC_SUBST(WX_LIBS)

REZFLAGS=`echo $CXXFLAGS $WX_CXXFLAGS | sed 's/-mthreads//g' | sed 's/-g//g' | sed 's/-O. / /g' | sed 's/-I/--include-dir /g'`
AC_SUBST(REZFLAGS)

AC_OUTPUT(Makefile sources/Makefile \
          sources/libgambit/Makefile \
	  sources/tools/Makefile \
	  sources/tools/convert/Makefile \
	  sources/tools/enummixed/Makefile \
	  sources/tools/enumpoly/Makefile \
	  sources/tools/enumpure/Makefile \
          sources/tools/gt/Makefile \
	  sources/tools/lcp/Makefile \
	  sources/tools/liap/Makefile \
	  sources/tools/logit/Makefile \
	  sources/tools/lp/Makefile \
	  sources/tools/mixdom/Makefile \
	  sources/tools/simpdiv/Makefile \
          sources/labenski/Makefile \
          sources/labenski/art/Makefile \
          sources/labenski/include/Makefile \
          sources/labenski/include/wx/Makefile \
          sources/labenski/include/wx/wxthings/bitmaps/Makefile \
          sources/labenski/include/wx/wxthings/Makefile \
          sources/labenski/include/wx/sheet/Makefile \
          sources/labenski/include/wx/plotctrl/Makefile \
          sources/labenski/src/Makefile \
          sources/labenski/doc/Makefile \
	  sources/gui/bitmaps/Makefile \
          sources/gui/Makefile \
          doc/Makefile efg/Makefile nfg/Makefile)