Skip to content

Commit

Permalink
made configure and make work with GNU Make as gmake (rather than make…
Browse files Browse the repository at this point in the history
…), and documented it
  • Loading branch information
Peter Szabo committed Jan 15, 2019
1 parent 12388c9 commit d000406
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 55 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ifeq ($(MAKE_DIST),)
#
# echo to config.h is needed to make config.h younger than config.h.in;
# configure doesn't change the timestamp of config.h if it's unchanged.
Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h; ./configure --enable-gif --enable-lzw && echo "" >>config.h
Makedep config.h: configure Makehelp.in config.h.in ccdep.pl sam2p_version.h; ./configure MAKE=$(MAKE) --enable-gif --enable-lzw && echo "" >>config.h
Makehelp:;
include Makehelp # Defines CXX. File generated by ./configure.
include Makedep # Contains ALL+=... .
Expand Down
14 changes: 9 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ Software required for UNIX compilation:
working compilers: g++-2.91 g++-2.95 g++-3.0 g++-3.1 g++-3.2, g++-4.0,
g++-4.4, g++-4.8, g++-6.3, g++-7.3)
-- perl: Perl >=5.004 (no external Perl modules are required)
-- (optional) make: GNU Make (`make -v' should print `GNU Make')
-- (optional) make: GNU Make
-- (optional) autoconf: GNU autoconf >=2.53 (version number is important,
see AC_C_CONST)
-- (not required): the following libraries are _not_ required: libjpeg,
Expand All @@ -616,16 +616,20 @@ Alternative compilation if you don't want to link against libstdc++:
Alternative compilation for some targets, including cross-compilation: use
the ./compile_*.sh scripts.

Alternative compilation, with ./configure script and GNU Make as make:
If you want to use the ./configure script, run

# compile and install required programs
#autoconf # optional, for experts only
#export CC=gcc-3.2 CXX=g++-3.2 # optional, for experts only
#sh configure --enable-gif --enable-lzw # optional, make does it
make
# the stand-alone utility `./sam2p' is now built
make install # optional, may not work

If you have GNU Make as gmake on the $PATH, run this:

sh configure MAKE=gmake --enable-gif --enable-lzw # optional, gmake does it
gmake
# the stand-alone utility `./sam2p' is now built
gmake install # optional, may not work

If installation doesn't work, please copy the file `sam2p' to somewhere in
your $PATH, for example /usr/local/bin. Please also copy the README to a
directory like /usr/share/doc/sam2p. There is no man page -- the
Expand Down
47 changes: 1 addition & 46 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2513,51 +2513,6 @@ echo "$as_me: error: bash is required for compiling this program" >&2;}
{ (exit 1); exit 1; }; }
fi
# Extract the first word of "make", so it can be a program name with args.
set dummy make; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_pts_make+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$pts_make" in
/*)
ac_cv_path_pts_make="$pts_make" # Let the user override the test with a path.
;;
?:/*)
ac_cv_path_pts_make="$pts_make" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -x $ac_dir/$ac_word; then
ac_cv_path_pts_make="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
;;
esac
fi
pts_make="$ac_cv_path_pts_make"
if test -n "$pts_make"; then
echo "$as_me:$LINENO: result: $pts_make" >&5
echo "${ECHO_T}$pts_make" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
if test x"$ac_cv_path_pts_make" = x; then
{ echo "$as_me:$LINENO: WARNING: make is required:" >&5
echo "$as_me: WARNING: make is required:" >&2;}
{ { echo "$as_me:$LINENO: error: make is required for compiling this program" >&5
echo "$as_me: error: make is required for compiling this program" >&2;}
{ (exit 1); exit 1; }; }
fi
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
Expand Down Expand Up @@ -7534,5 +7489,5 @@ fi
echo "configure:7517: all OK" >&5
echo "configure done. Now you should run: make; make install"
echo "configure done. Now you should run: $MAKE; $MAKE install"
7 changes: 4 additions & 3 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,13 @@ AC_PTS_WARN_PROG(lzw_codec, [lzw_codec might become recommended for /Compression
AC_PTS_WARN_PROG(gzip, [gzip might become useful for /Compression/ZIP])
AC_PTS_WARN_PROG(zip, [zip might become useful for /Compression/ZIP])
AC_PTS_ERR_PROG(bash, [bash is required for compiling this program])
AC_PTS_ERR_PROG(make, [make is required for compiling this program])
dnl Doesn't work like this, e.g. env var ac_cv_path_pts_$MAKE
dnl AC_PTS_ERR_PROG($MAKE, [$MAKE is required for compiling this program])
AC_PTS_ERR_PROG(perl, [perl is required for compiling this program])
dnl AC_PTS_ERR_PROG(touch, [touch is required for compiling this program])
dnl ^^^ as of 0.37, touch is not required

#AC_CHECK_PROG(ac_pts_cjpeg, cjpeg, yes)
dnl AC_CHECK_PROG(ac_pts_cjpeg, cjpeg, yes)

dnl Checks for C/C++ language features
AC_PTS_HAVE_STDC
Expand Down Expand Up @@ -218,6 +219,6 @@ dnl AC_PTS_RUN_OK([perl -x -S ./ccdep.pl $CXX], [], [AC_MSG_ERROR(cannot compute
rm -f Makedep
AC_PTS_RUN_OK([${MAKE:-make} Makedep.force], [], [AC_MSG_ERROR(cannot compute depends)])
AC_PTS_OK
echo "configure done. Now you should run: make; make install"
echo "configure done. Now you should run: $MAKE; $MAKE install"

dnl end of configure.in

0 comments on commit d000406

Please sign in to comment.