Added for autoconf support.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@7 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2002-09-16 17:10:34 +00:00
parent e16e5ca1f5
commit f58e60a2b7
4 changed files with 254 additions and 0 deletions

53
configure.in Normal file
View File

@ -0,0 +1,53 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(font_6x11.h)
AC_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
# Ask user for path to libmysqlclient stuff:.
AC_ARG_WITH(mysql,
[ --with-mysql=<path> prefix of MySQL installation. e.g. /usr/local or /usr],
[MYSQL_PREFIX=$with_mysql],
AC_MSG_ERROR([You must call configure with the --with-mysql option.
This tells configure where to find the MySql C library and headers.
e.g. --with-mysql=/usr/local or --with-mysql=/usr])
)
AC_SUBST(MYSQL_PREFIX)
MYSQL_LIBS="-L${MYSQL_PREFIX}/lib/mysql -lmysqlclient"
MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
AC_SUBST(MYSQL_LIBS)
AC_SUBST(MYSQL_CFLAGS)
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
LIBS="$LIBS $MYSQL_LIBS"
dnl Checks for libraries.
dnl Replace `main' with a function in -ldl:
AC_CHECK_LIB(dl, dlsym)
dnl Replace `main' with a function in -ljpeg:
AC_CHECK_LIB(jpeg, jpeg_stdio_dest)
dnl Replace `main' with a function in -lmysqlclient:
AC_CHECK_LIB(mysqlclient, mysql_init)
dnl Replace `main' with a function in -lz:
AC_CHECK_LIB(z, compress)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h syslog.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gettimeofday strerror)
AC_OUTPUT(Makefile)

84
src/Makefile.in Normal file
View File

@ -0,0 +1,84 @@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
CC = @CC@
CXX = @CXX@
CPPFLAGS = @DEFS@
CFLAGS= @DEFS@ @CFLAGS@
CXXFLAGS = @CXXFLAGS@ $(CFLAGS)
LDFLAGS = @LDFLAGS@ -Wl,-E
INSTALL = @INSTALL@
BINDIR = @bindir@
ZMLIBS = -L/usr/lib/mysql -lmysqlclient @LIBS@
ZMOBJS = zm.o zmdbg.o jmemdst.o
ZMHDRS = zm.h zmcfg.h zmdbg.h
all: zmc zma zms zmu
test:
@echo "No tests available"
install:
$(INSTALL) $(ZMC) $(BINDIR)
$(INSTALL) $(ZMA) $(BINDIR)
$(INSTALL) $(ZMS) $(BINDIR)
$(INSTALL) $(ZMU) $(BINDIR)
@echo "You will now need to copy index.php to your desired ZoneMinder web document root"
clean:
@$(RM) $(ZMC) $(ZMCOBJS) $(ZMA) $(ZMAOBJS) $(ZMS) $(ZMSOBJS) $(ZMU) $(ZMUOBJS)
distclean:
@$(RM) Makefile config.h config.status config.cache config.log
ZMC = zmc
ZMCOBJS = zmc.o $(ZMOBJS)
ZMCLIBS = $(ZMLIBS)
ZMA = zma
ZMAOBJS = zma.o $(ZMOBJS)
ZMALIBS = $(ZMLIBS)
ZMS = zms
ZMSOBJS = zms.o $(ZMOBJS)
ZMSLIBS = $(ZMLIBS)
ZMU = zmu
ZMUOBJS = zmu.o $(ZMOBJS)
ZMULIBS = $(ZMLIBS)
zmdbg.o: zmdbg.c zmdbg.h
$(CXX) -c $(CXXFLAGS) $<
jmemdst.o: jmemdst.c
$(CC) -c $(CFLAGS) $<
zm.o: zm.cpp $(ZMHDRS)
$(CXX) -c $(CXXFLAGS) $<
zmc.o: zmc.cpp $(ZMHDRS)
$(CXX) -c $(CXXFLAGS) $<
zma.o: zma.cpp $(ZMHDRS)
$(CXX) -c $(CXXFLAGS) $<
zms.o: zms.cpp $(ZMHDRS)
$(CXX) -c $(CXXFLAGS) $<
zmu.o: zmu.cpp $(ZMHDRS)
$(CXX) -c $(CXXFLAGS) $<
$(ZMC): $(ZMCOBJS)
$(CXX) $(CXXFLAGS) -o $@ $(ZMCOBJS) $(ZMCLIBS) $(LDFLAGS)
$(ZMA): $(ZMAOBJS)
$(CXX) $(CXXFLAGS) -o $@ $(ZMAOBJS) $(ZMALIBS) $(LDFLAGS)
$(ZMS): $(ZMSOBJS)
$(CXX) $(CXXFLAGS) -o $@ $(ZMSOBJS) $(ZMSLIBS) $(LDFLAGS)
$(ZMU): $(ZMUOBJS)
$(CXX) $(CXXFLAGS) -o $@ $(ZMUOBJS) $(ZMULIBS) $(LDFLAGS)

64
src/config.h.in Normal file
View File

@ -0,0 +1,64 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define to empty if the keyword does not work. */
#undef const
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define if you have the gettimeofday function. */
#undef HAVE_GETTIMEOFDAY
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <syslog.h> header file. */
#undef HAVE_SYSLOG_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the dl library (-ldl). */
#undef HAVE_LIBDL
/* Define if you have the jpeg library (-ljpeg). */
#undef HAVE_LIBJPEG
/* Define if you have the mysqlclient library (-lmysqlclient). */
#undef HAVE_LIBMYSQLCLIENT
/* Define if you have the z library (-lz). */
#undef HAVE_LIBZ

53
src/configure.in Normal file
View File

@ -0,0 +1,53 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(font_6x11.h)
AC_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
# Ask user for path to libmysqlclient stuff:.
AC_ARG_WITH(mysql,
[ --with-mysql=<path> prefix of MySQL installation. e.g. /usr/local or /usr],
[MYSQL_PREFIX=$with_mysql],
AC_MSG_ERROR([You must call configure with the --with-mysql option.
This tells configure where to find the MySql C library and headers.
e.g. --with-mysql=/usr/local or --with-mysql=/usr])
)
AC_SUBST(MYSQL_PREFIX)
MYSQL_LIBS="-L${MYSQL_PREFIX}/lib/mysql -lmysqlclient"
MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
AC_SUBST(MYSQL_LIBS)
AC_SUBST(MYSQL_CFLAGS)
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
LIBS="$LIBS $MYSQL_LIBS"
dnl Checks for libraries.
dnl Replace `main' with a function in -ldl:
AC_CHECK_LIB(dl, dlsym)
dnl Replace `main' with a function in -ljpeg:
AC_CHECK_LIB(jpeg, jpeg_stdio_dest)
dnl Replace `main' with a function in -lmysqlclient:
AC_CHECK_LIB(mysqlclient, mysql_init)
dnl Replace `main' with a function in -lz:
AC_CHECK_LIB(z, compress)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h syslog.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gettimeofday strerror)
AC_OUTPUT(Makefile)