summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie Shprung <lshprung@scu.edu>2023-02-25 16:23:23 -0800
committerLouie Shprung <lshprung@scu.edu>2023-02-25 16:23:23 -0800
commitde3f9b304c73721c877cdfacae1f006618c91d52 (patch)
tree698e8cfaf99ad536f0abc9be392fa1d0a2e02929
parentb1b11d6ec70cf08e8b102d8f5dbf835291702db0 (diff)
Remove AC_CHECK_MALLOC to allow for cross-compilation
-rwxr-xr-xconfigure71
-rw-r--r--configure.ac3
-rw-r--r--docs/README.md3
3 files changed, 5 insertions, 72 deletions
diff --git a/configure b/configure
index 1ca4d5f..ba1dd45 100755
--- a/configure
+++ b/configure
@@ -622,6 +622,7 @@ ac_includes_default="\
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
+LIBOBJS
WINDOWS_FALSE
WINDOWS_TRUE
UNIX_FALSE
@@ -639,7 +640,6 @@ PKG_CONFIG_PATH
PKG_CONFIG
CURSES_CFLAGS
CURSES_LIBS
-LIBOBJS
EGREP
GREP
CPP
@@ -4440,74 +4440,7 @@ fi
# Checks for library functions.
-for ac_header in stdlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-
-fi
-
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_malloc_0_nonnull=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
-
-int
-main ()
-{
-return ! malloc (0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_malloc_0_nonnull=yes
-else
- ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
-
-else
- $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
-
- case " $LIBOBJS " in
- *" malloc.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
- ;;
-esac
-
-
-$as_echo "#define malloc rpl_malloc" >>confdefs.h
-
-fi
-
-
-for ac_func in mkdir strrchr
+for ac_func in malloc mkdir strrchr
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/configure.ac b/configure.ac
index 623f5c4..74f501e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,8 +17,7 @@ AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
AC_CHECK_HEADER_STDBOOL
# Checks for library functions.
-AC_FUNC_MALLOC
-AC_CHECK_FUNCS([mkdir strrchr])
+AC_CHECK_FUNCS([malloc mkdir strrchr])
# Check for curses with color support
AX_WITH_CURSES
diff --git a/docs/README.md b/docs/README.md
index 8219ebd..4006f43 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -8,8 +8,9 @@ For Windows instructions, see [here](windows_compile_instructions.md)
terminal-media-launcher can be compiled on any system with make, gcc, and the ncurses development library installed. It can be compiled and installed on any Linux distribution, and can also be compiled and run on Microsoft Windows. To compile and run terminal-media-launcher:
-1. Install dependencies. On Debian and Debian-based systems:
+1. Install dependencies.
+On Debian and Debian-based systems:
```
# apt install gcc libncurses-dev make
```