📄 configure.in
字号:
# Process this file with autoconf to produce a configure script.AC_INIT([libptp2],[1.1.0],[emsi@ipartners.pl])AM_INIT_AUTOMAKE(libptp2, 1.1.0)AC_PREREQ(2.53)AM_CONFIG_HEADER([config.h])AC_PROG_LIBTOOL# library versioning# (quoted from libtool doc)# 1. Update the version information only immediately before a public release# 2. If the library source code has changed at all since the last update,# then increment revision (`c:r:a' becomes `c:r+1:a').# 3. If any interfaces have been added, removed, or changed since the last# update, increment current, and set revision to 0.# 4. If any interfaces have been added since the last public release,# then increment age.# 5. If any interfaces have been removed since the last public release,# then set age to 0. LIBPTP2_VERSION_CURRENT=2LIBPTP2_VERSION_REVISION=2LIBPTP2_VERSION_AGE=1LIBPTP2_VERSION_INFO=$LIBPTP2_VERSION_CURRENT:$LIBPTP2_VERSION_REVISION:$LIBPTP2_VERSION_AGEAC_SUBST(LIBPTP2_VERSION_INFO)# Checks for programs.AC_PROG_CC# turn on warnings for gccif test "$ac_cv_prog_gcc" = "yes"; then CFLAGS="$CFLAGS -Wall -Wmissing-declarations -Wmissing-prototypes" LDFLAGS="$LDFLAGS -Wall"fi# Checks for libraries.# Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS([libintl.h stdlib.h string.h])# Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_INLINEAC_STRUCT_TM# Checks for library functions.AC_FUNC_ERROR_AT_LINEAC_FUNC_MALLOCAC_FUNC_MKTIMEAC_FUNC_VPRINTFAC_CHECK_FUNCS([memset strchr strdup strtol getopt_long])build_ptpcam=yes#check for --disable-ptpcamAC_ARG_ENABLE([ptpcam], AC_HELP_STRING([--disable-ptpcam], [do not build ptpcam (default is to build ptpcam)]))if test "x$enable_ptpcam" = "xno"; then build_ptpcam=nofiAM_CONDITIONAL(PTPCAM, test "x$build_ptpcam" = "xyes")# Check for libusbif test "x$build_ptpcam" = "xyes"then AC_PATH_PROG(LIBUSB_CONFIG,libusb-config) if test -n "${LIBUSB_CONFIG}"; then PTPCAM_CFLAGS="`$LIBUSB_CONFIG --cflags`" PTPCAM_LDFLAGS="`$LIBUSB_CONFIG --libs`" AC_SUBST(PTPCAM_CFLAGS) AC_SUBST(PTPCAM_LDFLAGS) CFLAGS_save="$CFLAGS" LDFLAGS_save="$LDFLAGS" CFLAGS="$CFLAGS $PTPCAM_CFLAGS" LDFLAGS="$LDFLAGS $PTPCAM_LDFLAGS" AC_CHECK_LIB(usb,usb_busses, [LIBUSB_VER="`$LIBUSB_CONFIG --version`"], [AC_ERROR([*** You need at least version 0.1.8 of the libusb library to build ptpcam.*** Download and istall it from http://sourceforge.net/projects/libusb/ or*** use --disable-ptpcam option to build without ptpcam tool. ])]) CFLAGS="$CFLAGS_save" LDFLAGS="$LDFLAGS_save" fi if test "$LIBUSB_VER" \< "0.1.08"; then AC_ERROR([*** You need at least version 0.1.8 of the libusb library to build ptpcam.*** Download and istall it from http://sourceforge.net/projects/libusb/ or*** use --disable-ptpcam option to build without ptpcam tool. ]) fi if test "$LIBUSB_VER" = "0.1.10"; then AC_MSG_WARN([*** WARNING!!!*** libusb-0.1.10 is known to be broken!*** Pleasae use older or more recent version or procede at YOUR OWN RISK! ]) fifihostos=anycase $host in *-linux*) hostos=Linux AC_DEFINE([LINUX_OS], [], [Linux OS]) ;; *) AC_DEFINE([UNKNOWN_OS], [], [Unknown OS]) ;;esacAM_CONDITIONAL(LINUX_OS, test "x$hostos" = "xLinux")dnl Create a header file containing NetBSD-style byte swapping macrosAC_NEED_BYTEORDER_H(src/libptp-endian.h)dnl Create a stdint.h-like file containing size-specific integer definitionsdnl that will always be availableAC_NEED_STDINT_H(src/libptp-stdint.h)AC_CONFIG_FILES([ Makefilesrc/Makefile])AC_OUTPUT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -