File: configure.in

package info (click to toggle)
asmail 2.1-7
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,340 kB
  • sloc: ansic: 3,050; sh: 183; makefile: 93
file content (158 lines) | stat: -rw-r--r-- 4,134 bytes parent folder | download | duplicates (5)
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
dnl# -*- sh -*-
dnl# Process this file with autoconf to produce a configure script.
dnl#
dnl#Copyright (c) 1998 Juergen Sawinski <Juergen.Sawinski@urz.uni-heidelberg.de>
dnl#Copyright (c) 1997 1998 Guylhem AZNAR <guylhem@oeil.qc.ca>

AC_INIT(Makefile.in)
AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADER(config.h:autoconf/config.h.in)

version="asmail-2.1"

dnl# Setup command-line options

dnl# we need the standard prefixes defined early
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix="$prefix"
eval "bindir=$bindir"
eval "datadir=$datadir"
eval "mandir=$mandir"

dnl# directories
AC_ARG_WITH(gnustep_dir,	[  --with-gnustep-dir=DIR  GNUstep directory [~/GNUstep] ],with_gnustep_dir=$withval, with_gnustep_dir="~/GNUstep")
AC_ARG_WITH(gnustep_lib,	[  --with-gnustep-lib=DIR  GNUstep/Library directory [~/GNUstep/Library] ],with_gnustep_lib=$withval, with_gnustep_lib="~/GNUstep/Library")
AC_ARG_WITH(afterdir,		[  --with-afterdir=DIR     user AfterStep dir [~/GNUstep/Library/AfterStep] ],with_afterdir=$withval, with_afterdir="~/GNUstep/Library/AfterStep")
AC_ARG_ENABLE(shaping, 		[  --enable-shaping        support shaped
windows [yes] ],enable_shaping=$enableval,enable_shaping="yes")
AC_ARG_ENABLE(jpeg,  		[  --enable-jpeg           support JPEG
image format [yes] ],enable_jpeg=$enableval,enable_jpeg="yes")

dnl# Check for compiler tools

AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PATH_PROG(RM, rm, rm)
AC_PATH_PROG(MV, mv, mv)
AC_PATH_PROG(CP, cp, cp)
AC_PATH_PROG(MKDIR, mkdir, mkdir)
AC_PATH_PROG(STRIP, strip, strip)

dnl# Remove -g

if test -n '`echo "$CFLAGS " | grep "\-g " 2> /dev/null`' ; then
  CFLAGS=`echo "$CFLAGS " | sed "s/-g //"`
fi

dnl# Add -Wall

if test "x$GCC" = "xyes"; then
  if test -z '`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`' ; then
    CFLAGS="$CFLAGS -Wall"
  fi
fi

dnl# Check for headers

AC_PATH_XTRA
AC_CHECK_HEADERS(sys/wait.h sys/time.h)
AC_CHECK_HEADERS(sys/statvfs.h sys/vfs.h sys/mount.h ustat.h)
AC_CHECK_HEADERS(machine/soundcard.h linux/soundcard.h linux/radio.h)
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_HEADERS(openssl/ssl.h)
AC_CONFIG_HEADER(config.h)

dnl# Check for X

saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"

CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"

x_libs="$X_EXTRA_LIBS $X_PRE_LIBS"
AC_CHECK_LIB(X11, XOpenDisplay, [x_libs="-lX11 $x_libs"],,$x_libs)

dnl# Check for XPM library

VT_FIND_LIBXPM
HAVEXPM="NOXPM"
if test "x$have_xpm" = "xyes"; then
  HAVEXPM="XPM"
  x_libs="$x_libs $XPM_LIBS"
fi
for x in $X_CFLAGS; do
  XPM_CFLAGS=`echo " $XPM_CFLAGS " | sed "s@ $x @ @"`
done

dnl# Check for X shaped window extension

HAVESHAPE="NOSHAPE"
if test "x$enable_shaping" = "xyes"; then
  AC_CHECK_LIB(Xext, XShapeCombineMask, [x_libs="$x_libs -lXext" HAVESHAPE="SHAPE"],,$x_libs)
fi

CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"

dnl# Check for libjpeg

HAVEJPEG="NOJPEG"
if test "x$enable_jpeg" = "xyes"; then
  AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [JPEG_LIB="-ljpeg" HAVEJPEG="JPEG"],,)
fi

AC_CHECK_LIB(pthread, pthread_create, [PTHREAD_LIB="-lpthread" HAVEPTHREAD="PTHREAD"],,)

HAVESSL=""
AC_CHECK_LIB(ssl, SSL_CTX_new, [SSL_LIB="-lssl" HAVESSL="-lssl"],,)
MD5_OBJ=""
if test "x$HAVESSL" = "x"; then
	MD5_OBJ="md5c.o"
fi

dnl# Variable strings declaration

AC_SUBST(version)
AC_SUBST(with_locale)
AC_SUBST(HAVEXPM)
AC_SUBST(HAVESHAPE)
AC_SUBST(HAVEJPEG)
AC_SUBST(XPM_LIBS)
AC_SUBST(x_libs)
AC_SUBST(x_includes)
AC_SUBST(XEXT_LIB)
AC_SUBST(JPEG_LIB)
AC_SUBST(with_gnustep_dir)
AC_SUBST(with_gnustep_lib)
AC_SUBST(with_afterdir)
AC_SUBST(HAVESSL)
AC_SUBST(MD5_OBJ)

dnl# Write results

AC_CONFIG_HEADER(config.h)

dnl# Common parts of the Makefile
MAKEFILEDEFINES=./autoconf/Makefile.defines
MAKEFILECOMMON=./autoconf/Makefile.common
MAKEFILECOMMONLIB=./autoconf/Makefile.common.lib

AC_SUBST_FILE(MAKEFILEDEFINES)
AC_SUBST_FILE(MAKEFILECOMMON)
AC_SUBST_FILE(MAKEFILECOMMONLIB)

AC_OUTPUT(\
autoconf/Makefile.defines \
autoconf/Makefile.common \
autoconf/Makefile.common.lib \
Makefile
)

echo "


AfterStep applet $version is now hopefully configured, just run : 
make ; make install
"