Skip to content

Commit

Permalink
Update deprecated autoconf macros and update m4 files
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Sep 19, 2021
1 parent b2d7536 commit 156fa95
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 120 deletions.
18 changes: 9 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.64)
AC_PREREQ(2.68)
AC_INIT([libideviceactivation], [1.1.2], [https://github.com/libimobiledevice/libideviceactivation/issues],, [https://libimobiledevice.org])
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip check-news])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
Expand Down Expand Up @@ -31,9 +31,9 @@ AC_SUBST(LIBXML2_VERSION)

# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
#AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
LT_INIT

# Checks for libraries.
PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= $LIBIMOBILEDEVICE_VERSION)
Expand All @@ -42,7 +42,6 @@ PKG_CHECK_MODULES(libcurl, libcurl >= $LIBCURL_VERSION)
PKG_CHECK_MODULES(libxml2, libxml-2.0 >= $LIBXML2_VERSION)

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdint.h stdlib.h string.h sys/socket.h])

# Checks for typedefs, structures, and compiler characteristics.
Expand All @@ -57,17 +56,17 @@ AC_TYPE_UINT8_T
AC_CHECK_FUNCS([strcasecmp strdup strerror strndup])

# Check for operating system
AC_MSG_CHECKING([wether we need platform-specific build settings for ${host_os}])
AC_MSG_CHECKING([for platform-specific build settings])
case ${host_os} in
*mingw32*|*cygwin*)
AC_MSG_RESULT([yes])
AC_MSG_RESULT([${host_os}])
win32=true
;;
darwin*|*android*)
AC_MSG_RESULT([no])
AC_MSG_RESULT([${host_os}])
;;
*)
AC_MSG_RESULT([yes])
AC_MSG_RESULT([${host_os}])
AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build ${PACKAGE}])])
AC_CHECK_LIB(pthread, [pthread_once], [], [AC_MSG_ERROR([pthread with pthread_once required to build ${PACKAGE}])])
;;
Expand All @@ -84,14 +83,15 @@ esac

m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_OUTPUT([
AC_CONFIG_FILES([
Makefile
src/Makefile
src/libideviceactivation-1.0.pc
include/Makefile
tools/Makefile
man/Makefile
])
AC_OUTPUT

echo "
Configuration for $PACKAGE $VERSION:
Expand Down
4 changes: 2 additions & 2 deletions m4/as-compiler-flag.m4
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AC_DEFUN([AS_COMPILER_FLAG],
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [flag_ok=yes], [flag_ok=no])
CFLAGS="$save_CFLAGS"
if test "X$flag_ok" = Xyes ; then
Expand All @@ -44,7 +44,7 @@ AC_DEFUN([AS_COMPILER_FLAGS],
do
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $each"
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [flag_ok=yes], [flag_ok=no])
CFLAGS="$save_CFLAGS"
if test "X$flag_ok" = Xyes ; then
Expand Down
Loading

0 comments on commit 156fa95

Please sign in to comment.