File: configure.in

package info (click to toggle)
licq 1.3.4-2etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 22,052 kB
  • ctags: 8,640
  • sloc: cpp: 76,924; sh: 9,845; ansic: 5,424; perl: 3,449; lex: 857; xml: 804; php: 691; makefile: 393; csh: 48
file content (192 lines) | stat: -rw-r--r-- 4,544 bytes parent folder | download | duplicates (2)
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/licqgui.h)
AC_CONFIG_AUX_DIR(admin)
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM

dnl All versioning is done via the following line
AM_INIT_AUTOMAKE(Licq-Qt-GUI, 1.3.4)
AM_CONFIG_HEADER(config.h)

dnl Chuck #defines for PACKAGE and VERSION into config.h
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(INT_VERSION,$INT_VERSION, [Qt-GUI version number as int])

dnl Also substitute PACKAGE and VERSION in the AC_OUTPUT files
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
LICQDAEMON_CXX_FLAGS
AC_PROG_INSTALL
dnl AC_PATH_PROG(PROG_STRIP,strip,:)
dnl AC_PATH_PROG(PROG_SIZE,size,:)

dnl Required for GPGME...
AC_SYS_LARGEFILE

dnl Set up some operating system specific options
case "$host" in
	*-*-openbsd*)
		CFLAGS="$CFLAGS -pthread"
		CPPFLAGS="$CPPFLAGS -D_REENTRANT"
		CXXFLAGS="$CXXFLAGS -pthread"
		echo "Setting OpenBSD compilation options"
		;;
	*-*-freebsd*)
		CFLAGS="$CFLAGS -pthread"
		CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
		CXXFLAGS="$CXXFLAGS -pthread"
		echo "Setting FreeBSD compilation options"
		;;
	*-*-solaris*)
		CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DPIC -fPIC"
		if test $GXX != yes; then
			LDFLAGS="$LDFLAGS -mimpure-text"
		fi
		echo "Setting Solaris compilation options"
		;;
	*-*-linux*)
 		CPPFLAGS="$CPPFLAGS -fPIC -DPIC -D_REENTRANT"
		echo "Setting Linux compilation options"
		;;
  *-*-aix*)
    CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
    LIBS="$LIBS -lc_r"
    echo "Setting AIX compilation options"
    ;;
  *-*-irix*)
    LDFLAGS="$LDFLAGS -L/usr/lib32"
    echo "Setting Irix compilation options"
    ;;
	*)
		echo "Licq may not compile on this system. Good luck :-)"
		;;
esac


dnl libtool stuff
AC_LIBTOOL_DLOPEN
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX
LIBTOOL="$LIBTOOL --silent"
dnl AC_SUBST(LIBTOOL)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(errno.h locale.h)
AC_HEADER_TIME
LICQ_SYS_ERRLIST
LICQ_CHECK_LICQ

dnl Check for X and extra X libs needed
AC_PATH_XTRA
if test "$no_x" = yes; then
  AC_MSG_ERROR(You need to have the X11 libraries and headers installed)
fi

dnl solaris has broken x11 headers, lets check for them
LICQ_CHECK_X11HEADERS

XSS_LIBS="no"
AC_CHECK_X_LIB(Xext, XScreenSaverRegister,[XSS_LIBS=""],[], [-lX11 -lXext -lm])
AC_CHECK_X_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="-lXss"],[],[-lX11 -lXext -lm])
if test \! "$XSS_LIBS" = "no"; then
  AC_CHECK_X_HEADER(X11/extensions/scrnsaver.h,[AC_DEFINE(USE_SCRNSAVER, 1, [use X screensaver support])])
else
  dnl Don't include the screensaver libs if we can't find the header.
  XSS_LIBS=""
fi
AC_SUBST(XSS_LIBS)

dnl Check for QT & KDE
AC_PATH_QT
AC_PATH_QT_INC

if test "$have_qt_inc" = "no"; then
  AC_MSG_ERROR([

I can't find the QT header files.

Install the QT development package, or if you have them installed, override
this check with the --with-qt-includes argument, and I'll take your word for
it.
])

fi

AC_PATH_KDE
AC_PATH_KDE_INCLUDES

AC_PATH_QT_LIB

if test "$have_qt_lib" = "no"; then
  AC_MSG_ERROR([

I can't find the QT libraries. It is recommended to set the QTDIR environment
variable.

Install the QT libraries, or if you have them installed, override this check
with the --with-qt-libraries argument, and I'll take your word for it.
])

fi

dnl Check for QT version
AC_CHECK_QT_SETUP

AC_PATH_QT_MOC
AC_PATH_QT_LUPDATE
AC_PATH_QT_LRELEASE

AC_PATH_KDE_LIBRARIES
AC_PATH_DCOP
AC_PATH_KDE_CONFIG
LICQ_CHECK_GPGME

dnl Switch to C++ mode and check for needed C++ headers
AC_LANG_SAVE
AC_LANG_CPLUSPLUS

AC_CHECK_HEADER(vector,,
  AC_MSG_ERROR(You need to have the libstdc++ headers installed))

AC_LANG_RESTORE

dnl Check for qinterlacestyle.h
LICQ_CHECK_QT_HEADER

dnl Checks for typedefs, structures, and compiler characteristics.
dnl AC_C_SOCKLEN_T

AC_OUTPUT(
  po/Makefile \
  src/Makefile \
  share/Makefile \
  Makefile)

echo ""
echo "Please remember to use GNU make, often installed as gmake."
echo ""
echo "Install prefix : $prefix"
echo "Licq Includes  : $LICQ_INCLUDES"
if test "$have_kde" = yes; then
  echo "KDE            : includes in $kde_includes, libs in $kde_libraries"
else
  echo "KDE            : disabled."
fi
echo "Qt includes    : $ac_cv_header_qtinc"
echo "Qt libraries   : $ac_qt_libdir, $ac_qt_libname"
echo "Qt moc         : $MOC"
if test "$WITH_GPGME" = yes; then
  echo "GPG            : enabled."
else
  echo "GPG            : disabled."
fi
echo ""