summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--CMakeLists.txt2
-rwxr-xr-xConfig112
-rw-r--r--include/sysconf.h.in121
-rw-r--r--src/CMakeLists.txt2
5 files changed, 34 insertions, 210 deletions
diff --git a/.gitignore b/.gitignore
index 5c1b617a1..b03785914 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
-/autom4te.cache
-Makefile
config.cache
-config.log
-config.status
+include/version.h
+include/sysconf.h
+build/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 02661816a..f3c1e26df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -423,7 +423,7 @@ if(WIN32)
endif(WIN32)
# Add the initial files to ignore which will be ignored regardless of if you are building in-source or out-of-source
-add_to_cpack_ignored_files(".git\;config.cache\;CMakeFiles\;sysconf.h$\;Makefile.inc$\;config.log\;config.status\;build\;autom4te.cache" TRUE)
+add_to_cpack_ignored_files(".git\;config.cache\;CMakeFiles\;sysconf.h$\;build" TRUE)
# Add the files we don't want the periods converted for
add_to_cpack_ignored_files(".\\\\\\\\.so$;.\\\\\\\\.o$;.\\\\\\\\.s$;${Anope_SOURCE_DIR}/Makefile$")
# If the two directories are the same, we are building in-source, thus we need to ignore more files from the build
diff --git a/Config b/Config
index dc9f01620..436b5f1da 100755
--- a/Config
+++ b/Config
@@ -40,75 +40,58 @@ Run_Build_System () {
WITH_INST=""
WITH_RUN=""
WITH_PERM=""
- BUILD_TYPE=""
RUN_CC_PL=""
GEN_TYPE=""
if [ "$INSTDIR" != "" ] ; then
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- WITH_INST="-DINSTDIR:STRING=$INSTDIR"
- fi
+ WITH_INST="-DINSTDIR:STRING=$INSTDIR"
fi
if [ "$RUNGROUP" != "" ] ; then
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- WITH_RUN="-DRUNGROUP:STRING=$RUNGROUP"
- fi
+ WITH_RUN="-DRUNGROUP:STRING=$RUNGROUP"
fi
if [ "$UMASK" != "" ] ; then
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- WITH_PERM="-DDEFUMASK:STRING=$UMASK"
- fi
+ WITH_PERM="-DDEFUMASK:STRING=$UMASK"
fi
if [ "$DEBUG" = "yes" ] ; then
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=DEBUG"
- fi
+ BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=DEBUG"
else
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
- fi
+ BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
fi
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=ON"
- fi
+ RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=ON"
else
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=OFF"
- fi
+ RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=OFF"
fi
- if [ "$BUILD_SYSTEM" = "cmake" ] ; then
- case `uname -s` in
- MINGW*)
- GEN_TYPE="-G\"MSYS Makefiles\""
- ;;
- esac
-
- if [ "$SOURCE_DIR" = "." ] ; then
- pwdsave=`pwd`
- test -d build || mkdir build
- cd "build"
- REAL_SOURCE_DIR=".."
- else
- REAL_SOURCE_DIR="$SOURCE_DIR"
- fi
+ case `uname -s` in
+ MINGW*)
+ GEN_TYPE="-G\"MSYS Makefiles\""
+ ;;
+ esac
- echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
+ if [ "$SOURCE_DIR" = "." ] ; then
+ pwdsave=`pwd`
+ test -d build || mkdir build
+ cd "build"
+ REAL_SOURCE_DIR=".."
+ else
+ REAL_SOURCE_DIR="$SOURCE_DIR"
+ fi
- cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
+ echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
- echo ""
- if [ "$SOURCE_DIR" = "." ] ; then
- echo "Now cd build, then run make to build Anope."
- cd "$pwdsave"
- else
- echo "Now run make to build Anope."
- fi
+ cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
+
+ echo ""
+ if [ "$SOURCE_DIR" = "." ] ; then
+ echo "Now cd build, then run make to build Anope."
+ cd "$pwdsave"
+ else
+ echo "Now run make to build Anope."
fi
}
@@ -129,7 +112,6 @@ export ECHO2 ECHO2SUF
# Init values
###########################################################################
-BUILD_SYSTEM="cmake"
INSTDIR=$HOME/services
RUNGROUP=
UMASK=
@@ -139,11 +121,6 @@ EXTRA_CONFIG_ARGS=
CAN_QUICK="no"
SOURCE_DIR=`dirname $0`
-#which cmake > /dev/null
-#if [ $? -ne 0 ] ; then
-# BUILD_SYSTEM="configure"
-#fi
-
###########################################################################
# Check out the options
###########################################################################
@@ -216,36 +193,6 @@ export ok INPUT
####
ok=0
-#echo "Note: press Return for the default, or enter a new value."
-#echo "Are you using configure or cmake?"
-#while [ $ok -eq 0 ] ; do
-# echo2 "[$BUILD_SYSTEM] "
-# if read INPUT ; then : ; else echo "" ; exit 1 ; fi
-# if [ ! "$INPUT" ] ; then
-# INPUT=$BUILD_SYSTEM
-# fi
-# case $INPUT in
-# cmake)
-# ok=1
-# ;;
-# configure)
-# ok=1
-# ;;
-# *)
-# echo "That is not a valid choice!"
-# ok=0
-# ;;
-# esac
-#done
-#BUILD_SYSTEM=$INPUT
-#echo ""
-
-#if [ "$SOURCE_DIR" != "." -a "$BUILD_SYSTEM" = "configure" ] ; then
-# echo "You can not use configure unless you are in the same folder as Config!"
-# exit 0
-#fi
-
-ok=0
echo "In what directory do you want the binaries to be installed?"
while [ $ok -eq 0 ] ; do
echo2 "[$INSTDIR] "
@@ -392,7 +339,6 @@ echo ""
echo2 "Saving configuration results in config.cache... "
cat <<EOT >$SOURCE_DIR/config.cache
-BUILD_SYSTEM="$BUILD_SYSTEM"
INSTDIR="$INSTDIR"
RUNGROUP="$RUNGROUP"
UMASK=$UMASK
diff --git a/include/sysconf.h.in b/include/sysconf.h.in
deleted file mode 100644
index 83aec699e..000000000
--- a/include/sysconf.h.in
+++ /dev/null
@@ -1,121 +0,0 @@
-#ifndef _SYSCONF_H_
-#define _SYSCONF_H_
-
-#undef DEFUMASK
-#undef HAVE_SYS_TYPES_H
-#undef HAVE_STDINT_H
-#undef HAVE_STDDEF_H
-#undef HAVE_BACKTRACE
-#undef HAVE_GETHOSTBYNAME
-#undef HAVE_GETTIMEOFDAY
-#undef HAVE_SETGRENT
-#undef HAVE_STRCASECMP
-#undef HAVE_STRICMP
-#undef HAVE_STRINGS_H
-#undef HAVE_STRLCAT
-#undef HAVE_STRLCPY
-#undef HAVE_SYS_SELECT_H
-#undef HAVE_UMASK
-#undef RUNGROUP
-#define SERVICES_BIN "services"
-
-#undef HAVE_UINT8_T
-#undef HAVE_U_INT8_T
-#undef HAVE_INT16_T
-#undef HAVE_UINT16_T
-#undef HAVE_U_INT16_T
-#undef HAVE_INT32_T
-#undef HAVE_UINT32_T
-#undef HAVE_U_INT32_T
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_STDDEF_H
-# include <stddef.h>
-#endif
-
-#ifdef HAVE_UINT8_T
-typedef uint8_t uint8;
-#else
-# ifdef HAVE_U_INT8_T
-typedef u_int8_t uint8;
-# else
-# ifdef _WIN32
-typedef unsigned __int8 uint8;
-# else
-typedef unsigned short uint8;
-# endif
-# endif
-#endif
-
-#ifdef HAVE_INT16_T
-typedef int16_t int16;
-#else
-# ifdef _WIN32
-typedef signed __int16 int16;
-# else
-typedef int int16;
-# endif
-#endif
-
-#ifdef HAVE_UINT16_T
-typedef uint16_t uint16;
-#else
-# ifdef HAVE_U_INT16_T
-typedef u_int16_t uint16;
-# else
-# ifdef _WIN32
-typedef unsigned __int16 uint16;
-# else
-typedef unsigned int uint16;
-# endif
-# endif
-#endif
-
-#ifdef HAVE_INT32_T
-typedef int32_t int32;
-#else
-# ifdef _WIN32
-typedef signed __int32 int32;
-# else
-typedef long int32;
-# endif
-#endif
-
-#ifdef HAVE_UINT32_T
-typedef uint32_t uint32;
-#else
-# ifdef HAVE_U_INT32_T
-typedef u_int32_t uint32;
-# else
-# ifdef _WIN32
-typedef unsigned __int32 uint32;
-# else
-typedef unsigned long uint32;
-# endif
-# endif
-#endif
-
-#ifdef _WIN32
-# ifdef MSVCPP
-# define snprintf _snprintf
-# endif
-# define popen _popen
-# define pclose _pclose
-# define ftruncate _chsize
-# ifdef MSVCPP
-# define PATH_MAX MAX_PATH
-# endif
-# define MAXPATHLEN MAX_PATH
-# define bzero(buf, size) memset(buf, 0, size)
-# ifdef MSVCPP
-# define strcasecmp stricmp
-# endif
-# define sleep(x) Sleep(x * 1000)
-#endif
-
-#endif
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f02a527e1..f1096c6f8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -15,7 +15,7 @@ else(WIN32)
append_to_list(SRC_SRCS socketengines/socketengine_eventfd.cpp)
# Else fall back to pipe
else(HAVE_EVENTFD AND HAVE_SYS_EVENTFD_H)
- append_to_list(SRC_sRCS socketengines/socketengine_pipe.cpp)
+ append_to_list(SRC_SRCS socketengines/socketengine_pipe.cpp)
endif(HAVE_EVENTFD AND HAVE_SYS_EVENTFD_H)
endif(WIN32)