From: Hugo Villeneuve Date: Wed, 29 May 2013 02:16:28 +0000 (-0400) Subject: Renamed configure.in to configure.ac X-Git-Tag: hvclock-1.0.0~5 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=15b4195e8a3cbc496e3e40be68919ea97230249a;p=dockapps%2Fhvclock.git Renamed configure.in to configure.ac --- diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..6ff6abc --- /dev/null +++ b/configure.ac @@ -0,0 +1,78 @@ +# configure.ac -- Process this file with autoconf to produce configure. + +dnl Initialization stuff. +AC_INIT(hvclock, 0.2.0) +AC_CONFIG_AUX_DIR(config) +AC_CONFIG_SRCDIR(src/hvclock.c) +AM_CONFIG_HEADER(config.h:config-h.in) +dnl Checking if the NEWS file has been updated to reflect the current version. +AM_INIT_AUTOMAKE(check-news) + +dnl Testing the C compiler. +AC_PROG_CC +AC_LANG_C + +dnl Checking for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(stdlib.h unistd.h errno.h assert.h) +AC_CHECK_HEADERS(string.h strings.h) + +dnl Checking for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_SIZE_T + +dnl Basic CFLAGS values +CFLAGS="${CFLAGS} -Wall" + +dnl Checking for POSIX threads library. +ACX_PTHREAD(CC="${PTHREAD_CC}" CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" dnl + LIBS="${PTHREAD_LIBS} ${LIBS}", dnl + echo "Can't find POSIX threads library"; exit 1 ) + +dnl Trying to locate the X window system's includes and libraries, and sets the +dnl variables x_includes and x_libraries to their locations. Also adds the +dnl required include flags to X_CFLAGS and required linking flags to X_LIBS. +AC_PATH_XTRA +CFLAGS="${CFLAGS} ${X_CFLAGS}" +LIBS="${LIBS} ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}" + +dnl Checking for X11 library. +AC_CHECK_LIB(X11, XOpenDisplay, LIBS="${LIBS} -lX11", + echo "Can't find X11 library" ; exit 1, "${X_LIBS}") + +dnl Checking for Xpm library and headers. +AC_CHECK_HEADERS(X11/xpm.h, ,echo "Can't find header file for library Xpm" ; exit 1) +AC_CHECK_LIB(Xpm, XpmCreatePixmapFromXpmImage, LIBS="${LIBS} -lXpm", + echo "Can't find Xpm library" ; exit 1, "${X_LIBS}") + +dnl Checking for Xext library and headers. +AC_CHECK_HEADERS(X11/extensions/shape.h, , +echo "Can't find header file for library Xext" ; exit 1) +AC_CHECK_LIB(Xext, XShapeCombineMask, LIBS="${LIBS} -lXext", + echo "Can't find Xext library" ; exit 1, "${X_LIBS}") + +AC_CHECK_HEADERS(math.h, ,dnl +echo "Can't find header file for math library" ; exit 1) +dnl Checking for math library +AC_CHECK_LIB(m, sin, LIBS="${LIBS} -lm",dnl + echo "Can't find math library" ; exit 1, "${X_LIBS}") + +AC_SUBST(CFLAGS) +AC_SUBST(LIBS) +AC_SUBST(ac_aux_dir) + +dnl Creating output file(s) +AC_OUTPUT(Makefile src/Makefile doc/Makefile) + +dnl Output the configuration summary +echo +echo "Configuration summary:" +echo +echo " Install path: ${prefix}" +echo " Compiler: ${CC}" +echo " Compiler flags: ${CFLAGS}" +echo " Linker flags: ${LIBS}" +echo +echo "Configure finished. Type 'make' to build." diff --git a/configure.in b/configure.in deleted file mode 100644 index 866bb1b..0000000 --- a/configure.in +++ /dev/null @@ -1,78 +0,0 @@ -# configure.in -- Process this file with autoconf to produce configure. - -dnl Initialization stuff. -AC_INIT(hvclock, 0.2.0) -AC_CONFIG_AUX_DIR(config) -AC_CONFIG_SRCDIR(src/hvclock.c) -AM_CONFIG_HEADER(config.h:config-h.in) -dnl Checking if the NEWS file has been updated to reflect the current version. -AM_INIT_AUTOMAKE(check-news) - -dnl Testing the C compiler. -AC_PROG_CC -AC_LANG_C - -dnl Checking for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(stdlib.h unistd.h errno.h assert.h) -AC_CHECK_HEADERS(string.h strings.h) - -dnl Checking for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_SIZE_T - -dnl Basic CFLAGS values -CFLAGS="${CFLAGS} -Wall" - -dnl Checking for POSIX threads library. -ACX_PTHREAD(CC="${PTHREAD_CC}" CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" dnl - LIBS="${PTHREAD_LIBS} ${LIBS}", dnl - echo "Can't find POSIX threads library"; exit 1 ) - -dnl Trying to locate the X window system's includes and libraries, and sets the -dnl variables x_includes and x_libraries to their locations. Also adds the -dnl required include flags to X_CFLAGS and required linking flags to X_LIBS. -AC_PATH_XTRA -CFLAGS="${CFLAGS} ${X_CFLAGS}" -LIBS="${LIBS} ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}" - -dnl Checking for X11 library. -AC_CHECK_LIB(X11, XOpenDisplay, LIBS="${LIBS} -lX11", - echo "Can't find X11 library" ; exit 1, "${X_LIBS}") - -dnl Checking for Xpm library and headers. -AC_CHECK_HEADERS(X11/xpm.h, ,echo "Can't find header file for library Xpm" ; exit 1) -AC_CHECK_LIB(Xpm, XpmCreatePixmapFromXpmImage, LIBS="${LIBS} -lXpm", - echo "Can't find Xpm library" ; exit 1, "${X_LIBS}") - -dnl Checking for Xext library and headers. -AC_CHECK_HEADERS(X11/extensions/shape.h, , -echo "Can't find header file for library Xext" ; exit 1) -AC_CHECK_LIB(Xext, XShapeCombineMask, LIBS="${LIBS} -lXext", - echo "Can't find Xext library" ; exit 1, "${X_LIBS}") - -AC_CHECK_HEADERS(math.h, ,dnl -echo "Can't find header file for math library" ; exit 1) -dnl Checking for math library -AC_CHECK_LIB(m, sin, LIBS="${LIBS} -lm",dnl - echo "Can't find math library" ; exit 1, "${X_LIBS}") - -AC_SUBST(CFLAGS) -AC_SUBST(LIBS) -AC_SUBST(ac_aux_dir) - -dnl Creating output file(s) -AC_OUTPUT(Makefile src/Makefile doc/Makefile) - -dnl Output the configuration summary -echo -echo "Configuration summary:" -echo -echo " Install path: ${prefix}" -echo " Compiler: ${CC}" -echo " Compiler flags: ${CFLAGS}" -echo " Linker flags: ${LIBS}" -echo -echo "Configure finished. Type 'make' to build."