⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acinclude.m4

📁 最新的openobex源码
💻 M4
字号:
AC_DEFUN([AC_PROG_CC_PIE], [	AC_CACHE_CHECK([whether ${CC-cc} accepts -fPIE], ac_cv_prog_cc_pie, [		echo 'void f(){}' > conftest.c		if test -z "`${CC-cc} -fPIE -pie -c conftest.c 2>&1`"; then			ac_cv_prog_cc_pie=yes		else			ac_cv_prog_cc_pie=no		fi		rm -rf conftest*	])])AC_DEFUN([AC_INIT_OPENOBEX], [	AC_PREFIX_DEFAULT(/usr/local)	if (test "${CFLAGS}" = ""); then		CFLAGS="-Wall -O2"	fi	if (test "${prefix}" = "NONE"); then		dnl no prefix and no sysconfdir, so default to /etc		if (test "$sysconfdir" = '${prefix}/etc'); then			AC_SUBST([sysconfdir], ['/etc'])		fi		dnl no prefix and no mandir, so use ${prefix}/share/man as default		if (test "$mandir" = '${prefix}/man'); then			AC_SUBST([mandir], ['${prefix}/share/man'])		fi		prefix="${ac_default_prefix}"	fi	if (test "${libdir}" = '${exec_prefix}/lib'); then		libdir="${prefix}/lib"	fi	if (test "$sysconfdir" = '${prefix}/etc'); then		configdir="${prefix}/etc/openobex"	else		configdir="${sysconfdir}/openobex"	fi	AC_DEFINE_UNQUOTED(CONFIGDIR, "${configdir}", [Directory for the configuration files])])AC_DEFUN([AC_PATH_IRDA], [	AC_CACHE_CHECK([for IrDA support], irda_found, [		AC_TRY_COMPILE([				#include <sys/socket.h>				#include "lib/irda.h"			], [				struct irda_device_list l;			], irda_found=yes, irda_found=no)	])])AC_DEFUN([AC_PATH_BLUEZ], [	PKG_CHECK_MODULES(BLUEZ, bluez, bluez_found=yes, AC_MSG_RESULT(no))	AC_SUBST(BLUEZ_CFLAGS)	AC_SUBST(BLUEZ_LIBS)])AC_DEFUN([AC_PATH_USB], [	PKG_CHECK_MODULES(USB, libusb, usb_found=yes, AC_MSG_RESULT(no))	AC_SUBST(USB_CFLAGS)	AC_SUBST(USB_LIBS)	AC_CHECK_LIB(usb, usb_get_busses, dummy=yes, AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() function.]))	AC_CHECK_LIB(usb, usb_interrupt_read, dummy=yes, AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the usb_interrupt_read() function.]))])AC_DEFUN([AC_ARG_OPENOBEX], [	fortify_enable=yes	irda_enable=yes	bluetooth_enable=yes	usb_enable=yes	apps_enable=no	debug_enable=no	syslog_enable=no	dump_enable=no	AC_ARG_ENABLE(fortify, AC_HELP_STRING([--disable-fortify], [disable compile time buffer checks]), [		fortify_enable=${enableval}	])	AC_ARG_ENABLE(irda, AC_HELP_STRING([--disable-irda], [disable IrDA support]), [		irda_enable=${enableval}	])	AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--disable-bluetooth], [disable Bluetooth support]), [		bluetooth_enable=${enableval}	])	AC_ARG_ENABLE(usb, AC_HELP_STRING([--disable-usb], [disable USB support]), [		usb_enable=${enableval}	])	AC_ARG_ENABLE(apps, AC_HELP_STRING([--enable-apps], [enable test applications]), [		apps_enable=${enableval}	])	AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable compiling with debugging information]), [		debug_enable=${enableval}	])	AC_ARG_ENABLE(syslog, AC_HELP_STRING([--enable-syslog], [enable debugging to the system logger]), [		syslog_enable=${enableval}	])	AC_ARG_ENABLE(dump, AC_HELP_STRING([--enable-dump], [enable protocol dumping for debugging]), [		dump_enable=${enableval}	])	if (test "${fortify_enable}" = "yes"); then		CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"	fi	REQUIRES=""	if (test "${irda_enable}" = "yes" && test "${irda_found}" = "yes"); then		AC_DEFINE(HAVE_IRDA, 1, [Define if system supports IrDA and it's enabled])	fi	if (test "${bluetooth_enable}" = "yes" && test "${bluez_found}" = "yes"); then		AC_DEFINE(HAVE_BLUETOOTH, 1, [Define if system supports Bluetooth and it's enabled])		REQUIRES="bluez"	fi	if (test "${usb_enable}" = "yes" && test "${usb_found}" = "yes"); then		AC_DEFINE(HAVE_USB, 1, [Define if system supports USB and it's enabled])		AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="$REQUIRES libusb")	fi	AM_CONDITIONAL(APPS, test "${apps_enable}" = "yes")	if (test "${debug_enable}" = "yes" && test "${ac_cv_prog_cc_g}" = "yes"); then		CFLAGS="$CFLAGS -g"		AC_DEFINE_UNQUOTED(OBEX_DEBUG, 1, [Enable debuggging])	fi	if (test "${syslog_enable}" = "yes"); then		AC_DEFINE_UNQUOTED(OBEX_SYSLOG, 1, [System logger debugging])	fi	if (test "${dump_enable}" = "yes"); then		AC_DEFINE_UNQUOTED(OBEX_DUMP, 1, [Protocol dumping])	fi	AC_SUBST(REQUIRES)])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -