-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathconfigure.in
171 lines (130 loc) · 3.68 KB
/
configure.in
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
AC_PREREQ(2.52)
AC_INIT(README)
AESKULAP_VERSION="0.2.2-beta1"
AC_SUBST(AESKULAP_VERSION)
dnl AC_CANONICAL_TARGET
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(aeskulap, $AESKULAP_VERSION)
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
case "$target" in
*cygwin* | *mingw32*)
MINGW32="yes"
;;
*)
MINGW32="no"
;;
esac
dnl
dnl Require programs
dnl
AC_PROG_INTLTOOL
AM_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
if test x"$MINGW32" = xno ; then
AM_BINRELOC
else
GMSGFMT=msgfmt
AC_SUBST(GMSGFMT)
fi
AM_GCONF_SOURCE_2
dnl
dnl gettext package
dnl
GETTEXT_PACKAGE=aeskulap
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`"
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
AM_GLIB_GNU_GETTEXT
dnl
dnl Required headers
dnl
AC_HEADER_STDC
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_HEADER_TIME
AC_CHECK_LIB(jpeg,jpeg_read_header)
AC_CHECK_LIB(tiff,TIFFClose)
AC_CHECK_LIB(png,png_create_read_struct)
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.6.0)
AC_SUBST(GTKMM_CFLAGS)
AC_SUBST(GTKMM_LIBS)
PKG_CHECK_MODULES(GLADEMM, libglademm-2.4 >= 2.6.0)
AC_SUBST(GLADEMM_CFLAGS)
AC_SUBST(GLADEMM_LIBS)
PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)
if test x"$MINGW32" = xno ; then
PKG_CHECK_MODULES(GCONFMM, gconfmm-2.6 >= 2.10.0)
AC_SUBST(GCONFMM_CFLAGS)
AC_SUBST(GCONFMM_LIBS)
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno ; then
AC_MSG_ERROR([gconftool2 executable not found in your path - should be
installed with GConf])
fi
fi
dnl AC_CONFIG_SUBDIRS(dcmtk)
if test x"$MINGW32" = xyes ; then
DCMTK_CFLAGS="-DHAVE_CONFIG_H -I\$(prefix)/include"
DCMTK_LIBS="-L\$(prefix)/lib -ldcmjpeg -lijg8 -lijg12 -lijg16 -ldcmimage -ldcmimgle -ldcmnet -ldcmdata -lofstd -lwsock32"
else
DCMJPEG_LIBS="-L../dcmtk/dcmjpeg/libijg8 -L../dcmtk/dcmjpeg/libijg12 -L../dcmtk/dcmjpeg/libijg16 -lijg8 -lijg12 -lijg16"
AC_SUBST(DCMJPEG_LIBS)
DCMTK_CFLAGS="-DHAVE_CONFIG_H -I\$(top_srcdir)/dcmtk/config/include -I\$(top_srcdir)/dcmtk/ofstd/include -I\$(top_srcdir)/dcmtk/dcmdata/include -I\$(top_srcdir)/dcmtk/dcmnet/include -I\$(top_srcdir)/dcmtk/dcmimage/include -I\$(top_srcdir)/dcmtk/dcmimgle/include -I\$(top_srcdir)/dcmtk/dcmjpeg/include"
DCMTK_LIBS="-L../dcmtk/ofstd/libsrc \
-L../dcmtk/dcmdata/libsrc \
-L../dcmtk/dcmnet/libsrc \
-L../dcmtk/dcmjpeg/libsrc \
-L../dcmtk/dcmimage/libsrc \
-L../dcmtk/dcmimgle/libsrc \
\$(DCMJPEG_LIBS) -ldcmjpeg -ldcmimage -ldcmimgle -ldcmnet -ldcmdata -lofstd -lrt -lpthread"
fi
AC_SUBST(DCMTK_CFLAGS)
AC_SUBST(DCMTK_LIBS)
dnl set PREFIX
if test "x${prefix}" = "xNONE"; then
packageprefix=${ac_default_prefix}
else
packageprefix=${prefix}
fi
DCMTK_SUBDIR=""
if test x"$MINGW32" = xno ; then
DCMTK_SUBDIR="dcmtk"
LDFLAGS_AESKULAP_LIBS="-Wl,-rpath,${prefix}/lib/aeskulap -avoid-version"
else
LDFLAGS_MINGW32="-mwindows"
LDFLAGS_AESKULAP_LIBS="-avoid-version -no-undefined"
fi
AC_SUBST(DCMTK_SUBDIR)
AC_SUBST(LDFLAGS_MINGW32)
AC_SUBST(LDFLAGS_AESKULAP_LIBS)
AM_CONDITIONAL(BUILD_NOT_MINGW32, test x$MINGW32 = xno)
AC_OUTPUT([
po/Makefile.in
Makefile
configuration/Makefile
imagepool/Makefile
src/Makefile
widgets/Makefile
pixmaps/Makefile
packaging/Makefile
packaging/autopackage/Makefile
packaging/autopackage/default.apspec
packaging/rpm/Makefile
packaging/rpm/aeskulap.spec
packaging/win32/Makefile
packaging/win32/aeskulap.iss
])
if test x"$MINGW32" = xno ; then
cd $srcdir/dcmtk
export CFLAGS="$CFLAGS"
export CXXFLAGS="$CXXFLAGS"
sh ./configure --without-openssl --without-zlib --without-libwrap --prefix=${prefix} --libdir=${prefix}/lib/aeskulap
fi