-
Notifications
You must be signed in to change notification settings - Fork 10
/
configure.ac
119 lines (98 loc) · 3.66 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([photoprint], [0.4.2-pre3], [[email protected]])
AC_CONFIG_AUX_DIR([scripts])
AC_CONFIG_SRCDIR([photoprint.cpp])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.9 foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_GNU_GETTEXT_VERSION([0.18.1])
AM_GNU_GETTEXT([external])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_CPP
# Are we building for Win32?
case $host_os in
*mingw32* ) echo "Configuring for mingw"; LIBS="-lwinspool $LIBS -mwindows" ;;
esac
# Checks for libraries.
AS_IF([test "x$with_ui" != xno],
[
PKG_CHECK_MODULES([GLIB2], [glib-2.0])
PKG_CHECK_MODULES([GTHREAD], [gthread-2.0])
PKG_CHECK_MODULES([GTK2], [gtk+-2.0],AC_DEFINE([HAVE_GTK],[1],[Use GTK+]))
PKG_CHECK_MODULES([GDKPIXBUF2], [gdk-pixbuf-2.0])
# Since the ProfileManager fetches an X atom from the server, we need to link with X11
# explicitly on some systems
PKG_CHECK_MODULES(X11, x11, [HAVE_X11=yes], [HAVE_X11=no])
])
PKG_CHECK_MODULES([GP], [gutenprint])
PKG_CHECK_MODULES([LCMS], [lcms])
AC_CHECK_LIB(m,pow, LIBM_LIBS="-lm")
AC_SUBST([LIBM_LIBS])
AC_CHECK_LIB([pnm], [pnm_readpaminit],,,[-lm])
AC_CHECK_LIB([netpbm], [pnm_readpaminit],,,[-lm])
# Some distributions have the pam.h header in a netpbm subfolder
AC_CHECK_HEADERS([netpbm/pam.h])
AC_CHECK_LIB([tiff], [TIFFOpen], [TIFF_LIBS="-ltiff"],
[unset ac_cv_lib_tiff_TIFFOpen
AC_CHECK_LIB([tiff], [TIFFOpen],[TIFF_LIBS="-ltiff"],
AC_CHECK_LIB([tiff3], [TIFFOpen],[TIFF_LIBS="-ltiff3"],
AC_MSG_FAILURE([libtiff or devel files not found])), [-lm])
])
AC_SUBST([TIFF_LIBS])
AC_CHECK_LIB([jpeg], [jpeg_read_header],,
AC_CHECK_LIB([jpeg62], [jpeg_read_header],JPEG_LIBS="-ljpeg62",AC_MSG_FAILURE([libjpeg or devel files not found])))
AC_SUBST([JPEG_LIBS])
AC_CHECK_LIB([pthread], [pthread_attr_init])
AC_CHECK_LIB([pthreadGC2], [pthread_attr_init],,)
AC_CHECK_LIB([gnugetopt], [getopt_long], [GETOPT_LIBS=-lgnugetopt])
AC_SUBST([GETOPT_LIBS])
AC_CHECK_LIB(socket,socket,
if test "$uname" != "IRIX"; then
LIBS="-lsocket $LIBS"
else
echo "Not using -lsocket since you are running IRIX."
fi)
AC_CHECK_LIB(nsl,gethostbyaddr,
if test "$uname" != "IRIX"; then
LIBS="-lnsl $LIBS"
else
echo "Not using -lnsl since you are running IRIX."
fi)
AC_CHECK_LIB(cups,httpConnect)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([memset mkdir strcasecmp strdup strncasecmp])
# Check for optional features
AC_ARG_ENABLE(prepress, AS_HELP_STRING([--enable-prepress],[Obscure, specialist and experimental features]))
AS_IF([test "x$enable_prepress" = "xyes"], [ AC_DEFINE([PREPRESS_TOOLS], [], [Obscure, specialist and experimental features]) ] )
AC_CONFIG_FILES([Makefile po/Makefile.in
library/imagesource/Makefile
library/imageutils/Makefile
library/miscwidgets/Makefile
library/layoutsupport/Makefile
library/support/Makefile
library/profilemanager/Makefile
library/pixbufthumbnail/Makefile
effects/Makefile
library/stpui_widgets/Makefile
library/stp_support/Makefile
library/gp_cppsupport/Makefile
splashscreen/Makefile
shortcuts/Makefile
borders/Makefile])
AC_OUTPUT