summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac13
-rw-r--r--m4/as-compiler-flag.m44
2 files changed, 8 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index a1fc3b7..7a70be9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
1# -*- Autoconf -*- 1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script. 2# Process this file with autoconf to produce a configure script.
3 3
4AC_PREREQ(2.64) 4AC_PREREQ(2.68)
5AC_INIT([usbmuxd], [1.1.2], [https://github.com/libimobiledevice/usbmuxd/issues],, [https://libimobiledevice.org]) 5AC_INIT([usbmuxd], [1.1.2], [https://github.com/libimobiledevice/usbmuxd/issues],, [https://libimobiledevice.org])
6AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news]) 6AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news])
7m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) 7m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
@@ -11,9 +11,8 @@ AC_CONFIG_MACRO_DIR([m4])
11 11
12# Checks for programs. 12# Checks for programs.
13AC_PROG_CC 13AC_PROG_CC
14AC_PROG_CXX
15AM_PROG_CC_C_O 14AM_PROG_CC_C_O
16AC_PROG_LIBTOOL 15LT_INIT
17 16
18# Checks for libraries. 17# Checks for libraries.
19PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.9) 18PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.9)
@@ -38,11 +37,11 @@ if test "x$have_limd" = "xyes"; then
38 CACHED_CFLAGS="$CFLAGS" 37 CACHED_CFLAGS="$CFLAGS"
39 CFLAGS+=" $libimobiledevice_CFLAGS" 38 CFLAGS+=" $libimobiledevice_CFLAGS"
40 AC_CACHE_CHECK(for enum idevice_connection_type, ac_cv_enum_idevice_connection_type, 39 AC_CACHE_CHECK(for enum idevice_connection_type, ac_cv_enum_idevice_connection_type,
41 AC_TRY_COMPILE([ 40 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
42 #include <libimobiledevice/libimobiledevice.h> 41 #include <libimobiledevice/libimobiledevice.h>
43 ], [ 42 ], [
44 enum idevice_connection_type conn_type = CONNECTION_USBMUXD; 43 enum idevice_connection_type conn_type = CONNECTION_USBMUXD;
45 ], ac_cv_enum_idevice_connection_type=yes, ac_cv_enum_idevice_connection_type=no)) 44 ])], ac_cv_enum_idevice_connection_type=yes, ac_cv_enum_idevice_connection_type=no))
46 CFLAGS="$CACHED_CFLAGS" 45 CFLAGS="$CACHED_CFLAGS"
47 if (test "$ac_cv_enum_idevice_connection_type" = "yes"); then 46 if (test "$ac_cv_enum_idevice_connection_type" = "yes"); then
48 AC_DEFINE(HAVE_ENUM_IDEVICE_CONNECTION_TYPE, 1, [Define if enum idevice_connection_type is available]) 47 AC_DEFINE(HAVE_ENUM_IDEVICE_CONNECTION_TYPE, 1, [Define if enum idevice_connection_type is available])
@@ -93,7 +92,6 @@ fi
93AC_SUBST(udev_activation_rule) 92AC_SUBST(udev_activation_rule)
94 93
95# Checks for header files. 94# Checks for header files.
96AC_HEADER_STDC
97AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) 95AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
98 96
99# Checks for typedefs, structures, and compiler characteristics. 97# Checks for typedefs, structures, and compiler characteristics.
@@ -155,13 +153,14 @@ AC_SUBST(GLOBAL_CFLAGS)
155 153
156m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 154m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
157 155
158AC_OUTPUT([ 156AC_CONFIG_FILES([
159Makefile 157Makefile
160src/Makefile 158src/Makefile
161udev/Makefile 159udev/Makefile
162systemd/Makefile 160systemd/Makefile
163docs/Makefile 161docs/Makefile
164]) 162])
163AC_OUTPUT
165 164
166echo " 165echo "
167Configuration for $PACKAGE $VERSION: 166Configuration for $PACKAGE $VERSION:
diff --git a/m4/as-compiler-flag.m4 b/m4/as-compiler-flag.m4
index 0f660cf..baab5d9 100644
--- a/m4/as-compiler-flag.m4
+++ b/m4/as-compiler-flag.m4
@@ -18,7 +18,7 @@ AC_DEFUN([AS_COMPILER_FLAG],
18 save_CFLAGS="$CFLAGS" 18 save_CFLAGS="$CFLAGS"
19 CFLAGS="$CFLAGS $1" 19 CFLAGS="$CFLAGS $1"
20 20
21 AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) 21 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [flag_ok=yes], [flag_ok=no])
22 CFLAGS="$save_CFLAGS" 22 CFLAGS="$save_CFLAGS"
23 23
24 if test "X$flag_ok" = Xyes ; then 24 if test "X$flag_ok" = Xyes ; then
@@ -44,7 +44,7 @@ AC_DEFUN([AS_COMPILER_FLAGS],
44 do 44 do
45 save_CFLAGS="$CFLAGS" 45 save_CFLAGS="$CFLAGS"
46 CFLAGS="$CFLAGS $each" 46 CFLAGS="$CFLAGS $each"
47 AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) 47 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [flag_ok=yes], [flag_ok=no])
48 CFLAGS="$save_CFLAGS" 48 CFLAGS="$save_CFLAGS"
49 49
50 if test "X$flag_ok" = Xyes ; then 50 if test "X$flag_ok" = Xyes ; then