Lines 1-206
Link Here
|
1 |
dnl Process this file with autoconf to produce a configure script. |
1 |
dnl Process this file with autoconf to produce a configure script. |
2 |
AC_INIT(Tools/CmdLine/IccDumpProfile/iccDumpProfile.cpp) |
2 |
AC_INIT(Tools/CmdLine/IccDumpProfile/iccDumpProfile.cpp) |
3 |
|
3 |
|
4 |
dnl Checks for target |
4 |
dnl Checks for target |
5 |
AC_CANONICAL_TARGET |
5 |
AC_CANONICAL_TARGET |
6 |
|
6 |
|
7 |
SAMPLEICC_MAJOR_VERSION=1 |
7 |
SAMPLEICC_MAJOR_VERSION=1 |
8 |
SAMPLEICC_MINOR_VERSION=3 |
8 |
SAMPLEICC_MINOR_VERSION=3 |
9 |
SAMPLEICC_MICRO_VERSION=0 |
9 |
SAMPLEICC_MICRO_VERSION=0 |
10 |
|
10 |
|
11 |
SAMPLEICC_VERSION=$SAMPLEICC_MAJOR_VERSION.$SAMPLEICC_MINOR_VERSION.${SAMPLEICC_MICRO_VERSION} |
11 |
SAMPLEICC_VERSION=$SAMPLEICC_MAJOR_VERSION.$SAMPLEICC_MINOR_VERSION.${SAMPLEICC_MICRO_VERSION} |
12 |
AC_SUBST(SAMPLEICC_VERSION) |
12 |
AC_SUBST(SAMPLEICC_VERSION) |
13 |
|
13 |
|
14 |
LIBTOOL_CURRENT=2 |
14 |
LIBTOOL_CURRENT=2 |
15 |
LIBTOOL_REVISION=3 |
15 |
LIBTOOL_REVISION=3 |
16 |
LIBTOOL_AGE=0 |
16 |
LIBTOOL_AGE=0 |
17 |
LIBTOOL_VERSION=$LIBTOOL_CURRENT:$LIBTOOL_REVISION:$LIBTOOL_AGE |
17 |
LIBTOOL_VERSION=$LIBTOOL_CURRENT:$LIBTOOL_REVISION:$LIBTOOL_AGE |
18 |
AC_SUBST(LIBTOOL_VERSION) |
18 |
AC_SUBST(LIBTOOL_VERSION) |
19 |
|
19 |
|
20 |
dnl GNU automake support. |
20 |
dnl GNU automake support. |
21 |
AM_INIT_AUTOMAKE(SampleICC, ${SAMPLEICC_VERSION}) |
21 |
AM_INIT_AUTOMAKE(SampleICC, ${SAMPLEICC_VERSION}) |
22 |
AM_MAINTAINER_MODE |
22 |
AM_MAINTAINER_MODE |
23 |
|
23 |
|
24 |
dnl Checks for programs. |
24 |
dnl Checks for programs. |
25 |
AC_PROG_CXX |
25 |
AC_PROG_CXX |
26 |
AC_PROG_INSTALL |
26 |
AC_PROG_INSTALL |
27 |
AC_PROG_CC |
27 |
AC_PROG_CC |
28 |
AC_PROG_LN_S |
28 |
AC_PROG_LN_S |
29 |
AM_PROG_LIBTOOL |
29 |
AM_PROG_LIBTOOL |
30 |
AC_PROG_MAKE_SET |
30 |
AC_PROG_MAKE_SET |
31 |
|
31 |
|
32 |
dnl Checks for libraries. |
32 |
dnl Checks for libraries. |
33 |
|
33 |
|
34 |
dnl Checks for header files. |
34 |
dnl Checks for header files. |
35 |
AC_HEADER_STDC |
35 |
AC_HEADER_STDC |
36 |
AC_CHECK_HEADERS(limits.h unistd.h) |
36 |
AC_CHECK_HEADERS(limits.h unistd.h) |
37 |
|
37 |
|
38 |
dnl Checks for typedefs, structures, and compiler characteristics. |
38 |
dnl Checks for typedefs, structures, and compiler characteristics. |
39 |
AC_C_CONST |
39 |
AC_C_CONST |
40 |
AC_C_INLINE |
40 |
AC_C_INLINE |
41 |
AC_TYPE_SIZE_T |
41 |
AC_TYPE_SIZE_T |
42 |
|
42 |
|
43 |
dnl Checks for library functions. |
43 |
dnl Checks for library functions. |
44 |
AC_CHECK_FUNCS(strerror) |
44 |
AC_CHECK_FUNCS(strerror) |
45 |
|
45 |
|
46 |
dnl Checks for libtiff. |
46 |
dnl Checks for libtiff. |
47 |
dnl Basically a cut-and-paste of ab_lib_id3.m4 from Oskar Liljeblad |
47 |
dnl Basically a cut-and-paste of ab_lib_id3.m4 from Oskar Liljeblad |
48 |
dnl (oskar@osk.mine.nu) as published in the autoconf archive, downloadable |
48 |
dnl (oskar@osk.mine.nu) as published in the autoconf archive, downloadable |
49 |
dnl at http://autoconf-archive.cryp.to/ac_lib_id3.m4. |
49 |
dnl at http://autoconf-archive.cryp.to/ac_lib_id3.m4. |
50 |
dnl |
50 |
dnl |
51 |
dnl This macro will check for the existence of libtiff |
51 |
dnl This macro will check for the existence of libtiff |
52 |
dnl (http://www.libtiff.org/). It does this by checking for the |
52 |
dnl (http://www.libtiff.org/). It does this by checking for the |
53 |
dnl header file tiff.h and the TIFF library object file. A --with-tifflib |
53 |
dnl header file tiff.h and the TIFF library object file. A --with-tifflib |
54 |
dnl option is supported as well. The following output variables are set |
54 |
dnl option is supported as well. The following output variables are set |
55 |
dnl with AC_SUBST: |
55 |
dnl with AC_SUBST: |
56 |
dnl |
56 |
dnl |
57 |
dnl TIFF_CPPFLAGS |
57 |
dnl TIFF_CPPFLAGS |
58 |
dnl TIFF_LDFLAGS |
58 |
dnl TIFF_LDFLAGS |
59 |
dnl TIFF_LIBS |
59 |
dnl TIFF_LIBS |
60 |
dnl |
60 |
dnl |
61 |
dnl You can use them like this in Makefile.am: |
61 |
dnl You can use them like this in Makefile.am: |
62 |
dnl |
62 |
dnl |
63 |
dnl AM_CPPFLAGS = $(TIFF_CPPFLAGS) |
63 |
dnl AM_CPPFLAGS = $(TIFF_CPPFLAGS) |
64 |
dnl AM_LDFLAGS = $(TIFF_LDFLAGS) |
64 |
dnl AM_LDFLAGS = $(TIFF_LDFLAGS) |
65 |
dnl program_LDADD = $(TIFF_LIBS) |
65 |
dnl program_LDADD = $(TIFF_LIBS) |
66 |
dnl |
66 |
dnl |
67 |
dnl Additionally, the C preprocessor symbol HAVE_TIFFLIB will be defined |
67 |
dnl Additionally, the C preprocessor symbol HAVE_TIFFLIB will be defined |
68 |
dnl with AC_DEFINE if libtiff is available. |
68 |
dnl with AC_DEFINE if libtiff is available. |
69 |
|
69 |
|
70 |
AC_DEFUN([AC_LIB_TIFF], [ |
70 |
AC_DEFUN([AC_LIB_TIFF], [ |
71 |
AH_TEMPLATE([HAVE_TIFFLIB], [Define if libtiff is available]) |
71 |
AH_TEMPLATE([HAVE_TIFFLIB], [Define if libtiff is available]) |
72 |
AC_ARG_WITH(tifflib, [ --with-tifflib=DIR prefix for TIFF library files and headers], [ |
72 |
AC_ARG_WITH(tifflib, [ --with-tifflib=DIR prefix for TIFF library files and headers], [ |
73 |
if test x"$withval" = "xno"; then |
73 |
if test x"$withval" = "xno"; then |
74 |
ac_tiff_path= |
74 |
ac_tiff_path= |
75 |
$2 |
75 |
$2 |
76 |
elif test x"$withval" = x"yes"; then |
76 |
elif test x"$withval" = x"yes"; then |
77 |
ac_tiff_path=/opt/local |
77 |
ac_tiff_path=/opt/local |
78 |
else |
78 |
else |
79 |
ac_tiff_path="$withval" |
79 |
ac_tiff_path="$withval" |
80 |
fi |
80 |
fi |
81 |
],[ac_tiff_path=/opt/local]) |
81 |
],[ac_tiff_path=/opt/local]) |
82 |
if test x"$ac_tiff_path" != "x"; then |
82 |
if test x"$ac_tiff_path" != "x"; then |
83 |
saved_CPPFLAGS="$CPPFLAGS" |
83 |
saved_CPPFLAGS="$CPPFLAGS" |
84 |
CPPFLAGS="$CPPFLAGS -I$ac_tiff_path/include" |
84 |
CPPFLAGS="$CPPFLAGS -I$ac_tiff_path/include" |
85 |
AC_CHECK_HEADER([tiff.h], [ |
85 |
AC_CHECK_HEADER([tiff.h], [ |
86 |
saved_LDFLAGS="$LDFLAGS" |
86 |
saved_LDFLAGS="$LDFLAGS" |
87 |
LDFLAGS="$LDFLAGS -L$ac_tiff_path/lib" |
87 |
LDFLAGS="$LDFLAGS -L$ac_tiff_path/lib" |
88 |
AC_CHECK_LIB(tiff, TIFFOpen, [ |
88 |
AC_CHECK_LIB(tiff, TIFFOpen, [ |
89 |
AC_SUBST(TIFF_CPPFLAGS, [-I$ac_tiff_path/include]) |
89 |
AC_SUBST(TIFF_CPPFLAGS, [-I$ac_tiff_path/include]) |
90 |
AC_SUBST(TIFF_LDFLAGS, [-L$ac_tiff_path/lib]) |
90 |
AC_SUBST(TIFF_LDFLAGS, [-L$ac_tiff_path/lib]) |
91 |
AC_SUBST(TIFF_LIBS, [-ltiff]) |
91 |
AC_SUBST(TIFF_LIBS, [-ltiff]) |
92 |
AC_SUBST(SICC_ICC_APPLY_PROFILES, [IccApplyProfiles]) |
92 |
AC_SUBST(SICC_ICC_APPLY_PROFILES, [IccApplyProfiles]) |
93 |
AC_DEFINE([HAVE_TIFFLIB]) |
93 |
AC_DEFINE([HAVE_TIFFLIB]) |
94 |
$1 |
94 |
$1 |
95 |
], [AC_MSG_WARN([ |
95 |
], [AC_MSG_WARN([ |
96 |
*** SampleICC requires a recent version of libtiff (3.6.1 or newer), which |
96 |
*** SampleICC requires a recent version of libtiff (3.6.1 or newer), which |
97 |
*** you don't appear to have, if it is to create the iccApplyProfiles |
97 |
*** you don't appear to have, if it is to create the iccApplyProfiles |
98 |
*** command-line executable. |
98 |
*** command-line executable. |
99 |
*** |
99 |
*** |
100 |
*** Interestingly, you have a tiff.h header, but the run-time linker is not |
100 |
*** Interestingly, you have a tiff.h header, but the run-time linker is not |
101 |
*** finding libtiff, or it is finding the wrong version, or there is some other |
101 |
*** finding libtiff, or it is finding the wrong version, or there is some other |
102 |
*** problem trying a test link against libtiff. |
102 |
*** problem trying a test link against libtiff. |
103 |
*** |
103 |
*** |
104 |
*** If you believe you have the TIFF headers and libraries, but they are not |
104 |
*** If you believe you have the TIFF headers and libraries, but they are not |
105 |
*** in the standard locations (e.g. /usr/include or /opt/local/include) then |
105 |
*** in the standard locations (e.g. /usr/include or /opt/local/include) then |
106 |
*** supply the root of this hierarchy to configure with --with-tifflib. For |
106 |
*** supply the root of this hierarchy to configure with --with-tifflib. For |
107 |
*** example if you keep the headers in /usr/people/fred/include and the libraries |
107 |
*** example if you keep the headers in /usr/people/fred/include and the libraries |
108 |
*** in /usr/people/fred/lib, then specify --with-tifflib=/usr/people/fred. |
108 |
*** in /usr/people/fred/lib, then specify --with-tifflib=/usr/people/fred. |
109 |
*** |
109 |
*** |
110 |
*** On some systems, you'll need |
110 |
*** On some systems, you'll need |
111 |
*** to set your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf |
111 |
*** to set your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf |
112 |
*** to point to the proper version. Also, make sure you have run ldconfig if |
112 |
*** to point to the proper version. Also, make sure you have run ldconfig if |
113 |
*** that is required on your system. |
113 |
*** that is required on your system. |
114 |
*** |
114 |
*** |
115 |
*** In the meantime, the generated hierarchy of Makefiles will not attempt to |
115 |
*** In the meantime, the generated hierarchy of Makefiles will not attempt to |
116 |
*** build an iccApplyProfiles command-line executable, but everything else |
116 |
*** build an iccApplyProfiles command-line executable, but everything else |
117 |
*** (the SampleICC library and the other command-line executables) will be built. |
117 |
*** (the SampleICC library and the other command-line executables) will be built. |
118 |
]) |
118 |
]) |
119 |
AC_SUBST(SICC_ICC_APPLY_PROFILES, [])], |
119 |
AC_SUBST(SICC_ICC_APPLY_PROFILES, [])], |
120 |
-lm) |
120 |
-lm) |
121 |
LDFLAGS="$saved_LDFLAGS" |
121 |
LDFLAGS="$saved_LDFLAGS" |
122 |
], [ |
122 |
], [ |
123 |
AC_MSG_WARN([ |
123 |
AC_MSG_WARN([ |
124 |
*** SampleICC requires the header files and libraries for a recent version of |
124 |
*** SampleICC requires the header files and libraries for a recent version of |
125 |
*** the TIFF libraries (libtiff 3.6.1 or newer), if it is to create the |
125 |
*** the TIFF libraries (libtiff 3.6.1 or newer), if it is to create the |
126 |
*** iccApplyProfiles command-line executable after it compiles the SampleICC |
126 |
*** iccApplyProfiles command-line executable after it compiles the SampleICC |
127 |
*** library and the other command-line executables. |
127 |
*** library and the other command-line executables. |
128 |
*** |
128 |
*** |
129 |
*** You don't have the expected tiff.h header, so the link-time check for |
129 |
*** You don't have the expected tiff.h header, so the link-time check for |
130 |
*** a static or dynamic TIFF library was skipped. |
130 |
*** a static or dynamic TIFF library was skipped. |
131 |
*** |
131 |
*** |
132 |
*** If you believe you have the TIFF headers and libraries, but they are not |
132 |
*** If you believe you have the TIFF headers and libraries, but they are not |
133 |
*** in the standard locations (e.g. /usr/include or /opt/local/include) then |
133 |
*** in the standard locations (e.g. /usr/include or /opt/local/include) then |
134 |
*** supply the root of this hierarchy to configure with --with-tifflib. For |
134 |
*** supply the root of this hierarchy to configure with --with-tifflib. For |
135 |
*** example if you keep the headers in /usr/people/fred/include and the libraries |
135 |
*** example if you keep the headers in /usr/people/fred/include and the libraries |
136 |
*** in /usr/people/fred/lib, then specify --with-tifflib=/usr/people/fred. |
136 |
*** in /usr/people/fred/lib, then specify --with-tifflib=/usr/people/fred. |
137 |
*** |
137 |
*** |
138 |
*** In the meantime, the generated hierarchy of Makefiles will not attempt to |
138 |
*** In the meantime, the generated hierarchy of Makefiles will not attempt to |
139 |
*** build an iccApplyProfiles executable, but everything else will be built. |
139 |
*** build an iccApplyProfiles executable, but everything else will be built. |
140 |
]) |
140 |
]) |
141 |
AC_SUBST(SICC_ICC_APPLY_PROFILES, []) |
141 |
AC_SUBST(SICC_ICC_APPLY_PROFILES, []) |
142 |
]) |
142 |
]) |
143 |
CPPFLAGS="$saved_CPPFLAGS" |
143 |
CPPFLAGS="$saved_CPPFLAGS" |
144 |
fi |
144 |
fi |
145 |
]) |
145 |
]) |
146 |
|
146 |
|
147 |
AC_LIB_TIFF |
147 |
AC_LIB_TIFF |
148 |
|
148 |
|
149 |
dnl Platform-specific stuff |
149 |
dnl Platform-specific stuff |
150 |
case "$host" in |
150 |
case "$host" in |
151 |
*irix*) |
151 |
*irix*) |
152 |
AC_DEFINE(PLATFORM_IRIX) |
152 |
AC_DEFINE(PLATFORM_IRIX) |
153 |
;; |
153 |
;; |
154 |
*solaris*) |
154 |
*solaris*) |
155 |
AC_DEFINE(PLATFORM_SUNOS5) |
155 |
AC_DEFINE(PLATFORM_SUNOS5) |
156 |
;; |
156 |
;; |
157 |
*osf*) |
157 |
*osf*) |
158 |
AC_DEFINE(PLATFORM_OSF1) |
158 |
AC_DEFINE(PLATFORM_OSF1) |
159 |
;; |
159 |
;; |
160 |
*darwin*) |
160 |
*darwin*) |
161 |
AC_DEFINE(PLATFORM_DARWIN_PPC) |
161 |
AC_DEFINE(PLATFORM_DARWIN_PPC) |
162 |
;; |
162 |
;; |
163 |
esac |
163 |
esac |
164 |
|
164 |
|
165 |
dnl Processor-specific optimizations |
165 |
dnl Processor-specific optimizations |
166 |
AC_MSG_CHECKING(for processor-specific optimizations) |
166 |
AC_MSG_CHECKING(for processor-specific optimizations) |
167 |
case $target_cpu in |
167 |
case $target_cpu in |
168 |
i686) EXTRA_CPU_CFLAGS=$(if $CC -march=i686 -S -o /dev/null -xc /dev/null > /dev/null; then echo "-march=i686"; fi) ;; |
168 |
i686) EXTRA_CPU_CFLAGS=$(if $CC -march=i686 -S -o /dev/null -xc /dev/null > /dev/null; then echo "-march=i686"; fi) ;; |
169 |
*athlon*) EXTRA_CPU_CFLAGS=$(if $CC -march=i686 -S -o /dev/null -xc /dev/null > /dev/null; then echo "-march=i686"; fi) ;; |
169 |
*athlon*) EXTRA_CPU_CFLAGS=$(if $CC -march=i686 -S -o /dev/null -xc /dev/null > /dev/null; then echo "-march=i686"; fi) ;; |
170 |
esac |
170 |
esac |
171 |
AC_MSG_RESULT([$EXTRA_CPU_CFLAGS]) |
171 |
AC_MSG_RESULT([$EXTRA_CPU_CFLAGS]) |
172 |
|
172 |
|
173 |
AM_CFLAGS="$EXTRA_OPT_CFLAGS $EXTRA_CPU_CFLAGS" |
173 |
AM_CFLAGS="$EXTRA_OPT_CFLAGS $EXTRA_CPU_CFLAGS" |
174 |
AM_CXXFLAGS="$EXTRA_OPT_CFLAGS $EXTRA_CPU_CFLAGS" |
174 |
AM_CXXFLAGS="$EXTRA_OPT_CFLAGS $EXTRA_CPU_CFLAGS" |
175 |
|
175 |
|
176 |
AC_SUBST(AM_CFLAGS) |
176 |
AC_SUBST(AM_CFLAGS) |
177 |
AC_SUBST(AM_CXXFLAGS) |
177 |
AC_SUBST(AM_CXXFLAGS) |
178 |
|
178 |
|
179 |
AC_OUTPUT([ |
179 |
AC_OUTPUT([ |
180 |
Makefile |
180 |
Makefile |
181 |
IccProfLib/Makefile |
181 |
IccProfLib/Makefile |
182 |
Tools/Makefile |
182 |
Tools/Makefile |
183 |
Tools/CmdLine/Makefile |
183 |
Tools/CmdLine/Makefile |
184 |
Tools/CmdLine/IccApplyNamedCmm/Makefile |
184 |
Tools/CmdLine/IccApplyNamedCmm/Makefile |
185 |
Tools/CmdLine/IccApplyProfiles/Makefile |
185 |
Tools/CmdLine/IccApplyProfiles/Makefile |
186 |
Tools/CmdLine/IccDumpProfile/Makefile |
186 |
Tools/CmdLine/IccDumpProfile/Makefile |
187 |
Tools/CmdLine/IccProfLibTest/Makefile |
187 |
Tools/CmdLine/IccProfLibTest/Makefile |
188 |
Tools/CmdLine/IccStripUnknownTags/Makefile |
188 |
Tools/CmdLine/IccStripUnknownTags/Makefile |
189 |
Tools/CmdLine/IccV4ToMPE/Makefile |
189 |
Tools/CmdLine/IccV4ToMPE/Makefile |
190 |
Contrib/Makefile |
190 |
Contrib/Makefile |
191 |
Contrib/CmdLine/Makefile |
191 |
Contrib/CmdLine/Makefile |
192 |
Contrib/CmdLine/create_CLUT_profile/Makefile |
192 |
Contrib/CmdLine/create_CLUT_profile/Makefile |
193 |
Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile |
193 |
Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile |
194 |
Contrib/CmdLine/create_display_profile/Makefile |
194 |
Contrib/CmdLine/create_display_profile/Makefile |
195 |
Contrib/ICC_utils/Makefile |
195 |
Contrib/ICC_utils/Makefile |
196 |
Contrib/Mac_OS_X/Makefile |
196 |
Contrib/Mac_OS_X/Makefile |
197 |
Contrib/Mac_OS_X/create_probe/Makefile |
197 |
Contrib/Mac_OS_X/create_probe/Makefile |
198 |
Contrib/Mac_OS_X/extract_probe_data/Makefile |
198 |
Contrib/Mac_OS_X/extract_probe_data/Makefile |
199 |
Contrib/examples/Makefile |
199 |
Contrib/examples/Makefile |
200 |
Contrib/examples/RSR/Makefile |
200 |
Contrib/examples/RSR/Makefile |
201 |
Contrib/tests/Makefile |
201 |
Contrib/tests/Makefile |
202 |
Contrib/tests/flatten_AToB_tag/Makefile |
202 |
Contrib/tests/flatten_AToB_tag/Makefile |
203 |
Contrib/tests/generate_device_codes/Makefile |
203 |
Contrib/tests/generate_device_codes/Makefile |
204 |
Contrib/tests/reconstruct_measurements/Makefile |
204 |
Contrib/tests/reconstruct_measurements/Makefile |
205 |
Contrib/tests/round_trip_PCS_LAB/Makefile |
205 |
Contrib/tests/round_trip_PCS_LAB/Makefile |
206 |
]) |
206 |
]) |