1dnl Process this file with autoreconf to produce a configure script. 2AC_PREREQ(2.62) 3 4dnl NOTE: Be version style _higher_ than the last release. 5dnl So lastversion.X.trunk for instance. Bump X if necessary. 6 7dnl ******* THE NEXT RELEASE VERSION MUST BE 2.5.26 at least or higher! 8AC_INIT([libgphoto2 photo camera library], [2.5.26], [gphoto-devel@lists.sourceforge.net], [libgphoto2]) 9 10AC_CONFIG_SRCDIR([libgphoto2/gphoto2-version.c]) 11AC_CONFIG_HEADERS([config.h]) 12AC_CONFIG_MACRO_DIR([auto-m4]) 13AC_CONFIG_AUX_DIR([auto-aux]) 14dnl Working around bug in automake <= 1.9.6: 15dnl - Please do not add filename-length-max=99 here. 16dnl - Otherwise "make distdir" will fail in gphoto-suite 17dnl The generated Makefile rule fails to remove the absolute part at 18dnl the beginning of the /path/to/buildroot/PACKAGE-VERSION/foo/bar 19dnl before determining the string length. However, the only relevant 20dnl string to determine the length of would be PACKAGE-VERSION/foo/bar 21AM_INIT_AUTOMAKE([-Wall foreign 1.9 dist-bzip2 check-news subdir-objects]) 22 23 24# Use the silent-rules feature when possible. 25m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) 26AM_SILENT_RULES([no]) 27 28GP_CHECK_SHELL_ENVIRONMENT 29GP_CONFIG_MSG([Build]) 30GP_CONFIG_MSG([Source code location],[${srcdir}]) 31 32dnl --------------------------------------------------------------------------- 33dnl Advanced information about versioning: 34dnl * "Writing shared libraries" by Mike Hearn 35dnl http://navi.cx/~mike/writing-shared-libraries.html 36dnl * libtool.info chapter "Versioning" 37dnl * libtool.info chapter "Updating library version information" 38dnl --------------------------------------------------------------------------- 39dnl Versioning: 40dnl - AGE (Micro): Increment if any interfaces have been added; set to 0 41dnl if any interfaces have been removed. Removal has 42dnl precedence over adding, so set to 0 if both happened. 43dnl It denotes upward compatibility. 44dnl - REVISION (Minor): Increment any time the source changes; set to 45dnl 0 if you incremented CURRENT. 46dnl - CURRENT (Major): Increment if the interface has changes. AGE is always 47dnl *changed* at the same time. 48dnl 49dnl To summarize. Any interface *change* increment CURRENT. If that interface 50dnl change does not break upward compatibility (ie it is an addition), 51dnl increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed, 52dnl REVISION is set to 0, otherwise REVISION is incremented. 53dnl --------------------------------------------------------------------------- 54dnl A:R:C=1:1:3 libgphoto2-2.2 55dnl A:R:C=2:0:4 libgphoto2-2.3 (since libgphoto2-2.2.1.5.trunk) 56dnl A:R:C=2:1:4 libgphoto2-2.3.1 (since libgphoto2-2.3.0.1.trunk) 57dnl A:R:C=3:0:5 libgphoto2-2.3.0.3.trunk (new gp_file_new_from_fd() function) 58dnl libgphoto2-2.3.1.1.trunk (new gp_file_slurp() function) 59dnl libgphoto2-2.3.1.2.trunk (new gp_camera_get_storageinfo() function + enums + struct) 60dnl A:R:C=0:0:6 libgphoto2-2.5.0 (fixed CameraList API, ... ) 61AC_SUBST([LIBGPHOTO2_AGE], [1]) 62AC_SUBST([LIBGPHOTO2_REVISION], [0]) 63AC_SUBST([LIBGPHOTO2_CURRENT], [7]) 64AC_SUBST([LIBGPHOTO2_CURRENT_MIN], 65 [`expr $LIBGPHOTO2_CURRENT - $LIBGPHOTO2_AGE`]) 66AC_SUBST([LIBGPHOTO2_VERSION_INFO], 67 [$LIBGPHOTO2_CURRENT:$LIBGPHOTO2_REVISION:$LIBGPHOTO2_AGE]) 68 69 70dnl --------------------------------------------------------------------------- 71dnl Checks for programs. 72dnl --------------------------------------------------------------------------- 73 74AC_MSG_CHECKING([original CC value]) 75AC_MSG_RESULT(["$CC"]) 76AC_MSG_CHECKING([original CXX value]) 77AC_MSG_RESULT(["$CXX"]) 78 79AC_PROG_CC 80AC_PROG_CPP 81AC_PROG_CXX 82AC_PROG_INSTALL 83AM_PROG_CC_C_O 84m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) 85 86dnl Something with the sequences is not quite alright yet. 87dnl SED is supposed to be set in AC_LIBTOOL_SETUP, but the 88dnl sequence seems to get mixed up. 89SED=${SED-sed} 90 91 92dnl If CXX is neither unset nor empty nor "no", presume we can compile 93dnl C++ sources. A C++ compiler is not required for libgphoto2 itself, 94dnl but is useful to make sure that the libgphoto2 header files 95dnl compile when included into C++ source files. 96AM_CONDITIONAL([HAVE_CXX], [test "x$CXX" != "x" && test "x$CXX" != "xno"]) 97 98 99dnl -------------------------------------------------------------------- 100dnl Determine the most pedantic compiler flags we can find for both 101dnl C and C++, so that we can test that the libgphoto2 headers compile 102dnl with those flags. 103dnl -------------------------------------------------------------------- 104GP_PEDANTIC_COMPILER_FLAGS([C90], [C], [-std=c90]) 105GP_PEDANTIC_COMPILER_FLAGS([C99], [C], [-std=c99]) 106GP_PEDANTIC_COMPILER_FLAGS([C11], [C], [-std=c11]) 107dnl 108GP_PEDANTIC_COMPILER_FLAGS([CXX98], [C++], [-std=c++98]) 109GP_PEDANTIC_COMPILER_FLAGS([CXX11], [C++], [-std=c++11]) 110GP_PEDANTIC_COMPILER_FLAGS([CXX14], [C++], [-std=c++14]) 111GP_PEDANTIC_COMPILER_FLAGS([CXX17], [C++], [-std=c++17]) 112 113GP_CONDITIONAL_COMPILE_FLAGS([CFLAGS],[-Wall]) 114GP_CONDITIONAL_COMPILE_FLAGS([CFLAGS],[-Wextra]) 115GP_CONDITIONAL_COMPILE_FLAGS([CFLAGS],[-Wno-unused-parameter]) 116GP_CONDITIONAL_COMPILE_FLAGS([CFLAGS],[-Wno-format-overflow]) 117GP_CONDITIONAL_COMPILE_FLAGS([CFLAGS],[-Wno-format-truncation]) 118GP_CONDITIONAL_COMPILE_FLAGS([CFLAGS],[-Wno-stringop-truncation]) 119 120dnl Every compile example after here will be using the C language 121AC_LANG([C]) 122 123 124dnl --------------------------------------------------------------------------- 125dnl Turn on (almost) all warnings when using gcc 126dnl --------------------------------------------------------------------------- 127if test "x$GCC" = "xyes"; then 128 # CFLAGS="$CFLAGS --std=c99 -Wall -Wextra -Werror -pedantic" 129 CFLAGS="$CFLAGS -Wall -Wmissing-declarations -Wmissing-prototypes" 130 LDFLAGS="$LDFLAGS" 131 AC_SUBST([NO_UNUSED_CFLAGS], [-Wno-unused]) 132fi 133AM_CONDITIONAL([HAVE_GCC], [test "x$GCC" = "xyes"]) 134 135# Activate internal code 136AM_CPPFLAGS="$AM_CPPFLAGS -D_GPHOTO2_INTERNAL_CODE" 137 138# CPPFLAGS: C PreProcessor flags 139AC_SUBST([AM_CPPFLAGS]) 140# CFLAGS: C compiler flags 141AC_SUBST([AM_CFLAGS]) 142# CXXFLAGS: C++ compiler flags 143AC_SUBST([AM_CXXFLAGS]) 144# LDFLAGS: Linker flags 145AC_SUBST([AM_LDFLAGS]) 146 147# Check for va_copy() 148GP_VA_COPY 149 150# Note: Do NOT add specific libraries and stuff to the generic _FLAGS. 151# Put these into LIBFOO_CFLAGS and LIBFOO_LIBS instead. 152 153 154try_gp2ddb=false 155msg_gp2ddb="" 156gp_msg_dp2ddb="no" 157 158AC_ARG_ENABLE([gp2ddb], 159[AS_HELP_STRING([--enable-gp2ddb], 160 [enable EXPERIMENTAL PRE-ALPHA gphoto2 device database code])],[ 161 if test "x$enableval" = "xyes"; then 162 try_gp2ddb=true 163 msg_dp2ddb="(--enable-gp2ddb detected)" 164 elif test "x$enableval" = "xno"; then 165 try_gp2ddb=false 166 msg_dp2ddb="(--disable-gp2ddb detected)" 167 fi 168]) 169 170AC_PATH_PROG([FLEX], [flex]) 171AC_SUBST([FLEX]) 172AC_PATH_PROG([BISON], [bison]) 173AC_SUBST([BISON]) 174 175AC_MSG_CHECKING([whether to enable GP2DDB]) 176if "$try_gp2ddb"; then 177 if test -x "$FLEX" && test -x "$BISON"; then 178 gp_msg_dp2ddb="yes $msg_dp2ddb" 179 else 180 AC_MSG_ERROR([Fatal: GP2DDB support requires flex and bison! 181 182Aborting configuration. 183 184Install flex and bison into your PATH or run configure with --disable-gp2ddb 185to disable GP2DDB support. 186]) 187 fi 188else 189 gp_msg_dp2ddb="no $msg_dp2ddb" 190fi 191AC_MSG_RESULT([${gp_msg_gp2ddb}]) 192 193AM_CONDITIONAL([ENABLED_GP2DDB], ["$try_gp2ddb" && test -x "$FLEX" && test -x "$BISON"]) 194 195if "$try_gp2ddb" && test -x "$FLEX" && test -x "$BISON"; then 196 gp_msg_gp2ddb="yes $msg_gp2ddb" 197 AC_DEFINE([ENABLED_GP2DDB], [1], [Whether we have flex and bison for GP2DDB]) 198else 199 gp_msg_gp2ddb="no $msg_gp2ddb" 200fi 201GP_CONFIG_MSG([GP2DDB support], [${gp_msg_gp2ddb} (EXPERIMENTAL)]) 202 203dnl check for/set up libtool and libltdl 204dnl AC_DISABLE_STATIC 205dnl AC_DISABLE_SHARED 206dnl AC_LIBLTDL_CONVENIENCE([libltdl]) 207dnl AC_WITH_LTDL 208dnl AC_LIB_LTDL 209AC_DISABLE_STATIC 210AC_LIBTOOL_WIN32_DLL 211AC_LIBTOOL_DLOPEN 212AC_PROG_LIBTOOL 213 214dnl We are using our own libltdl checks instead of AC_WITH_LTDL 215dnl because we do not want to ship our own copy of libltdl any more. 216dnl Not shipping libltdl makes it possible to ditch our own autogen.sh 217dnl and relying on standard autoconf's "autoreconf". 218GP_LIB_LTDL 219 220 221# report on compiler/libtool setup 222GP_CONFIG_MSG([Compiler],[${CC}]) 223GP_CONFIG_MSG([libltdl includes],[$LTDLINCL]) 224GP_CONFIG_MSG([libltdl library],[$LIBLTDL]) 225 226AC_DEFINE_UNQUOTED(HAVE_CC,"$CC",[The C compiler we're using]) 227 228 229dnl --------------------------------------------------------------------------- 230dnl Reference definitions 231dnl required before we do the Makevars hack! 232dnl --------------------------------------------------------------------------- 233 234GP_REFERENCES()dnl 235 236 237GP_CONFIG_MSG([Features]) 238 239dnl --------------------------------------------------------------------------- 240dnl i18n support (including some hacks) 241dnl --------------------------------------------------------------------------- 242 243ALL_LINGUAS="cs da de es eu fr hu it ja nl pl ru sv uk vi zh_CN" 244GP_GETTEXT_HACK([${PACKAGE}-${LIBGPHOTO2_CURRENT_MIN}],[The gPhoto Team],[${MAIL_GPHOTO_TRANSLATION}]) 245AM_GNU_GETTEXT_VERSION([0.14.1]) 246AM_GNU_GETTEXT([external]) 247AM_PO_SUBDIRS() 248AM_ICONV() 249GP_GETTEXT_FLAGS() 250 251dnl FIXME: We have to make sure this works first 252dnl AC_CHECK_FUNC(gettext, gettext_without_libintl=true) 253# same trick as with libdl: 254# if gettext() doesn't require linking against libintl, 255# we don't have to check for gettext in libintl. Otherwise 256# we may even require libintl. 257dnl if test "$gettext_without_libintl" != "true" -a "$USE_NLS" = "yes"; then 258dnl AC_CHECK_LIB([intl], [gettext], [INTLLIBS="$INTLLIBS -lintl"]) 259dnl fi 260 261AC_SUBST([localedir],["\$(datadir)/locale"]) 262AM_CPPFLAGS="$AM_CPPFLAGS -DLOCALEDIR=\\\"${localedir}\\\"" 263 264AC_SYS_LARGEFILE 265 266AC_MSG_CHECKING([for asm .symver support]) 267AC_COMPILE_IFELSE([dnl 268 AC_LANG_PROGRAM([[ 269 void f1(void); 270 void f1() {} 271 void f2(void); 272 void f2() {} 273 asm(".symver f1, f@VER1"); 274 asm(".symver f2, f@@VER2"); 275 ]],[])dnl 276],[ 277 AC_DEFINE([HAVE_ASM_SYMVERS],1,[Define if there is asm .symver support.]) 278 VERSIONMAPLDFLAGS="-Wl,--version-script=\$(srcdir)/libgphoto2.ver" 279 AC_MSG_RESULT(yes) 280],[ 281 VERSIONMAPLDFLAGS="" 282 AC_MSG_RESULT(no) 283]) 284AC_SUBST(VERSIONMAPLDFLAGS) 285 286dnl --------------------------------------------------------------------------- 287dnl FIXME: What is this good for? 288dnl Replace `main' with a function in -libs: 289dnl --------------------------------------------------------------------------- 290AC_CHECK_LIB(ibs, main) 291 292dnl we use some libm functions in some drivers, so just add -lm 293AC_CHECK_LIB(m, sqrt) 294 295 296dnl --------------------------------------------------------------------------- 297dnl test GP_SET_ macros from gp-set.m4 298dnl --------------------------------------------------------------------------- 299dnl GP_SET_TESTSUITE 300dnl AC_MSG_ERROR([gp-set.m4 testsuite done.]) 301 302 303dnl --------------------------------------------------------------------------- 304dnl check for libjpeg 305dnl --------------------------------------------------------------------------- 306LIBJPEG="" 307libjpeg_msg="no" 308AC_SUBST(LIBJPEG) 309AC_ARG_WITH([jpeg], AS_HELP_STRING([--without-jpeg], [Build without jpeg library (default: no)])) 310AS_IF([test "x$with_jpeg" != "xno"], [ 311 AC_CHECK_LIB(jpeg,jpeg_start_decompress,[ 312 AC_CHECK_HEADER(jpeglib.h,[ 313 AC_DEFINE(HAVE_LIBJPEG,1,[define if we found LIBJPEG and its headers]) 314 LIBJPEG="-ljpeg" 315 libjpeg_msg="yes" 316 ]) 317 ]) 318]) 319GP_CONFIG_MSG([JPEG mangling support],[${libjpeg_msg}]) 320 321dnl --------------------------------------------------------------------------- 322dnl check for libxml2 323dnl --------------------------------------------------------------------------- 324GP_CHECK_LIBRARY([LIBXML2],[libxml-2.0],[>= 2.0], 325 [libxml/parser.h],[xmlFirstElementChild],[],[], 326 [default-on], 327 [http://xmlsoft.org] 328) 329GP_CONFIG_MSG([XML support for Olympus E series],[${have_LIBXML2}]) 330 331GP_CHECK_LIBRARY([LIBCURL],[libcurl],[>= 7.1], 332 [curl/curl.h],[curl_easy_init],[],[], 333 [default-on], 334 [https://www.curl.org] 335) 336GP_CONFIG_MSG([CURL support for Lumix Wifi],[${have_LIBCURL}]) 337 338AM_CONDITIONAL([HAVE_LIBCURL], 339 [test -n "$have_LIBCURL" && test "X$have_LIBCURL" != "Xno"]) 340AM_CONDITIONAL([HAVE_LIBXML2], 341 [test -n "$have_LIBXML2" && test "X$have_LIBXML2" != "Xno"]) 342 343 344dnl --------------------------------------------------------------------------- 345dnl check for libgd 346dnl they call it "gdlib" ... confusing. 347dnl --------------------------------------------------------------------------- 348GP_CHECK_LIBRARY([LIBGD],[gdlib],[>= 2.0],[gd.h],[gdImageCreateTrueColor],[ 349 # gdlib-config --libs upstream does not include -lgd, but only the dependencies 350 LIBGD_LIBS="-lgd $LIBGD_LIBS" 351 352],[],[default-on],[http://www.libgd.org/]) 353GP_CONFIG_MSG([libGD conversion support],[${have_LIBGD}]) 354 355dnl --------------------------------------------------------------------------- 356dnl Checks for header files. 357dnl --------------------------------------------------------------------------- 358AC_HEADER_DIRENT 359# before _HEADER_STDC 360AC_HEADER_STDC 361# after _HEADER_STDC 362AC_CHECK_HEADERS([sys/param.h sys/mman.h sys/select.h locale.h memory.h getopt.h unistd.h mcheck.h limits.h sys/time.h langinfo.h]) 363AC_C_INLINE([]) 364AC_C_CONST([]) 365dnl FIXME: AC_STRUCT_TIMEZONE 366 367 368dnl --------------------------------------------------------------------------- 369dnl more header/function/def checks 370dnl --------------------------------------------------------------------------- 371 372dnl Checks for typedefs, structures, and compiler characteristics. 373AC_TYPE_SIZE_T 374 375dnl Checks for library functions. 376AC_CHECK_FUNCS([getenv getopt getopt_long mkdir setenv strdup strncpy strcpy snprintf sprintf vsnprintf gmtime_r statfs localtime_r lstat inet_aton rand_r]) 377 378dnl Find out how to get struct tm 379AC_STRUCT_TM 380 381dnl Check for tm_gmtoff in struct tm 382AC_MSG_CHECKING([for tm_gmtoff in struct tm]) 383AC_COMPILE_IFELSE([dnl 384AC_LANG_PROGRAM([[ 385#include <sys/types.h> 386#include <$ac_cv_struct_tm> 387]], [[ 388struct tm tm; 389tm.tm_gmtoff; 390]])dnl 391],[ 392AC_DEFINE(HAVE_TM_GMTOFF,1,whether struct tm has tm_gmtoff field) 393AC_MSG_RESULT(yes) 394],[ 395AC_MSG_RESULT(no) 396]) 397 398AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,[ 399#include <sys/types.h> 400#if HAVE_SYS_PARAM_H 401# include <sys/param.h> 402#endif 403]) 404 405dnl Check for statfs members 406AC_CHECK_MEMBERS([struct statfs.f_bfree, struct statfs.f_bavail, struct statfs.f_favail],,,[ 407#include <sys/types.h> 408#ifdef HAVE_SYS_PARAM_H 409# include <sys/param.h> 410#endif 411#ifdef HAVE_SYS_MOUNT_H 412# include <sys/mount.h> 413#endif 414#ifdef HAVE_SYS_VFS_H 415# include <sys/vfs.h> 416#endif 417#ifdef HAVE_SYS_STATFS_H 418# include <sys/statfs.h> 419#endif 420]) 421 422AC_CHECK_MEMBERS([struct statvfs.f_blocks],,,[ 423#ifdef HAVE_SYS_STATVFS_H 424# include <sys/statvfs.h> 425#endif 426]) 427 428 429dnl --------------------------------------------------------------------------- 430dnl Checks for integer types. 431dnl --------------------------------------------------------------------------- 432dnl 433dnl FIXME: Test AC_TYPE_UINT32_T & Co and check whether that could work for us. 434dnl Potential problem: The required autoconf version. 435dnl Note: We are already using AC_TYPE_SIZE_T somewhere else in here. 436 437 438dnl Create a stdint.h-like file containing size-specific integer definitions 439dnl that will always be available 440AX_NEED_STDINT_H([libgphoto2/_stdint.h]) 441 442dnl Create a header file containing NetBSD-style byte swapping macros 443AC_NEED_BYTEORDER_H([libgphoto2/gphoto2-endian.h]) 444 445 446dnl --------------------------------------------------------------------------- 447dnl Old libtool stuff left here for reference purposes. For now. 448dnl dnl --------------------------------------------------------------------------- 449dnl dnl Check for libtool: lt_dlforeachfile has been introduced in 450dnl dnl libtool-1.4. However, there are still systems out 451dnl dnl there running libtool-1.3. For those, we will need 452dnl dnl dlopen. Note that on some systems (e.g. FreeBSD) 453dnl dnl -ldl isn't needed. 454dnl dnl --------------------------------------------------------------------------- 455dnl AC_PROG_LIBTOOL 456dnl have_ltdl=false 457dnl ltdl_msg="no" 458dnl try_ltdl=false 459dnl AC_ARG_WITH(ltdl, [ --with-ltdl Use ltdl],[ 460dnl if test x$withval = xyes; then 461dnl try_ltdl=true 462dnl fi]) 463dnl if $try_ltdl; then 464dnl AC_CHECK_LIB(ltdl, lt_dlforeachfile,[ 465dnl AC_CHECK_HEADER(ltdl.h,[ 466dnl AC_DEFINE(HAVE_LTDL,1,[whether we use libltdl]) 467dnl LTDL_LIBS="-lltdl" 468dnl ltdl_msg="yes" 469dnl have_ltdl=true])]) 470dnl fi 471dnl if ! $have_ltdl; then 472dnl AC_CHECK_FUNC(dlopen,,[ 473dnl AC_CHECK_LIB(dl, dlopen,[LTDL_LIBS="-ldl"],[AC_ERROR([ 474dnl *** Could not determine how to handle 475dnl *** shared libraries!])])]) 476dnl fi 477dnl AC_SUBST(LTDL_LIBS) 478 479 480dnl should be obsolete (we're not using grep and tr any more) 481dnl dnl Solaris hack for grep and tr 482dnl [ 483dnl if test -n "`echo $host_os | grep '[sS]olaris'`"; then 484dnl TR=/usr/xpg4/bin/tr 485dnl GREP=/usr/xpg4/bin/grep 486dnl else 487dnl TR=tr 488dnl GREP=grep 489dnl fi 490dnl ] 491 492 493dnl --------------------------------------------------------------------------- 494dnl utility installation directory 495dnl 496dnl If your system wants utilities installed into ${libexecdir} instead, then 497dnl run configure with 'utilsdir=${libexecdir}/${PACKAGE_TARNAME}'. 498dnl --------------------------------------------------------------------------- 499 500AC_SUBST([PACKAGE_TARNAME]) 501 502if test "x${utilsdir}" = "x"; then utilsdir="\${libdir}/\${PACKAGE_TARNAME}"; fi 503AC_ARG_VAR([utilsdir],[Directory where utilities like print-camera-list will be installed]) 504AC_SUBST([utilsdir]) 505 506GP_UDEV([true]) 507 508 509dnl --------------------------------------------------------------------------- 510dnl camlib installation directory 511dnl --------------------------------------------------------------------------- 512AC_MSG_CHECKING([where to install camlibs]) 513AC_ARG_WITH([camlibdir],[AS_HELP_STRING( 514 [--with-camlibdir=<path>], 515 [install camlibs in directory <path>])dnl 516],[ 517 camlibdir="$withval" 518],[ 519 camlibdir="\${libdir}/${PACKAGE_TARNAME}/${PACKAGE_VERSION}" 520]) 521AC_MSG_RESULT([${camlibdir}]) 522AC_SUBST([camlibdir]) 523AM_CPPFLAGS="$AM_CPPFLAGS -DCAMLIBS=\\\"\$(camlibdir)\\\"" 524 525 526dnl --------------------------------------------------------------------------- 527dnl Camera drivers (camlibs) 528dnl --------------------------------------------------------------------------- 529dnl * See gp-camlibs.m4 for usage details, e.g. for marking camlibs as 530dnl unlisted. 531dnl * Please add new camlibs in alphabetical order. 532dnl * Selective build: 533dnl $ make -C camlibs canon.la ptp2.la 534dnl or 535dnl $ make -C camlibs GP_CAMLIB_SET="canon.la ptp2.la" 536dnl * Selective install: 537dnl $ make GP_CAMLIB_SET="canon.la ptp2.la" install-camlibs 538GP_CAMLIB([adc65],[outdated])dnl very old serial camera 539GP_CAMLIB([agfa_cl20],[outdated])dnl 540GP_CAMLIB([aox],[outdated])dnl 541GP_CAMLIB([ax203])dnl 542GP_CAMLIB([barbie],[outdated])dnl 543GP_CAMLIB([canon])dnl 544GP_CAMLIB([casio_qv],[outdated])dnl 545GP_CAMLIB([clicksmart310],[outdated])dnl 546GP_CAMLIB([digigr8])dnl 547GP_CAMLIB([digita],[outdated])dnl 548GP_CAMLIB([dimera3500],[outdated])dnl 549GP_CAMLIB([directory])dnl 550AM_COND_IF([HAVE_LIBGD], [dnl 551GP_CAMLIB([docupen])dnl 552]) 553GP_CAMLIB([enigma13],[outdated])dnl 554GP_CAMLIB([fuji],[outdated])dnl 555GP_CAMLIB([gsmart300],[outdated])dnl 556GP_CAMLIB([hp215],[outdated])dnl 557GP_CAMLIB([iclick],[outdated])dnl 558GP_CAMLIB([jamcam],[outdated])dnl 559GP_CAMLIB([jd11],[outdated])dnl 560GP_CAMLIB([jl2005a])dnl 561GP_CAMLIB([jl2005c])dnl 562GP_CAMLIB([kodak_dc120],[outdated])dnl 563GP_CAMLIB([kodak_dc210],[outdated])dnl 564GP_CAMLIB([kodak_dc240])dnl 565GP_CAMLIB([kodak_dc3200],[outdated])dnl 566GP_CAMLIB([kodak_ez200],[outdated])dnl 567GP_CAMLIB([konica],[outdated])dnl 568GP_CAMLIB([konica_qm150],[outdated])dnl 569GP_CAMLIB([largan],[outdated])dnl 570GP_CAMLIB([lg_gsm],[outdated])dnl 571AM_COND_IF([HAVE_LIBCURL], [dnl 572AM_COND_IF([HAVE_LIBXML2], [dnl 573GP_CAMLIB([lumix])dnl 574]) 575]) 576GP_CAMLIB([mars])dnl 577GP_CAMLIB([dimagev])dnl 578GP_CAMLIB([mustek],[outdated])dnl 579GP_CAMLIB([panasonic_coolshot],[outdated])dnl 580GP_CAMLIB([panasonic_l859],[outdated])dnl 581GP_CAMLIB([panasonic_dc1000],[outdated])dnl 582GP_CAMLIB([panasonic_dc1580],[outdated])dnl 583GP_CAMLIB([pccam300],[outdated])dnl 584GP_CAMLIB([pccam600],[outdated])dnl 585GP_CAMLIB([pentax])dnl 586GP_CAMLIB([polaroid_pdc320],[outdated])dnl 587GP_CAMLIB([polaroid_pdc640],[outdated])dnl 588GP_CAMLIB([polaroid_pdc700],[outdated])dnl 589GP_CAMLIB([ptp2])dnl 590GP_CAMLIB([ricoh],[outdated])dnl 591GP_CAMLIB([ricoh_g3])dnl 592GP_CAMLIB([samsung],[outdated])dnl 593GP_CAMLIB([sierra])dnl 594GP_CAMLIB([sipix_blink], [unlisted])dnl did not find out the correct decompressor, unfinished 595GP_CAMLIB([sipix_blink2],[outdated])dnl 596GP_CAMLIB([sipix_web2],[outdated])dnl 597GP_CAMLIB([smal],[outdated])dnl 598GP_CAMLIB([sonix])dnl 599GP_CAMLIB([sony_dscf1],[outdated])dnl 600GP_CAMLIB([sony_dscf55],[outdated])dnl 601GP_CAMLIB([soundvision],[outdated])dnl 602GP_CAMLIB([spca50x],[outdated])dnl 603GP_CAMLIB([sq905])dnl 604GP_CAMLIB([st2205])dnl 605GP_CAMLIB([stv0674],[outdated])dnl 606GP_CAMLIB([stv0680],[outdated])dnl 607GP_CAMLIB([sx330z],[outdated])dnl 608GP_CAMLIB([template], [unlisted])dnl 609GP_CAMLIB([topfield])dnl 610GP_CAMLIB([toshiba_pdrm11],[outdated])dnl 611GP_CAMLIB([tp6801])dnl 612dnl 613GP_CAMLIBS_DEFINE()dnl 614 615 616dnl -------------------------------------------------------------------- 617dnl documentation 618dnl -------------------------------------------------------------------- 619GP_CHECK_DOC_DIR()dnl 620GP_CHECK_DOXYGEN()dnl 621GP_INTERNAL_DOCS()dnl 622GP_BUILD_GTK_DOCS()dnl 623AC_SUBST([camlibdocdir], ['${docdir}/camlibs']) 624 625 626dnl -------------------------------------------------------------------- 627dnl initialize convenience packaging 628dnl -------------------------------------------------------------------- 629GPKG_CHECK_RPM()dnl Check wether to package for a system using RPM 630GPKG_CHECK_LINUX()dnl Check wether to package for a linux system 631 632 633dnl -------------------------------------------------------------------- 634dnl guess directory to install *.pc into 635dnl -------------------------------------------------------------------- 636pkgconfigdir='${libdir}/pkgconfig' 637AC_SUBST([pkgconfigdir]) 638 639 640dnl --------------------------------------------------------------------------- 641dnl libexif: The CameraFilesystem can use libexif for extracting thumbnails 642dnl out of EXIF data. Similarly, it can extract the mtime of 643dnl a file. 644dnl libexif is available from 645dnl http://www.sourceforge.net/projects/libexif 646dnl --------------------------------------------------------------------------- 647GP_CHECK_LIBRARY([LIBEXIF],[libexif],[>= 0.6.13], 648 [libexif/exif-data.h],[exif_data_new],[ 649AC_MSG_CHECKING([whether we use a version of libexif with ExifData.ifd[[]]]) 650# Check for libexif version 651dnl FIXME: Use AC_CHECK_MEMBER? 652CPPFLAGS_save="$CPPFLAGS" 653CPPFLAGS="$LIBEXIF_CFLAGS" 654AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ 655/* CC=$CC */ 656/* CPPFLAGS=${CPPFLAGS} */ 657/* LDFLAGS=${LDFLAGS} */ 658#include <libexif/exif-data.h> 659#include <libexif/exif-content.h> 660]],[[ 661 ExifData ed; 662 ExifContent *ec0, *ec1; 663 ec0 = &ed.ifd[0]; 664 ec1 = &ed.ifd[1]; 665]])], [ 666 AC_DEFINE([HAVE_LIBEXIF_IFD],1, 667 [whether we use a version of libexif with ExifData.ifd[[]]]) 668 AC_MSG_RESULT([yes]) 669], [ 670 AC_MSG_RESULT([no]) 671]) 672CPPFLAGS="$CPPFLAGS_save" 673],[],[default-on],[http://www.sourceforge.net/projects/libexif])dnl 674 675 676dnl --------------------------------------------------------------------------- 677dnl Configure subprojects 678dnl --------------------------------------------------------------------------- 679if test -d "$srcdir/libgphoto2_port"; then 680 AC_CONFIG_SUBDIRS([libgphoto2_port]) 681else 682 AC_MSG_ERROR([ 683****************************************************** 684*** Hey, where have you hidden my libgphoto2_port? *** 685*** I needed that! *** 686****************************************************** 687]) 688fi 689 690 691# --------------------------------------------------------------------------- 692# clean up 693# --------------------------------------------------------------------------- 694GP_SET_CLEAN_FILES 695 696 697# --------------------------------------------------------------------------- 698# Create output files 699# --------------------------------------------------------------------------- 700AC_CONFIG_FILES([ 701Makefile 702gphoto2-config 703camlibs/Makefile 704camlibs/canon/doc/Makefile 705camlibs/konica/localization/Makefile 706gphoto-m4/Makefile 707libgphoto2/Makefile 708libgphoto2.pc 709libgphoto2-uninstalled.pc 710examples/Makefile 711tests/Makefile 712tests/ddb/Makefile 713tests/ddb/check-ddb.sh 714packaging/Makefile 715packaging/linux-hotplug/Makefile 716packaging/generic/Makefile 717packaging/rpm/Makefile 718packaging/rpm/package.spec 719po/Makefile.in 720doc/Makefile 721doc/Doxyfile 722doc/Doxyfile-internals 723doc/api/Makefile 724],[ 725dnl This relies on this code being called for each of the above files 726dnl with ac_file set to the filename. 727case "$ac_file" in #( 728*.sh) 729 if test -f "$ac_file"; then 730 chmod +x "$ac_file" 731 fi 732 ;; 733esac 734]) 735AC_OUTPUT 736 737AS_IF([test "x$CDPATH" != "x"], [dnl 738 AC_MSG_WARN([ 739 740 #=========================================================# 741 # You have CDPATH set. You may have to run "unset CDPATH" # 742 # before running "make dist" or "make rpm". # 743 #=========================================================# 744]) 745])dnl 746 747GP_CONFIG_OUTPUT 748 749dnl Catch the Gentoo folks about to shoot themselves in the foot. 750dnl Just enabling "foo" often does not make a camera made by 751dnl manufacturer "Foo" work. 752GP_CAMLIBS_CONDITIONAL_WARNING 753 754cat<<_GP_EOF 755Please check whether the configuration I have detected matches what 756you would like to have. E.g. make sure that USB support is there if 757you intend to use USB cameras with ${PACKAGE_NAME}. 758 759Please also check that PKG_CONFIG_PATH contains 760 ${pkgconfigdir} 761before compiling any libgphoto2 frontend. 762_GP_EOF 763