From 8f0c130c0e56a18e2f7c80f2c18197dfc388d689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Thu, 2 Mar 2017 09:10:58 +0100 Subject: [PATCH] Fix autotools stripts in order they works on tarball generated by CPack * Automatically switch --external-ortp and --external--mediastreamer to "enabled" when neither mediastreamer nor oRTP subdirectories can be found. * Create an empty liblinphone_gitversion.h when there is no .git repository. --- configure.ac | 4 ++-- coreapi/Makefile.am | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d7740b1d8..410a1fc31 100644 --- a/configure.ac +++ b/configure.ac @@ -819,7 +819,7 @@ AC_ARG_ENABLE(external-ortp, no) external_ortp=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-external-ortp) ;; esac], - [external_ortp=false] + [external_ortp=$(if test -d oRTP; then printf false; else printf true; fi)] ) if test "$external_ortp" = 'true'; then @@ -847,7 +847,7 @@ AC_SUBST([ORTP_DIR]) AC_ARG_ENABLE([external-mediastreamer], [AS_HELP_STRING([--enable-external-mediastreamer],[Use external mediastreamer library])],, - [enable_external_mediastreamer=no] + [enable_external_mediastreamer=$(if test -d mediastreamer2; then printf no; else printf yes; fi)] ) AS_CASE($enable_external_mediastreamer, diff --git a/coreapi/Makefile.am b/coreapi/Makefile.am index 887dd63c8..1ea19e35c 100644 --- a/coreapi/Makefile.am +++ b/coreapi/Makefile.am @@ -202,6 +202,8 @@ make_gitversion_h: cp -f $(builddir)/$(GITVERSION_FILE_TMP) $(builddir)/$(GITVERSION_FILE) ; \ fi ; \ rm -f $(builddir)/$(GITVERSION_FILE_TMP) ; \ + else \ + touch $(GITVERSION_FILE) ; \ fi $(GITVERSION_FILE): make_gitversion_h