Re: [AD] Compiling errors with Allegro 3.9.29 shared/debug version. |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Mon, Dec 13, 1999 at 11:01:31PM +0000, Shawn Hargreaves wrote:
> I think the default configure option should be only shared libs and
> programs, with static linking only enabled if you explicitly request it.
> Anyone got a problem with that? Saves a _lot_ of disk space :-) At the
> moment it looks like the RPM versions are installing both shared and static
> libs: is there any reason for that, or couldn't they also always be shared
> unless told otherwise?
I forgot to do this too before posting the last email -- here's
a patch for it, which also adds %preun scripts to make the RPMs
remove more cleanly. This does not work for the end-user one
though because we don't have a build tree to run `make
uninstall' in any more. I considered doing `make --dry-run
uninstall' while the tree's still there and saving the resulting
script as /usr/local/src/allegro-uninstall.sh or something, and
calling that from the %preun script of the RPM, but I haven't
implemented it.
Hmm, come to think of it, I don't remember whether I included
this other patch either. It's the one that makes the configure
script generate shared libraries only by default. Don't forget
to run `autoconf' after applying it, and apply it (3) before the
RPM one (4).
George
diff -urN all3929-1/configure.in all3929-3/configure.in
--- all3929-1/configure.in Sun Dec 12 21:51:22 1999
+++ all3929-3/configure.in Tue Dec 14 02:41:58 1999
@@ -32,14 +32,14 @@
dnl Enable static library.
AC_ARG_ENABLE(static,
-[ --enable-static[=x] build static libraries [default=yes]],
-test "X$enableval" != "Xno" && allegro_static_libraries=yes,
-allegro_static_libraries=yes)
+[ --enable-static[=x] build static libraries [default=no]],
+test "X$enableval" != "Xno" && allegro_static_libraries=yes)
dnl Enable shared library.
AC_ARG_ENABLE(shared,
-[ --enable-shared[=x] build shared libraries [default=no]],
-test "X$enableval" != "Xno" && allegro_shared_libraries=yes)
+[ --enable-shared[=x] build shared libraries [default=yes]],
+test "X$enableval" != "Xno" && allegro_shared_libraries=yes,
+allegro_shared_libraries=yes)
dnl Enable building normal library (default).
AC_ARG_ENABLE(stdlib,
@@ -67,20 +67,20 @@
[ --enable-profprog[=x] enable building profiling programs [default=no]],
test "X$enableval" != "Xno" && allegro_build_profiling_programs=yes)
-dnl Link programs with shared library rather than static (if available)
-AC_ARG_ENABLE(shareprog,
-[ --enable-shareprog[=x] link programs with shared library [default=no]],
-test "X$enableval" != "Xno" && allegro_build_shared_programs=yes)
+dnl Link programs with static library rather than shared (if available)
+AC_ARG_ENABLE(staticprog,
+[ --enable-staticprog[=x] link programs with static library [default=no]],
+test "X$enableval" != "Xno" && allegro_build_static_programs=yes)
dnl Sanity check on shared/static options
-if test "X$allegro_shared_libraries" != "Xyes"; then
- if test "X$allegro_static_libraries" != "Xyes"; then
- AC_MSG_WARN([static and shared libraries all disabled, assuming static])
- allegro_static_libraries=yes
+if test "X$allegro_static_libraries" != "Xyes"; then
+ if test "X$allegro_shared_libraries" != "Xyes"; then
+ AC_MSG_WARN([static and shared libraries all disabled, assuming shared])
+ allegro_shared_libraries=yes
fi
- allegro_build_shared_programs=no
-elif test "X$allegro_static_libraries" != "Xyes"; then
- allegro_build_shared_programs=yes
+ allegro_build_static_programs=no
+elif test "X$allegro_shared_libraries" != "Xyes"; then
+ allegro_build_static_programs=yes
fi
dnl How strict should we be about compiler warnings
@@ -183,12 +183,12 @@
PLUGIN_LIB=lib/unix/libaldat.a
allegro_build_normal_library=yes
fi
-if test "X$allegro_build_shared_programs" = "Xyes"; then
- LIBALLEG=lib/unix/lib$lib_to_link.so
- LINK_LIBALLEG="-Llib/unix -l$lib_to_link"
-else
+if test "X$allegro_build_static_programs" = "Xyes"; then
LIBALLEG=lib/unix/lib$lib_to_link.a
LINK_LIBALLEG="$LIBALLEG"
+else
+ LIBALLEG=lib/unix/lib$lib_to_link.so
+ LINK_LIBALLEG="-Llib/unix -l$lib_to_link"
fi
AC_SUBST(LIBALLEG)
AC_SUBST(LINK_LIBALLEG)
diff -urN all3929-3/misc/allegro-enduser.spec all3929-4/misc/allegro-enduser.spec
--- all3929-3/misc/allegro-enduser.spec Sun Dec 12 21:51:24 1999
+++ all3929-4/misc/allegro-enduser.spec Tue Dec 14 03:14:02 1999
@@ -54,12 +54,16 @@
gunzip -cd all3929-enduser.tar.gz | tar -xf -
rm -f all3929-enduser.tar.gz
cd all3929
-CFLAGS="$RPM_OPT_FLAGS" ./configure --enable-shared
+CFLAGS="$RPM_OPT_FLAGS" ./configure
make depend
make lib
make install
cd ..
rm -rf all3929
+
+%preun
+cd /usr/local/src
+touch all3929-enduser.tar.gz
%files
/usr/local/src/all3929-enduser.tar.gz
diff -urN all3929-3/misc/allegro.spec all3929-4/misc/allegro.spec
--- all3929-3/misc/allegro.spec Sun Dec 12 21:51:24 1999
+++ all3929-4/misc/allegro.spec Tue Dec 14 02:55:26 1999
@@ -54,12 +54,18 @@
gunzip -cd all3929.tar.gz | tar -xf -
rm -f all3929.tar.gz
cd all3929
-CFLAGS="$RPM_OPT_FLAGS" ./configure --enable-shared
+CFLAGS="$RPM_OPT_FLAGS" ./configure
make depend
make
make install
make install-man
make install-info
+
+%preun
+cd /usr/local/src
+make -C all3929 uninstall
+rm -rf all3929
+touch all3929.tar.gz
%files
/usr/local/src/all3929.tar.gz