update the build system to use autotools
The autotool system provides a high-level way of specifying what to build,
and then generates Makefile templates based on these requirements as well
as a way of generating Makefiles at build time based on what it finds at
build time (i.e. specifics about the system on which it is being built),
and configuration options set by the user at build time. The nice thing
about autotools is that it better encapsulates distro-specific "gotchas"
that make it hard to create a Makefile by hand which will work on a wide
range of different versions of various UNIX distributions. It also includes
built-in support for out-of-tree build (VPATH), cross-development, and DESTDIR
installs.
These generated Makefiles automatically include support for a wide
range of 'make' targets such as: make, make clean, make install, make
uninstall, make check, make distclean, make dist, make strip, make
distcheck, etc. These targets make it easier to follow the "Makefile
Conventions" of "The Release Process" from the "GNU Coding Standards"
(https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html).
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2017-03-20 07:12:23 +01:00
|
|
|
dnl Copyright (C) 2017 Trevor Woerner <twoerner@gmail.com>
|
|
|
|
|
2018-03-28 03:22:40 +02:00
|
|
|
AC_INIT([Rockchip rkdeveloptool], 1.3, [Eddie Cai <eddie.cai.linux@gmail.com>], rkdeveloptool)
|
update the build system to use autotools
The autotool system provides a high-level way of specifying what to build,
and then generates Makefile templates based on these requirements as well
as a way of generating Makefiles at build time based on what it finds at
build time (i.e. specifics about the system on which it is being built),
and configuration options set by the user at build time. The nice thing
about autotools is that it better encapsulates distro-specific "gotchas"
that make it hard to create a Makefile by hand which will work on a wide
range of different versions of various UNIX distributions. It also includes
built-in support for out-of-tree build (VPATH), cross-development, and DESTDIR
installs.
These generated Makefiles automatically include support for a wide
range of 'make' targets such as: make, make clean, make install, make
uninstall, make check, make distclean, make dist, make strip, make
distcheck, etc. These targets make it easier to follow the "Makefile
Conventions" of "The Release Process" from the "GNU Coding Standards"
(https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html).
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2017-03-20 07:12:23 +01:00
|
|
|
AC_PREREQ([2.68])
|
|
|
|
AC_CONFIG_SRCDIR(main.cpp)
|
|
|
|
AC_CONFIG_AUX_DIR(cfg)
|
|
|
|
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 1.9])
|
|
|
|
AM_CONFIG_HEADER(cfg/config.h)
|
|
|
|
|
|
|
|
SUBDIRS=""
|
|
|
|
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CXXCPP
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
2017-10-10 15:23:04 +02:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
case "$host_os" in
|
2018-09-07 06:56:17 +02:00
|
|
|
freebsd*)
|
|
|
|
CPPFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib -liconv"
|
|
|
|
;;
|
2017-10-10 15:23:04 +02:00
|
|
|
openbsd*)
|
|
|
|
CPPFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2017-09-18 21:19:06 +02:00
|
|
|
AC_SEARCH_LIBS(iconv, iconv)
|
|
|
|
|
update the build system to use autotools
The autotool system provides a high-level way of specifying what to build,
and then generates Makefile templates based on these requirements as well
as a way of generating Makefiles at build time based on what it finds at
build time (i.e. specifics about the system on which it is being built),
and configuration options set by the user at build time. The nice thing
about autotools is that it better encapsulates distro-specific "gotchas"
that make it hard to create a Makefile by hand which will work on a wide
range of different versions of various UNIX distributions. It also includes
built-in support for out-of-tree build (VPATH), cross-development, and DESTDIR
installs.
These generated Makefiles automatically include support for a wide
range of 'make' targets such as: make, make clean, make install, make
uninstall, make check, make distclean, make dist, make strip, make
distcheck, etc. These targets make it easier to follow the "Makefile
Conventions" of "The Release Process" from the "GNU Coding Standards"
(https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html).
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2017-03-20 07:12:23 +01:00
|
|
|
PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_CONFIG_FILES([cfg/Makefile])
|
|
|
|
|
|
|
|
AC_OUTPUT
|