diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2014-01-02 14:57:51 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2014-01-04 16:10:13 +0100 |
commit | 8b09939b9dfb616aa3879118e2d7074484ec3136 (patch) | |
tree | 4ad27336b14098894f3925a4cc12e0d33a165102 | |
parent | 4aaaded632ceb8c4955a8520f871dbbf94f3447c (diff) | |
download | pjctl-8b09939b9dfb616aa3879118e2d7074484ec3136.tar.gz pjctl-8b09939b9dfb616aa3879118e2d7074484ec3136.tar.bz2 pjctl-8b09939b9dfb616aa3879118e2d7074484ec3136.zip |
autoconf/make: Support cygwin compilation
This makes the Makefile.cygwin superfluous. Removed.
-rw-r--r-- | Makefile.cygwin | 7 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | src/Makefile.am | 8 | ||||
-rw-r--r-- | win/pjctl.mm | 6 |
4 files changed, 18 insertions, 12 deletions
diff --git a/Makefile.cygwin b/Makefile.cygwin deleted file mode 100644 index bbc147f..0000000 --- a/Makefile.cygwin +++ /dev/null @@ -1,7 +0,0 @@ -all: win/pjctl win/pjctl-no-console - -win/pjctl: src/pjctl.c src/ext/gnulib/md5.c - gcc -o $@ src/pjctl.c src/ext/gnulib/md5.c - -win/pjctl-no-console: src/pjctl.c src/ext/gnulib/md5.c - gcc -o $@ src/pjctl.c src/ext/gnulib/md5.c -mwindows diff --git a/configure.ac b/configure.ac index a353554..ed047dd 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,15 @@ AC_SUBST([GCC_CFLAGS]) # for src/ext/gnulib/md5.c AC_C_BIGENDIAN +AC_CANONICAL_HOST +have_windows="no" +case "$host_os" in + *cygwin) + have_windows="yes" + ;; +esac +AM_CONDITIONAL([HAVE_WINDOWS], [test "x$have_windows" = "xyes"]) + AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index f9e81a0..2c5ed18 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,11 @@ bin_PROGRAMS = pjctl pjctl_SOURCES = pjctl.c ext/gnulib/md5.c ext/gnulib/md5.h param.h -pjctl_LDADD = $(crypto_LIBS) -AM_CPPFLAGS = $(crypto_CFLAGS) +if HAVE_WINDOWS +# Create an executable that doesnt open a console +bin_PROGRAMS += pjctl-no-console +pjctl_no_console_SOURCES = pjctl.c ext/gnulib/md5.c ext/gnulib/md5.h +pjctl_no_console_LDFLAGS = -mwindows +endif AM_CFLAGS = $(GCC_CFLAGS) diff --git a/win/pjctl.mm b/win/pjctl.mm index 4272d68..b7dce3d 100644 --- a/win/pjctl.mm +++ b/win/pjctl.mm @@ -36,6 +36,6 @@ ;--- Define default location where file should install and add files -------- <$DirectoryTree Key="INSTALLDIR" Dir="c:\program files\pjctl\" CHANGE="\" PrimaryFolder="Y"> -<$Files "pjctl-no-console.exe" DestDir="INSTALLDIR"> -<$Files "pjctl.exe" DestDir="INSTALLDIR"> -<$Files "C:\cygwin\bin\cygwin1.dll" DestDir="INSTALLDIR">
\ No newline at end of file +<$Files "..\src\pjctl-no-console.exe" DestDir="INSTALLDIR"> +<$Files "..\src\pjctl.exe" DestDir="INSTALLDIR"> +<$Files "C:\cygwin\bin\cygwin1.dll" DestDir="INSTALLDIR"> |