some modifications for WIN32 support :)
[NeonServV5.git] / configure.ac
index 308d5f4284472e475e8ca63bec8dd089e5de5dcc..a464dace120aaf0900557383a4d2bd3364a2ce0f 100644 (file)
@@ -11,21 +11,27 @@ AC_PROG_AWK
 
 # Checks for libraries.
 # Get MySQL library and include locations
-AC_ARG_WITH([mysql-include-path],
-  [AS_HELP_STRING([--with-mysql-include-path],
+AC_ARG_WITH([mysql],
+  [AS_HELP_STRING([--with-mysql=DIR],
     [location of the MySQL headers, defaults to /usr/include/mysql])],
   [MYSQL_CFLAGS="-I$withval"],
   [MYSQL_CFLAGS='-I/usr/include/mysql'])
 AC_SUBST([MYSQL_CFLAGS])
 
-AC_ARG_WITH([mysql-lib-path],
-  [AS_HELP_STRING([--with-mysql-lib-path], [location of the MySQL libraries])],
+AC_ARG_WITH([mysql-lib],
+  [AS_HELP_STRING([--with-mysql-lib=DIR], [location of the MySQL libraries])],
   [MYSQL_LIBS="-L$withval -lmysqlclient"],
   [MYSQL_LIBS='-lmysqlclient'])
 AC_SUBST([MYSQL_LIBS])
 
+AC_ARG_WITH([winsock],
+  [AS_HELP_STRING([--with-winsock], [use winsock (WIN32 systems)])],
+  [WINSOCK_LIBS='-lws2_32'],
+  [WINSOCK_LIBS=''])
+AC_SUBST([WINSOCK_LIBS])
+
 # Checks for header files.
-AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
+AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h windows.h winsock2.h])
 
 # Checks for typedefs, structures, and compiler characteristics.