File: configure.in

package info (click to toggle)
fvwm95 2.0.43ba-22
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,904 kB
  • ctags: 4,760
  • sloc: ansic: 46,436; makefile: 1,589; sh: 780; perl: 328
file content (244 lines) | stat: -rw-r--r-- 7,117 bytes parent folder | download | duplicates (4)
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
#-------------------------------------------------------------------
#
# Process this file with autoconf to produce a configure script.
#
#-------------------------------------------------------------------

AC_INIT()
AC_PREREQ(2.4)

AC_CONFIG_HEADER(include/FVWMconfig.h)

#CFLAGS=-O

#-------------------------------------------------------------------
#
# Remove the ./config.cache file and rerun configure if
# the cache file belong to a different architecture
#
#-------------------------------------------------------------------

AC_CHECK_PROG(UNAME, uname -a, [uname -a], "")
if test "$UNAME" = ""; then
    AC_CHECK_PROG(UNAME, uname, [uname], "")
fi

if test "$UNAME" != ""; then
    uname=`$UNAME`
    AC_MSG_CHECKING('checking cached value of \$uname')
    AC_CACHE_VAL(ac_cv_prog_uname, [nocached=1 ac_cv_prog_uname=`$UNAME`])
    if test "$nocached" = "1"; then
        AC_MSG_RESULT(no)
    else
        AC_MSG_RESULT(yes)
    fi

    if test "$uname" != "$ac_cv_prog_uname"; then
        echo "Running on a different architecture. Can't use cached values"
        echo "Removing config.cache and running configure again"
        rm -f config.cache
        exec $CMDLINE
    fi
fi


#-------------------------------------------------------------------
#
# Checks for programs.
#
#-------------------------------------------------------------------

AC_CHECK_PROG(AR, ar, ar cr, ar cr)
AC_CHECK_PROG(MAKEDEPEND, makedepend, makedepend, makedepend)
AC_CHECK_PROG(RM, rm, rm -f, rm -f)
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PROG_CC


#-------------------------------------------------------------------
#
# Check for OS specific
#
#-------------------------------------------------------------------

AC_AIX


#-------------------------------------------------------------------
#
# Checks for standard programs.
#
#-------------------------------------------------------------------

AC_PROG_CPP
AC_PROG_YACC
AC_PROG_LEX
AC_PROG_INSTALL
AC_PROG_LN_S


#-------------------------------------------------------------------
#
# Check for the existence of various libraries.  The order here
# is important, so that then end up in the right order in the
# command line generated by make.  The -lsocket and -lnsl libraries
# require a couple of special tricks:
#
#   1. Use "connect" and "accept" to check for -lsocket, and
#      "gethostbyname" to check for -lnsl.
#   2. Use each function name only once:  can't redo a check because
#      autoconf caches the results of the last check and won't redo it.
#   3. Use -lnsl and -lsocket only if they supply procedures that
#      aren't already present in the normal libraries.  This is because
#      IRIX 5.2 has libraries, but they aren't needed and they're
#      bogus:  they goof up name resolution if used.
#   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
#      To get around this problem, check for both libraries together
#      if -lsocket doesn't work by itself.
#
# Need to check for Xpm and rplay
#
#-------------------------------------------------------------------

AC_CHECK_LIB(Xbsd, main, [LIBS="$LIBS -lXbsd"])

fvwm95_checkBoth=0
AC_CHECK_FUNC(connect, fvwm95_checkSocket=0, fvwm95_checkSocket=1)
if test "$fvwm95_checkSocket" = 1; then
    AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", fvwm95_checkBoth=1)
fi
if test "$fvwm95_checkBoth" = 1; then
    fvwm95_oldLibs=$LIBS
    LIBS="$LIBS -lsocket -lnsl"
    AC_CHECK_FUNC(accept, fvwm95_checkNsl=0, [LIBS=$fvwm95_oldLibs])
fi
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))

# For FvwmConsole
AC_CHECK_LIB(readline, readline, READLINE_LIBRARIES="-lreadline"
 AC_DEFINE(HAVE_READLINE), READLINE_LIBRARIES="")
AC_SUBST(READLINE_LIBRARIES)
#-------------------------------------------------------------------
#
# Checks for header files.
#
#-------------------------------------------------------------------

AC_HEADER_STDC


#-------------------------------------------------------------------
#
# Checks for typedefs, structures, and compiler characteristics.
#
#-------------------------------------------------------------------

AC_C_CONST
AC_C_INLINE


#-------------------------------------------------------------------
#
# Checks for library functions.
#
#-------------------------------------------------------------------

# AC_CHECK_FUNCS(select)
AC_CHECK_FUNCS(gethostname waitpid sysconf uname)
AC_CHECK_FUNCS(strerror strcasecmp strncasecmp strtoul)


#===================================================================

#-------------------------------------------------------------------
# 
# Check for X11
#
#-------------------------------------------------------------------

AC_PATH_X


#-------------------------------------------------------------------
#
# Hard coded fvwm config stuff
#
#-------------------------------------------------------------------

fvwm_name="fvwm95"
fvwm_rc=".fvwm95rc"
fvwm_icons="$x_includes/X11/bitmaps:$x_includes/X11/pixmaps:$prefix/icons"

if test "x$x_libraries" != x ; then
  x_libraries="-L$x_libraries"
fi
if test "x$x_includes" != x ; then
  x_includes="-I$x_includes"
fi


#-------------------------------------------------------------------
#
# export variables
#
#-------------------------------------------------------------------

AC_SUBST(LIBS)
AC_SUBST(x_libraries)
AC_SUBST(x_includes)
AC_SUBST(fvwm_icons)
AC_SUBST(fvwm_name)
AC_SUBST(fvwm_rc)


#-------------------------------------------------------------------
#
# always build Makefiles in examples subdir
# so user can manually build programs when needed.
#
#-------------------------------------------------------------------

AC_OUTPUT(Makefile \
          fvwm/Makefile \
          icons/Makefile \
          libs/Makefile \
          mini-icons/Makefile \
          utils/Makefile \
          xpmroot/Makefile \
          sample.fvwmrc/Makefile \
          sample.fvwmrc/system.fvwm95rc \
          modules/Makefile \
          modules/FvwmAudio/Makefile \
          modules/FvwmAuto/Makefile \
          modules/FvwmBacker/Makefile \
          modules/FvwmBanner/Makefile \
          modules/FvwmButtons/Makefile \
          modules/FvwmConsole/Makefile \
          modules/FvwmCpp/Makefile \
          modules/FvwmDebug/Makefile \
          modules/FvwmForm/Makefile \
          modules/FvwmIconBox/Makefile \
          modules/FvwmIconMan/Makefile \
          modules/FvwmIdent/Makefile \
          modules/FvwmM4/Makefile \
          modules/FvwmPager/Makefile \
          modules/FvwmSave/Makefile \
          modules/FvwmSaveDesk/Makefile \
          modules/FvwmScript/Makefile \
          modules/FvwmScript/Widgets/Makefile \
          modules/FvwmScript/Scripts/Makefile \
          modules/FvwmScript/Scripts/some_nice_icons/Makefile \
          modules/FvwmScroll/Makefile \
          modules/FvwmTalk/Makefile \
          modules/FvwmTaskBar/Makefile \
          modules/FvwmWharf/Makefile \
          modules/FvwmWinList/Makefile)


#-------------------------------------------------------------------
#
# Hasta la vista!
#
#-------------------------------------------------------------------