From 5e375016b50ee7581c6926f62b206ba8ca40b50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Thu, 31 Oct 2002 00:26:13 +0000 Subject: [PATCH] check for rpcgen, add -no-cpp-precomp on Mac OS X, cleanup git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1230 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- configure.ac | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 74e234461..6c8ac1670 100644 --- a/configure.ac +++ b/configure.ac @@ -121,7 +121,7 @@ AC_CHECK_FUNCS([strcasecmp strchr strdup strerror strrchr strstr strtol]) AC_CHECK_FUNCS([cfmakeraw]) AC_REPLACE_FUNCS([getopt_long usleep]) AC_FUNC_ALLOCA -AC_FUNC_MALLOC +#AC_FUNC_MALLOC AC_FUNC_VPRINTF dnl initialize libtool @@ -139,6 +139,15 @@ AC_PROG_LIBTOOL dnl Configure libltdl AC_CONFIG_SUBDIRS(libltdl) +case "$host_os" in +darwin* | rhapsody*) + # Trick from http://fink.sourceforge.net/doc/porting/ + # TODO: check the compiler actually does support these options + CFLAGS="${CFLAGS} -no-cpp-precomp" + CXXFLAGS="${CXXFLAGS} -no-cpp-precomp" + ;; +esac + dnl Check if C99 struct initializers are supported AC_MSG_CHECKING(whether C99 struct initializers are supported) AC_TRY_COMPILE(,struct{char a;int b;}s={.b=5};, [AC_MSG_RESULT(yes)], @@ -199,8 +208,6 @@ else cf_with_perl=no fi -#AC_CHECK_PROG(cf_with_perl, h2xs, [yes], [no]) - AC_MSG_CHECKING(whether to build perl binding and demo) AC_ARG_WITH(perl-binding, [ --with-perl-binding build perl binding and demo], @@ -288,11 +295,16 @@ AC_SUBST(GNURADIO_CFLAGS) AC_SUBST(GNURADIO_LIBS) +AC_CHECK_PROG(cf_with_rpcgen, rpcgen, [yes], [no]) +AC_MSG_CHECKING(whether to build rpc backends) # RPCRig must be the last one added to BACKEND_LIST # because it links against other backends (build order) -if test "${ac_cv_header_rpc_rpc_h}" = "yes" ; then +if test "${ac_cv_header_rpc_rpc_h}" = "yes" -a "${cf_with_rpcgen}" = "yes"; then BACKEND_LIST="$BACKEND_LIST rpcrig" ROT_BACKEND_LIST="$ROT_BACKEND_LIST rpcrot" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) fi