2 dnl /**-------------------------------------------------------------------**
4 dnl **-------------------------------------------------------------------**
6 dnl **-------------------------------------------------------------------**
7 dnl ** First version: august 11th 2001 **
8 dnl **-------------------------------------------------------------------**/
10 dnl Input file for autoconf to build a configuration shellscript.
14 AC_INIT(./source/piplib.c)
18 dnl /**************************************************************************
20 dnl **************************************************************************/
23 dnl Checks for typedefs, structures, and compiler characteristics.
26 dnl Checks for programs.
32 dnl Configure needs an empty install.sh file with this, i HATE that...
35 dnl Checks for typedefs, structures, and compiler characteristics.
40 dnl Checks for libraries.
41 dnl Replace `main' with a function in -lc:
42 dnl AC_CHECK_LIB(c, main)
45 dnl Checks for header files.
49 dnl Set some system dependant values.
54 EXTRA_FLAGS="-DCYGWIN"
55 EXTRA_LIBS="-lcygwin -lkernel32"
57 INSTALL_PIPLIB="install_piplibstatic" ;;
63 PIPLIB="piplibshared piplibstatic"
64 INSTALL_PIPLIB="install_piplibshared install_piplibstatic" ;;
68 dnl Checks sizeof the two supported cases.
69 AC_CHECK_SIZEOF(int,1)
70 AC_CHECK_SIZEOF(long long int,1)
73 dnl /**************************************************************************
74 dnl * Option setting *
75 dnl **************************************************************************/
78 dnl The different packages that can be built and installed.
80 INSTALL_PIP="install_pip"
82 INT_BITS=`expr $ac_cv_sizeof_int \* 8`
83 INT_DFLAGS=-DLINEAR_VALUE_IS_INT
84 LONG_BITS=`expr $ac_cv_sizeof_long_long_int \* 8`
85 LONG_DFLAGS=-DLINEAR_VALUE_IS_LONGLONG
88 dnl --with-pip=yes, --with-pip=no ou --without-pip
89 dnl --with-lib=yes, --with-lib=no ou --without-lib
91 [ --without-pip disable the compilation of pip],
92 [ echo "Package pip : $withval" &&
93 if test "$withval"="no" ; then
98 [ --without-lib disable the compilation of libs],
99 [ echo "Package lib : $withval" &&
100 if test "$withval"="no" ; then
105 AC_ARG_ENABLE(int-version,
106 [ --enable-int-version Only 'int' version is built],
107 [ echo "Package int : $enableval" &&
108 if test "$enableval"="no" ; then
112 AC_ARG_ENABLE(llint-version,
113 [ --enable-llint-version Only 'long long int' version is built],
114 [ echo "Package long long int : $enableval" &&
115 if test "$enableval"="no" ; then
119 dnl Packages to build.
120 PACKAGES="$PIPLIB $PIP"
121 TO_INSTALL="$INSTALL_PIPLIB $INSTALL_PIP"
124 dnl /**************************************************************************
125 dnl * Substitutions *
126 dnl **************************************************************************/
129 dnl Substitutions to do in Makefile.in.
137 AC_SUBST(EXEC_SUFFIX)
138 AC_SUBST(EXTRA_FLAGS)
141 dnl int/long bits and compilation flags
145 AC_SUBST(LONG_DFLAGS)
152 dnl Makefile creation.
156 echo " /*-----------------------------------------------*"
157 echo " * PIP/PipLib configuration is OK *"
158 echo " *-----------------------------------------------*/"
159 echo "It appears that your system is OK to start PIP/PipLib compilation. You"
160 echo "need now to type \"make\" to buid the program, then \"make install\" to"
161 echo "install it on your system."