1 /* precheck/chk-apache.c  -  Check that Apache and APR include files and libraries are available
2  * Copyright (c) 2008 Symlabs (symlabs@symlabs.com), All Rights Reserved.
3  * Author: Sampo Kellomaki (sampo@iki.fi)
4  * This is confidential unpublished proprietary source code of the author.
5  * NO WARRANTY, not even implied warranties. Contains trade secrets.
6  * Distribution prohibited unless authorized in writing.
7  * Licensed under Apache License 2.0, see file COPYING.
8  * $Id: chk-apache.c,v 1.3 2008-09-18 20:27:23 sampo Exp $
9  *
10  * 16.9.2008, created --Sampo
11  *
12  * sudo apt-get install libapr1-dev
13  * sudo apt-get install apache2-dev
14  */
15 
16 /* In apr.h off64_t is used, but getting it properly defined seems
17  * to be difficult, hence the kludges below. Note that zxid itself
18  * does not use any functionality tainted by this problem so we
19  * consider it to be ok to ignore the problem. We only need to
20  * include those files to get the version information. */
21 
22 #if 1
23 #include <sys/types.h>
24 #if !defined(__off64_t_defined) && !defined(off64_t)
25 /*typedef long long off64_t;*/
26 #define off64_t long long
27 #endif
28 #else
29 #define _LARGE_FILES 1
30 #define __USE_LARGEFILE64 1
31 #include <sys/types.h>
32 #endif
33 
34 #include "ap_config.h"
35 #include "ap_release.h"
36 #include "apr_strings.h"
37 #include "apr_version.h"
38 
39 #include <stdio.h>
40 
41 /* Called by: */
main(int argc,char ** argv)42 int main(int argc, char** argv)
43 {
44   printf("  -- Apache release from header: %d.%d.%d%s\n", AP_SERVER_MAJORVERSION_NUMBER,
45 	 AP_SERVER_MINORVERSION_NUMBER, AP_SERVER_PATCHLEVEL_NUMBER, AP_SERVER_ADD_STRING);
46   printf("  -- APR version from header: %s\n", APR_VERSION_STRING);
47   return 0;
48 }
49 
50 /* EOF  --  chk-apache.c */
51