File: configure.in

package info (click to toggle)
xmorph 1%3A20011220
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,468 kB
  • ctags: 1,534
  • sloc: ansic: 16,401; sh: 2,651; makefile: 556; tcl: 516
file content (226 lines) | stat: -rw-r--r-- 5,117 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
dnl Process this file with autoconf to produce a configure script.

dnl################################
dnl : ACGM : this part was generated by glade

AC_INIT(configure.in)

dnl ACGM: the following line tells PRCS (and CVS?) to update the version
dnl $Format: "AM_INIT_AUTOMAKE(xmorph, $ProjectVersion$)"$
AM_INIT_AUTOMAKE(xmorph, 20011010)
AM_CONFIG_HEADER(config.h)


#if test x$target = xi386-cygwin ; then
# export CC=i386-
#else 


dnl AC_ISC_POSIX
dnl AC_PROG_CC
dnl AM_PROG_CC_STDC
dnl AC_HEADER_STDC

AM_PROG_LIBTOOL

dnl Add the languages which your application supports here.
ALL_LINGUAS="it"
AM_GNU_GETTEXT

dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi

dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
  else
    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
fi

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")

dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi
changequote([,])dnl



dnl ####################  -with-*, 

AC_ARG_WITH(morph,    [  --with-morph           compile morph  (yes)])

AC_ARG_WITH(xmorph,   [  --with-xmorph          compile xmorph (auto)])

AC_ARG_WITH(gtkmorph, [  --with-gtkmorph        compile gtkmorph (auto)])

AC_ARG_WITH(tkmorph,  [  --with-tkmorph         compile tkmorph (no)])




dnl ####################  libraries cheching
dnl :ACGM: this part was done by me

dnl the idea is to use
dnl AC_ARG_WITH (PACKAGE, HELP-STRING [, ACTION-IF-GIVEN [,
dnl          ACTION-IF-NOT-GIVEN]])

#############xmorph
dnl see for details in  "info autoconf"

AC_PATH_X

dnl Find additional X libraries, magic flags, etc.
dnl in particular, it defines the linker  definition "-L///" 
dnl as @X_LIBS@
dnl see for details in  "info autoconf"
dnl  and in  /usr/share/autoconf/acspecific.m4

AC_PATH_XTRA

if  test "x$have_x" = "xyes" ; then
 if test "x$with_xmorph" = x ; then
  echo Will build xmorph.
  #force yes
  with_xmorph=yes
 fi
else #have_x=yes
 echo Either you have disabled X support, or you have specified --without-x
 if test "x$with_xmorph" = xyes ; then
  echo May not build xmorph.
  exit 1
 else
  with_xmorph=no
  echo Will not build xmorph.
 fi
fi #have_x

################### morph

if ! test "x$with_morph" = xno ; then
 echo Will build  morph.
 #force default
 with_morph=yes
fi

################## gtkmorph

if ! test "x$with_gtkmorph" = xno ; then
 echo May build  gtkmorph... testing needed libraries...
 test_gtkmorph=ok

dnl AM_PATH_GLIB(1.2.0, ,
dnl   echo Cannot find GLIB: Is glib-config in path? gtkmorph may not be compiled ;  test_gtkmorph=no
dnl )


AM_PATH_GTK(1.2.0, ,
  echo Cannot find GTK: Is gtk-config in path? gtkmorph may not be compiled ;  test_gtkmorph=no
)

AM_PATH_GDK_PIXBUF(0.9.0, ,
  echo Cannot find gdk-pixbuf: gtkmorph may not be compiled ;  test_gtkmorph=no
)

 if test "x$test_gtkmorph" = xno  ; then
  if test "x$with_gtkmorph" = xyes ; then
      echo gtkmorph may not be compiled
      exit 1
   else
      echo Not compiling gtkmorph
      with_gtkmorph=no
   fi
 else
  with_gtkmorph=yes
 fi
fi #with gtkmorph

##################### tkmorph

if  test "x$with_tkmorph" = xyes ; then
 echo Will build  tkmorph... testing needed libraries...
 #force default
 with_tkmorph=yes

dnl Adds the following arguments to configure:
dnl                --with-tcl=...
dnl Defines the following vars:
dnl               TCL_BIN_DIR

 SC_PATH_TCLCONFIG

dnl Locate the tkConfig.sh file
dnl Defines the following vars:
dnl                TK_BIN_DIR

 SC_PATH_TKCONFIG
else
  echo Not compiling  tkmorph.
fi #with tkmorph


#################################


dnl automake conditionals
AM_CONDITIONAL(COND_MORPH, test "x$with_morph" = xyes  )
AM_CONDITIONAL(COND_XMORPH, test "x$with_xmorph" = xyes )
AM_CONDITIONAL(COND_GTKMORPH, test "x$with_gtkmorph" = xyes )
AM_CONDITIONAL(COND_TKMORPH, test "x$with_tkmorph" = xyes )

dnl :ACGM: some courtesy message

if  test "x$with_morph" = xyes ; then
 echo The Makefile will build morph.
fi

if  test "x$with_xmorph" = xyes ; then
  echo The Makefile will build xmorph.
fi

if  test "x$with_gtkmorph" = xyes ; then
  echo The Makefile will build gtkmorph.
fi

if  test "x$with_tkmorph" = xyes ; then
 echo The Makefile will try to build tkmorph.
 echo We are very sorry but tkmorph is not fully developed now.
 echo The project will not build properly
fi


dnl #####################


AC_OUTPUT([
Makefile
intl/Makefile
po/Makefile.in
doc/Makefile
libmorph/Makefile
morph/Makefile
xmorph/Makefile
gtkmorph/Makefile
tkmorph/Makefile
])